Skip to content

File an EU Withdrawal

Record an EU right-of-withdrawal declaration against one of the authenticated customer's own orders. The declaration is created with status received and the durable-medium confirmation email is triggered.

Filing is idempotent — a second call for the same order returns the existing declaration instead of creating a duplicate.

Endpoint

POST /api/shop/eu-withdrawals

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)

Request Body

json
{
  "order_id": 12,
  "reason_text": "Changed my mind."
}

Request Parameters

ParameterTypeRequiredDescription
order_idintegerYesThe numeric ID of one of the customer's own orders.
reason_textstringNoAn optional reason for withdrawing.

Response Fields (201 Created)

FieldTypeDescription
idintegerDeclaration ID.
uuidstringStable public identifier for the declaration.
orderIdintegerNumeric ID of the order the withdrawal applies to.
orderIncrementIdstringHuman-readable order number.
isGuestbooleanWhether the declaration was filed on a guest order.
customerEmailstringEmail address tied to the declaration.
statusstringDeclaration status: received, declined, refunded.
reasonTextstringThe reason the shopper supplied, or null.
receivedAtstringISO 8601 timestamp when the declaration was received.
confirmationSentAtstringISO 8601 timestamp when the confirmation email was sent, or null.
declinedAtstringISO 8601 timestamp when the withdrawal was declined, or null.
declinedReasonstringReason the store declined the withdrawal, or null.
refundedAtstringISO 8601 timestamp when the order was refunded, or null.
refundNotestringNote attached to the refund, or null.
createdAtstringISO 8601 creation timestamp.
updatedAtstringISO 8601 last update timestamp.

Status Codes

StatusMeaning
201 CreatedDeclaration filed (or the existing one returned); status is received.
400 Bad Requestorder_id is missing.
401 UnauthorizedMissing or invalid customer Bearer token.
403 ForbiddenMissing or invalid storefront key.
404 Not FoundThe order is not the customer's, or the channel does not have EU withdrawal enabled.

Released under the MIT License.