API documentation
Method list
Test your request
Changelog


Introduction
The API enables the information exchange between an external system and BaseLinker.
. Communication uses data in JSON format. To make a request to the API, send the proper POST request to:
https://api.baselinker.com/connector.php

To send a request for each method a token is required. The token is assigned directly to the BaseLinker user account. User can generate API token in BaseLinker panel in "Account & other -> My account -> API" section.

3 values must be submitted to the connector.php file via POST:
  1. token - unique user API key
  2. method - the name of the requested API method
  3. parameters - arguments of the requested function in JSON format

Sample: https://api.baselinker.com/connector.php , POST: token=1-23-ASOIM234MFDSK534LDS &method=getOrders &parameters={"date_from": 1407341754}


Request limit
The API request limit is 100 requests per minute.


Latest changes
The API was last updated 2021-01-28.


Product catalog
addInventoryPriceGroupThe method allows to create a price group in BaseLinker storage. Providing a price group ID will update the existing price group. Such price groups may be later assigned in addInventory method.
deleteInventoryPriceGroupThe method allows you to remove the price group from BaseLinker storage.
getInventoryPriceGroupsThe method allows to retrieve price groups existing in BaseLinker storage
addInventoryWarehouseThe method allows you to add a new warehouse available in BaseLinker catalogues. Adding a warehouse with the same identifier again will cause updates of the previously saved warehouse. The method does not allow editing warehouses created automatically for the purpose of keeping external stocks of shops, wholesalers etc. Such warehouse may be later used in addInventory method.
deleteInventoryWarehouseThe method allows you to remove the warehouse available in BaseLinker catalogues. The method does not allow to remove warehouses created automatically for the purpose of keeping external stocks of shops, wholesalers etc.
getInventoryWarehousesThe method allows you to retrieve a list of warehouses available in BaseLinker catalogues. The method also returns information about the warehouses created automatically for the purpose of keeping external stocks (shops, wholesalers etc.)
addInventoryThe method allows you to add the BaseLinker catalos. Adding a catalog with the same identifier again will cause updates of the previously saved catalog.
deleteInventoryThe method allows you to delete a catalog from BaseLinker storage.
getInventoriesThe method allows you to retrieve a list of catalogs available in the BaseLinker storage.
addInventoryCategoryThe method allows you to add a category to the BaseLinker catalog. Adding a category with the same identifier again, updates the previously saved category
deleteInventoryCategoryThe method allows you to remove categories from BaseLinker warehouse. Along with the category, the products contained therein are removed (however, this does not apply to products in subcategories). The subcategories will be changed to the highest level categories.
getInventoryCategoriesThe method allows you to retrieve a list of categories for a BaseLinker catalog.
addInventoryManufacturerThe method allows you to add a manufacturer to the BaseLinker catalog. Adding a manufacturer with the same identifier again, updates the previously saved manufacturer
deleteInventoryManufacturerThe method allows you to remove manufacturer from BaseLinker catalog
getInventoryManufacturersThe method allows you to retrieve a list of manufacturers for a BaseLinker catalog.
getInventoryExtraFieldsThe method allows you to retrieve a list of extra fields for a BaseLinker catalog.
getInventoryIntegrationsThe method returns a list of integrations where text values in the catalog can be overwritten. The returned data contains a list of accounts for each integration and a list of languages supported by the integration
getInventoryAvailableTextFieldKeysThe method returns a list of product text fields that can be overwritten for specific integration.
addInventoryProductThe method allows you to add a new product to BaseLinker catalog. Entering the product with the ID updates previously saved product.
deleteInventoryProductThe method allows you to remove the product from BaseLinker catalog.
getInventoryProductsDataThe method allows you to retrieve detailed data for selected products from the BaseLinker catalogue.
getInventoryProductsListThe method allows to retrieve a basic data of chosen products from BaseLinker catalogs.
getInventoryProductsStockThe method allows you to retrieve stock data of products from BaseLinker catalogs
updateInventoryProductsStockThe method allows to update stocks of products (and/or their variants) in BaseLinker catalog. Maximum 1000 products at a time.
getInventoryProductsPricesThe method allows to retrieve the gross prices of products from BaseLinker catalogues.
updateInventoryProductsPricesThe method allows bulk update of gross prices of products (and/or their variants) in the BaseLinker catalog. Maximum 1000 products at a time.
getInventoryProductLogsThe method allows to retrieve a list of events related to product change (or their variants) in the BaseLinker catalog.


