Response messages

The shared localized response-message contract for CTX actions.

CTX actions use a shared code-first response-message contract. Clients branch on code; human-facing text comes from message in the resolved locale.

Field

Contract

code

Stable machine-readable result code. This is the durable integration contract.

message

Localized human text for the resolved response locale. Do not branch application logic on this field.

locale

Locale used to resolve the message.

params

Sorted key/value placeholders used to render the localized message.

json
{
  "code": "STOREFRONT_CONTACT_SUBJECT_TOO_LONG",
  "message": "Subject must be 150 characters or less.",
  "locale": "en",
  "params": [{ "key": "max", "value": "150" }]
}
json
{
  "response": {
    "code": "STOREFRONT_CUSTOMER_LOGIN_SUCCESS",
    "message": "Signed in successfully.",
    "locale": "en",
    "params": []
  }
}

Gate page outcomes#

The canonical hosted-action envelope on this page does not apply to /notify, /password, or /unlock. Those routes redirect or render HTML, with localized outcomes in gate section settings. See Gate actions.

When the storefront is gated, a hosted or runtime action the gate closes (and any other background request) is refused with success: false, the gate in storefront_status and one entry in user_errors: STOREFRONT_PASSWORD_REQUIRED (HTTP 401), STOREFRONT_COMING_SOON (HTTP 403) or STOREFRONT_MAINTENANCE (HTTP 503 with Retry-After). Reload the page so the visitor sees the gate page. See Gate pages.