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
Output data:
A sample request in PHP:
inventory_id | int | Catalog ID. The list of identifiers can be retrieved using the method getInventories. |
name | varchar(100) | Catalog name |
description | text | Catalog description |
languages | array | An array of languages available in the catalogue. |
default_language | char(2) | Default catalogue language. Must be included in the "languages" parameter. |
price_groups | array | An array of price group identifiers available in the catalogue. The list of price group identifiers can be downloaded using the getInventoryPriceGroups method |
default_price_group | int | ID of the price group default for the catalogue. The identifier must be included in the "price_groups" parameter. |
warehouses | array | An 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_warehouse | varchar(30) | Identifier of the warehouse default for the catalogue. The identifier must be included in the "warehouses" parameter. |
reservations | bool | Does this catalogue support reservations |
Output data
The method returns the data in JSON format.
status | varchar(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_id | int | Catalog ID. The list of identifiers can be retrieved using the method getInventories. |
Sample
Input data:Output data:
A sample request in PHP: