API documentation
Method list
Test your request
Changelog


addOrderStatus
Creates a new order status or updates an existing one if status_id is provided. A new status is appended at the end of the status list within its group.


Input parameters
status_idintStatus ID. Provide to update an existing status. Leave empty or omit when creating a new status.
namevarchar(30)Status name (basic) displayed to the seller in the panel.
short_namevarchar(17)Shortened status name displayed in places with limited width (e.g., all-orders table).
name_for_customervarchar(250)Full status name displayed to the customer on the order page. If empty, the status is not shown in the order status history on the customer-facing page.
colorvarchar(7)Status color in hex format (e.g., "#FF0000").
typeintStatus type for analytics. 0: Other, 1: Unpaid, 2: In progress, 3: Sent, 4: Delivered, 5: Cancelled, 6: Return. Default: 0.
group_idintStatus group ID. The list of group IDs can be retrieved using getOrderStatusList or by first creating groups with addOrderStatusGroup. If omitted on create, the status is placed in the main (default) group. On update, if not provided, the existing group assignment is kept.
commentsvarchar(255)Internal comment visible only on the statuses settings page.



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
status_idintID of the created or updated status.



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