External storages
getExternalStoragesListThe method allows you to retrieve a list of available external storages (shops, wholesalers) that can be referenced via API.
getExternalStorageCategoriesThe method allows you to retrieve a category list from an external storage (shop/wholesale) connected to BaseLinker.
getExternalStorageProductsDataThe method allows to retrieve detailed data of selected products from an external storage (shop/wholesaler) connected to BaseLinker.
getExternalStorageProductsListThe method allows to retrieve detailed data of selected products from an external storage (shop/wholesaler) connected to BaseLinker.
getExternalStorageProductsQuantityThe method allows to retrieve stock from an external storage (shop/wholesaler) connected to BaseLinker.
getExternalStorageProductsPricesThe method allows to retrieve product prices from an external storage (shop/wholesaler) connected to BaseLinker.
updateExternalStorageProductsQuantityThe method allows to bulk update the product stock (and/or variants) in an external storage (shop/wholesaler) connected to BaseLinker. Maximum 1000 products at a time.


Orders
getJournalListThe method allows you to download a list of order events.
addOrderThe method allows adding a new order to the BaseLinker order manager.
getOrdersThe method allows you to download orders from a specific date from the BaseLinker order manager. The order list can be limited using the filters described in the method parameters. A maximum of 100 orders are returned at a time.

It is recommended to download only confirmed orders (get_unconfirmed_orders = false). Unconfirmed orders may be incomplete. The user may be, for example, in the process of creating an order - it already exists in the database, but not all information is completed. Unconfirmed orders may contain only a partial list of products and may be changed soon. Confirmed orders usually do not change anymore and can be safely downloaded to an external system.

The best way to download the ongoing orders is:
Collecting new order identifiers using getJournalList.

Or, using this method:
1. Setting the starting date and specifying it in the date_confirmed_from field
2. Processing of all received orders. If 100 orders are received, there may be even more to download.
3. Downloading the next package of orders by entering the value of the date_confirmed field from last downloaded order in the date_confirmed_from field. In order to avoid downloading the same orders value of date_confirmed should be increased by 1 second. This operation is repeated until you receive a package with less than 100 orders (this means that there are no more orders left to download).
4. Saving the date_confirmed last processed order. You can download orders from this date onwards so that you do not download the same order twice. It is not possible for an order to 'jump' into the database with an earlier confirmation date. This way you can be sure that all confirmed orders have been downloaded.
getOrdersByEmailThe method allows to search for orders related to the given e-mail address. This function is designed to be used in plugins for mail clients (Thunderbird, Outlook, etc.).
getOrdersByPhoneThe method allows you to search for orders related to the given phone number. This function is intended for use in caller recognition programs.
addInvoice(NEW) The method allows to issue an order invoice.
getInvoicesThe method allows you to download invoices issued from the BaseLinker order manager. The list of invoices can be limited using filters described in the method parameters. Maximum 100 invoices are returned at a time.
getSeries(NEW) The method allows to download a series of invoice/receipt numbering.
getOrderStatusListThe method allows you to download order statuses created by the customer in the BaseLinker order manager.
getOrderPaymentsHistoryThe method allows you to retrieve payment history for a selected order, including an external payment identifier from the payment gateway. One order can have multiple payment history entries, caused by surcharges, order value changes, manual payment editing
getNewReceiptsThe method allows you to retrieve receipts waiting to be issued. This method should be used in creating integration with a fiscal printer. The method can be requested for new receipts every e.g. 10 seconds. If any receipts appear in response, they should be confirmed by the setOrderReceipt method after printing to disappear from the waiting list.
getReceipt(NEW) The method allows you to retrieve a single receipt from the BaseLinker order manager. To retrieve a list of new receipts (when integrating a fiscal printer), use the getNewReceipts method.
setOrderFieldsThe method allows you to edit selected fields (e.g. address data, notes, etc.) of a specific order. Only the fields that you want to edit should be given, other fields can be omitted in the request.
addOrderProductThe method allows you to add a new product to your order.
setOrderProductFieldsThe method allows you to edit the data of selected items (e.g. prices, quantities etc.) of a specific order. Only the fields that you want to edit should be given, the remaining fields can be omitted in the request.
deleteOrderProductThe method allows you to remove a specific product from the order.
setOrderPaymentThe method allows you to add a payment to the order.
setOrderStatusThe method allows you to change order status.
setOrderReceiptThe method allows you to mark orders with a receipt already issued.
addOrderInvoiceFile(NEW) The method allows you to add an external PDF file to an invoice previously issued from BaseLinker. It enables replacing a standard invoice from BaseLinker with an invoice issued e.g. in an ERP program.


