Cancel a Return
Cancel the customer's own return (RMA) request, unless it is already canceled. The response carries the updated return with its new status and action flags.
Endpoint
POST /api/shop/returns/{id}/cancelAuthentication
This endpoint requires an authenticated customer — send the storefront key and a customer Bearer token. See the Authentication page.
Request Headers
| Header | Required | Description |
|---|---|---|
Content-Type | Yes | application/json |
X-STOREFRONT-KEY | Yes | Your storefront API key |
Authorization | Yes | Bearer token (customer login required) |
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
id | integer | Yes | Id of the return to cancel. Must belong to the authenticated customer. |
Request Body
No body is required — send an empty body.
Response Fields (200 OK)
| Field | Type | Description |
|---|---|---|
id | integer | Return ID. |
orderId | integer | Id of the order the item belongs to. |
orderIncrementId | string | Human-readable order number. |
statusId | integer | Numeric status id after the cancel. |
statusTitle | string | Status label, e.g. Canceled. |
statusColor | string | Hex color for the status badge. |
canClose | boolean | Whether the return can be closed. |
canReopen | boolean | Whether the return can be reopened. |
isExpired | boolean | Whether the return is past its action window. |
messagesCount | integer | Number of conversation messages on the return. |
updatedAt | string | ISO 8601 last update timestamp. |
Status Codes
| Status | Meaning |
|---|---|
200 OK | Return canceled. |
400 Bad Request | The return is already canceled. |
401 Unauthorized | Missing or invalid customer Bearer token. |
403 Forbidden | Missing or invalid storefront key. |
404 Not Found | The return does not exist or is not the customer's. |

