Skip to content

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

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 cancel. 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 the cancel.
statusTitlestringStatus label, e.g. Canceled.
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 on the return.
updatedAtstringISO 8601 last update timestamp.

Status Codes

StatusMeaning
200 OKReturn canceled.
400 Bad RequestThe return is already canceled.
401 UnauthorizedMissing or invalid customer Bearer token.
403 ForbiddenMissing or invalid storefront key.
404 Not FoundThe return does not exist or is not the customer's.

Released under the MIT License.