addInventoryWarehouse
The method allows you to add a new warehouse available in BaseLinker inventories. 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.
Input parameters
| warehouse_id | int | ID of the warehouse |
| name | varchar(100) | Warehouse name |
| description | text | Warehouse description |
| stock_edition | bool | Is manual editing of stocks permitted. A false value means that you can only edit your stock through the API. |
| country | char(2) | Warehouse country as a 2-letter ISO 3166-1 country code (e.g. "PL", "DE", "GB"). When creating a new warehouse and this parameter is not provided, the country defaults to the account's regional setting. When updating and not provided, the country is not changed. Pass an empty string to clear. |
| address | varchar(200) | Warehouse street address. |
| postcode | varchar(20) | Warehouse postal code. |
| city | varchar(80) | Warehouse city. |
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 |
| warehouse_id | int | the ID of created or updated warehouse |
Sample
Input data:Output data:
A sample request in PHP: