Close a Return
Mark the customer's own return (RMA) request as Solved and add a note to the conversation thread. The response carries the updated return. A return can only be closed when its canClose flag is true.
Endpoint
POST /api/shop/returns/{id}/closeAuthentication
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 close. 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 closing — 3 (Solved). |
statusTitle | string | Status label, e.g. Solved. |
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 — incremented by the close note. |
updatedAt | string | ISO 8601 last update timestamp. |
Status Codes
| Status | Meaning |
|---|---|
200 OK | Return closed (solved). |
400 Bad Request | The return cannot be closed in its current state. |
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. |

