addInventoryWarehouseZone
The method allows you to add or update a warehouse zone. Providing a zone_id updates the existing zone; omitting it creates a new one.
Input parameters
| zone_id | int | (optional) Zone identifier for update. Leave blank or pass 0 to create a new zone. If provided, the zone with this ID will be updated. |
| name | varchar(50) | Zone name. Maximum 50 characters, cannot be empty. |
| color | char(6) | Zone color as a 6-character hex string, e.g. "5cb85c". The value is normalized to lowercase. |
| location_prefix | varchar(10) | (optional) Prefix applied to location names within this zone. Maximum 10 characters. Default: empty string. |
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 |
| zone_id | int | ID of the created or updated zone. |
Sample
Input data:Output data:
A sample request in PHP: