addOrderReturnStatus
Creates a new order return 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_id | int | Status ID. Provide to update an existing status. Leave empty or omit when creating a new status. |
| name | varchar(100) | Status name (basic) - displayed in the panel. |
| name_for_customer | text | Full status name displayed to the customer on the return page. Accepts a plain string (applied to the user's language) or a JSON-encoded string with language codes as keys for multilingual support, e.g. "{\"en\": \"Return accepted\", \"de\": \"Retoure akzeptiert\"}". If omitted on create, defaults to the name value. The total serialized JSON length is limited to 1000 characters. |
| color | varchar(7) | Status color in hex format (e.g., "#FF0000"). |
| group_id | int | Status group ID. If omitted on create, the status is placed in the main (default) group. On update, if not provided, the existing group assignment is kept. |
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 |
| status_id | int | ID of the created or updated status. |
Sample
Input data:Output data:
A sample request in PHP: