Skip to main content

Get Message Settings

This endpoint returns information about message content templates for different languages and communication channels, expiration information, greeting settings, and other settings.

Request

GET <API base URL>/settings/{id}

URL query parameters

NameTypeRequiredDescription
idint64yesUnique settings identifier

Response

On success:

{
"reference": optional string, // Reference to an external entity
"delivery": optional {
"expiresAt": optional string // Expiration UTC timestamp in ISO format.
// After that value, the message must not be sent.
},
"content": required { // Dictionary of content templates grouped by
"en": { // two-letter language code (ISO 639-1)
"greetings": optional {
"general": optional string,
"personal": optional string,
},
"messenger": optional {
"text": optional string,
"image": optional string,
"button": optional {
"text": required string,
"url": required string
},
},
"sms": optional {
"text": required string
},
"inApp": optional {
"name": optional string,
"description": optional string,
"image": optional string,
"button": optional {
"text": required string,
"url": required string
},
"notification": optional {
"title": required string,
"body": required string,
}
},
"email": optional {
"subject": required string,
"body": required string
}
},
"de": {
...
},
}
}

Example:

{
"reference":"b776cecf-658a-4721-89fd-11b54907e095",
"delivery":{
"expiresAt":"2021-12-31T00:00:00Z"
},
"content":{
"en":{
"greetings": {
"general": "Dear customer!",
"personal": "Hello, {customer.name}!"
},
"messenger":{
"text":"Guaranteed cashback for all purchases in stores and online!\n\n1% Bonuses for ALL purchases made online and via payment terminal with DemoBank card.",
"image":"https://cdn.s1mpl.com/img/IO",
"button": {
"text":"Details",
"url":"https://t.s1mpl.com/c/{tid}/CX"
}
},
"sms":{
"text":"Guaranteed cashback for all purchases in stores and online! Details: https://t.s1mpl.com/c/{tid}/CX"
}
}
}
}

Variables Handling

All values in content fields for each language can contain placeholders for variable values (image URL, name, text, etc.). Placeholders are marked with curly braces, for example {someVar}. Before sending a message to a particular customer, all placeholders must be replaced by the corresponding variable values defined in the message for that customer. There are several types of variables:

  • variables defined in the variables field of a message
  • special variable customer.name - this variable must be evaluated on the client (issuer) side by performing a customer details lookup using the customer identifier specified in a message. The value of this variable should be information about how the client prefers to be addressed, for example John, Mr. Edwards, etc.
  • special variable greeting - used to generate a greeting phrase

Each placeholder must be replaced by a value using the following rules in the defined order:

  1. Look up the value in the variables field of the message by placeholder name (text between curly braces)
  2. If the placeholder name is customer.name, then perform a customer details lookup using the customerId field of a message to get a value for the placeholder replacement
  3. If the placeholder name is greeting, then resolve it using the same lookup as customer.name:
    • if customer.name and personalGreeting are defined, then use personalGreeting for the placeholder replacement. This value can contain the {customer.name} placeholder; if so, replace it with the customer.name value.
    • if customer.name is not defined and generalGreeting is defined, then use generalGreeting for the placeholder replacement
  4. If no value is found for the placeholder, then report error status for a message, mentioning in details which placeholder was not found. All placeholder names without corresponding variable values must be reported in a single event.