Developers

Orders

Markdown

Notify the order customer

Sends the customer of an order an email in the store name, or a fixed text message from the merchant's package.

POST/stores/{storeId}/v1/orders/{id}/notifications

An email has your own subject (3 to 160 characters) and body (up to 5,000 characters), appears in the order's message log, and is limited to 60 messages an hour per store.

A text message has fixed wording, because the sender is a registered service sender, so free text is not accepted. Choose a template: order_shipped, out_for_delivery or delivered. Each template goes once per order and is charged to the merchant's message package, and the merchant can turn any of them off.

The status of a text message is sent, already_sent (sent before and not charged again) or retrying (the store is retrying by itself, so do not send it again). The status of an email is sent, pending (the store is retrying by itself, so do not send it again) or failed (it could not be delivered and the store stopped trying). See Marketing and customer messages.

Path parameters

idstringrequired

Headers

Idempotency-Keystringrequired

Response

dataobjectrequired
order_idstring
channelstring
email sms
templatestring
order_shipped out_for_delivery delivered
statusstring
For a text message: sent, already_sent or retrying. For an email: sent, pending or failed.
executionobject
Who executed the request: the app, version, installation and store. Field names here are camelCase.
appIdstring (uuid)
versionIdstring (uuid)
installationIdstring (uuid)
storeIdstring (uuid)
requestIdstring (uuid)
generationinteger
routeEpochinteger
appAuthEpochinteger
grantRevisioninteger
metaobjectrequired
request_idstring (uuid)
The request ID; include it in any support request.

Errors

HTTPCodeMeaning
400IDEMPOTENCY_KEY_REQUIREDNo Idempotency-Key header.
404RESOURCE_NOT_FOUNDThe ID does not exist in this store.
409CUSTOMER_EMAIL_MISSINGThe order has no customer email.
409CUSTOMER_PHONE_MISSINGThe order has no valid customer phone.
409SMS_NOT_ENABLEDThe merchant turned this message off, or the store has no message package.
409SMS_NO_BALANCEThe merchant's message package is empty.
409SMS_NOT_SENTThe message could not be sent.
409SHIPPING_ORDER_NOT_ELIGIBLEA text message for an order that is unpaid, cancelled, refunded, or has nothing to ship.
422INVALID_NOTIFICATION_CHANNELchannel is not email or sms.
422INVALID_NOTIFICATION_TEMPLATEUnknown template.
422INVALID_INPUTThe email subject or body is outside its limits.
429MESSAGE_LIMIT_REACHEDThe store reached 60 emails this hour.
403SCOPE_REQUIREDThe token does not carry the required scope.
503APPS_SCOPE_RUNTIME_NOT_READYThe resource is not enabled on this merchant's store yet.

Shared codes are listed in Errors.

    ↑↓ moveEnter openEsc close