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
| Name | Type | Required | Description |
|---|---|---|---|
| id | int64 | yes | Unique 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
variablesfield 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 exampleJohn,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:
- Look up the value in the
variablesfield of the message by placeholder name (text between curly braces) - If the placeholder name is
customer.name, then perform a customer details lookup using thecustomerIdfield of a message to get a value for the placeholder replacement - If the placeholder name is
greeting, then resolve it using the same lookup ascustomer.name:- if
customer.nameandpersonalGreetingare defined, then usepersonalGreetingfor the placeholder replacement. This value can contain the{customer.name}placeholder; if so, replace it with thecustomer.namevalue. - if
customer.nameis not defined andgeneralGreetingis defined, then usegeneralGreetingfor the placeholder replacement
- if
- If no value is found for the placeholder, then report
errorstatus for a message, mentioning indetailswhich placeholder was not found. All placeholder names without corresponding variable values must be reported in a single event.