Response messages#
CTX actions and Storefront GraphQL mutation payloads use a shared code-first response-message contract. Clients branch on code; human-facing text comes from message in the resolved locale.
Field |
Contract |
|---|---|
|
Stable machine-readable result code. This is the durable integration contract. |
|
Localized human text for the resolved response locale. Do not branch application logic on this field. |
|
Locale used to resolve the message. |
|
Sorted key/value placeholders used to render the localized message. |
graphql
type ResponseMessage {
code: String!
message: String!
locale: String!
params: [ResponseParam!]!
}
type ResponseParam {
key: String!
value: String!
}
json
{
"response": {
"code": "STOREFRONT_CUSTOMER_LOGIN_SUCCESS",
"message": "Signed in successfully.",
"locale": "en",
"params": []
}
}