[POST] .../v1/retailreturnreason/add
Creates a return reason. Use this method to create a retail return reason before it is used in POS return workflows or return reporting. It creates one reason and returns new_id after validating a non-empty name up to 150 characters, optional description up to 300 characters and optional enabled state. The caller must have retail return reason add permission; missing body, invalid fields, denied access, duplicate or storage validation failures and persistent errors are returned as HTTP 200 ErrorResult business errors.
Request Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| description | String | Optional | Additional description. When provided, it must be no longer than 300 characters. |
| enabled | Boolean | Optional | Indicates whether the return reason is available for use. |
| name | String | Required | Return reason name. It cannot be empty and must be no longer than 150 characters. |
Request Example
{
"name": "Damaged item",
"description": "Item was damaged before sale completion",
"enabled": true
}
Response Parameters
| Name | Type | Description |
|---|---|---|
| ok | Boolean | Indicates whether the request completed successfully. |
| result | Insert | Created record result. |
Response Example
{
"ok": true,
"result": {
"new_id": 6
}
}