Courier shipments
createPackageThe method allows you to create a shipment in the system of the selected courier.
createPackageManualThe method allows you to enter the shipping number and the name of the courier to the order (function used only to add shipments created outside BaseLinker)
getCouriersListThe method allows you to retrieve a list of available couriers.
getCourierFieldsThe method allows you to retrieve the form fields for creating shipments for the selected courier.
getCourierServicesThe method allows you to retrieve additional courier services, which depend on other shipment settings. Used only for X-press and BrokerSystem couriers. Not applicable to other couriers whose forms have fixed options. The details of the package should be sent with the method (the format as in createPackage) in order to receive a list of additional services
getCourierAccountsThe method allows you to retrieve the list of accounts connected to a given courier.
getLabelThe method allows you to download a shipping label (consignment) for a selected shipment.
getOrderPackagesThe method allows you to download shipments previously created for the selected order.
getCourierPackagesStatusHistoryThe method allows you to retrieve the history of the status list of the given shipments. Maximum 100 shipments at a time
deleteCourierPackage(NEW) The method allows you to delete a previously created shipment. The method removes the shipment from the BaseLinker system and from the courier system if the courier API allows it


Products storage [OBSOLETE]

When referring to external warehouses (shop_*, warehouse_*) due to different performance of external warehouses, different integration methods and their specific requirements, the response standard may differ from the one described in the documentation.


getStoragesListThis method allows downloading a list of available storages that can be accessed via API.
addCategoryThe method allows adding a category to the BaseLinker storage. Adding a category with the same ID again, updates the previously saved category.
addProductThe method allows you to add a new product to BaseLinker storage. Entering the product with the ID updates previously saved product.
addProductVariantThe method allows to add a new variant to the product in BaseLinker storage. Providing the variant together with the ID, causes an update of the previously saved variant.
deleteCategoryThe method allows you to remove categories from BaseLinker storage. Along with the category, the products contained therein are removed (however, this does not apply to products in subcategories). The subcategories will be changed to the highest level categories.
deleteProductThe method allows you to remove the product from BaseLinker storage.
deleteProductVariantThe method allows you to remove the product from BaseLinker storage.
getCategoriesThe method allows you to download a list of categories for a BaseLinker storage or a shop storage connected to BaseLinker.
getProductsDataThe method allows to download detailed data of selected products from the BaseLinker storage or a shop/wholesaler storage connected to BaseLinker.
getProductsListThe method allows to download detailed data of selected products from the BaseLinker storage or a shop/wholesaler storage connected to BaseLinker.
getProductsQuantityThe method allows to retrieve stock from the BaseLinker storage or the shop/wholesaler storage connected to BaseLinker.
getProductsPricesThe method allows you to fetch prices of products from the BaseLinker storage or the shop/wholesaler storage connected to BaseLinker.
updateProductsQuantityThe method allows to bulk update the product stock (and/or variants) in BaseLinker storage or in a shop/wholesaler storage connected to BaseLinker. Maximum 1000 products at a time.
updateProductsPricesThe method allows for bulk update of product prices (and/or variants) in BaseLinker storage. Maximum 1000 products at a time.