Skip to content

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}/close

Authentication ​

This endpoint requires an authenticated customer — send the storefront key and a customer Bearer token. See the Authentication page.

Request Headers ​

HeaderRequiredDescription
Content-TypeYesapplication/json
X-STOREFRONT-KEYYesYour storefront API key
AuthorizationYesBearer token (customer login required)

Path Parameters ​

ParameterTypeRequiredDescription
idintegerYesId 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) ​

FieldTypeDescription
idintegerReturn ID.
orderIdintegerId of the order the item belongs to.
orderIncrementIdstringHuman-readable order number.
statusIdintegerNumeric status id after closing — 3 (Solved).
statusTitlestringStatus label, e.g. Solved.
statusColorstringHex color for the status badge.
canClosebooleanWhether the return can be closed.
canReopenbooleanWhether the return can be reopened.
isExpiredbooleanWhether the return is past its action window.
messagesCountintegerNumber of conversation messages — incremented by the close note.
updatedAtstringISO 8601 last update timestamp.

Status Codes ​

StatusMeaning
200 OKReturn closed (solved).
400 Bad RequestThe return cannot be closed in its current state.
401 UnauthorizedMissing or invalid storefront key.
403 ForbiddenMissing or invalid customer Bearer token.
404 Not FoundThe return does not exist or is not the customer's.

Released under the MIT License.