API documentation
Method list
Test your request
Changelog


addInventory
The method allows you to add the BaseLinker catalogs. Adding a catalog with the same identifier again will cause updates of the previously saved catalog.


Input parameters
inventory_idintCatalog ID. The list of identifiers can be retrieved using the method getInventories.
namevarchar(100)Catalog name
descriptiontextCatalog description
languagesarrayAn array of languages available in the catalogue.
default_languagechar(2)Default catalogue language. Must be included in the "languages" parameter.
price_groupsarrayAn array of price group identifiers available in the catalogue. The list of price group identifiers can be downloaded using the getInventoryPriceGroups method
default_price_groupintID of the price group default for the catalogue. The identifier must be included in the "price_groups" parameter.
warehousesarrayAn array of warehouse identifiers available in the catalogue. The list of warehouse identifiers can be retrieved using the getInventoryWarehouses API method. The format of the identifier should be as follows: "[type:bl|shop|warehouse]_[id:int]". (e.g. "shop_2445")
default_warehousevarchar(30)Identifier of the warehouse default for the catalogue. The identifier must be included in the "warehouses" parameter.
reservationsboolDoes this catalogue support reservations



Output data
The method returns the data in JSON format.
statusvarchar(30)SUCCESS - request executed correctly
ERROR - an error occurred during an API request. Error details will be described in 2 additional returned fields: error_message and error_code
inventory_idintCatalog ID. The list of identifiers can be retrieved using the method getInventories.



Sample
Input data:
Output data:
A sample request in PHP: