...
Authorization token
is required
Request-Body
Property | Type | Description | Default | Mandatory field for activation |
---|---|---|---|---|
newsType | number | Message type (mandatory field for creating an entry, cannot be changed later) 0 = Push message | 0 | Yes |
title | string | Headline (max. 64 characters) | "" | Yes (except teaser) |
text | string | Message text to be displayed in the "News" tab. (max. 160 characters) | "" | Yes (except teaser) |
urlType | string | Type of URL specified | "" | No |
url | string | URL to be opened on click (max. 160 characters) | "" | Yes, if "urlType" is specified |
image_url | string | relative path to teaser image (relative from user/appdata/images ) | "" | Yes, if message is of type teaser |
validFrom | number | Timestamp from which message should be displayed | 0 | Yes |
validUntil | number | Timestamp up to which the message should be displayed | 0 | Yes |
active | bool | Switch so that the message is actively distributed to devices. Sending push messages must also be triggered by a separate endpoint. | false | Yes |
* All mandatory fields must be set correctly for a message to be activated.
...
If an error occurred, a 400 code is returned.
Error code | Description |
---|---|
400 | Faulty content. Exact reason for the error within the response body |
Editing an existing message
...
Authorization token
is required
Request-Body
Property | Type | Description | Default | Mandatory field for activation |
---|---|---|---|---|
title | string | Headline | "" | Yes (except teaser) |
text | string | News text to be displayed in the "News" tab | "" | Yes (except teaser) |
urlType | string | Type of the specified URL "internal-login" = The specified URL is called within the app. The authentication token sent with the URL means that the user (if logged in to the app) is logged in directly to the store | "" | No |
url | string | URL to be opened on click | "" | Yes, if urlType is specified |
image_url | string | relative path to teaser image (relative from user/appdata/images ) | "" | Yes, if message is of type teaser |
validFrom | number | Timestamp from which message should be displayed | 0 | Yes |
validUntil | number | Timestamp up to which the message should be displayed | 0 | Yes |
active | bool | Switch so that the message is actively distributed to devices. Sending push messages must also be triggered by a separate endpoint. | false | Yes |
* All mandatory fields must be set correctly for a message to be activated.
...
If an error occurred, a 400 code is returned.
Error code | Description |
---|---|
400 | Faulty content. Exact reason for the error within the response body |
404 | The entry with the specified ID does not exist. |
Sending a general push message
...
If an error occurred, a 400 code is returned.
Error code | Description |
---|---|
404 | The entry with the given ID does not exist. |
406 | The specified entry is not of type 'Push message', is not yet active or has already been sent. |
Sending a personalized message
...
Authorization token
is required
Request-Body
Property | Type | Description | Default | Mandatory field |
---|---|---|---|---|
name | string | Internal name of the push message for identification in the dispatch list | "" | Yes |
message | object | Object with all message information | {} | Yes |
message.title | string | Title* (max. 64 characters) | "" | Yes |
message.text | string | Message text to be displayed in the "News" tab* (max. 160 characters) | "" | Yes |
message.urlType | string | Type of URL specified | "" | No |
message.url | string | URL to be opened on click (max. 128 characters) | "" | Yes, if urlType is specified |
message.voucher | string | Batch ID of a voucher batch stored in the voucher generator | "" | No |
message.validUntil | number | Number of days the message should be displayed on the devices in the news section. (between 1 and 31) | 1 | Yes |
filter | object | Filter criteria for selecting recipients | {} | No |
filter.connected | bool | Filter criterion whether to send a push message only to connected devices (true), only to unconnected devices (false), or to all devices (filter not set). | not set | No |
filter.os_type | string | Filter on a specific operating system. | not set | No |
filter.email | array<string> | List of email addresses to be considered as recipients. | not set | No |
filter.zip | array<string> | Filter on postal code. Recipients must have one of the zip codes specified in the array in their billing address. | not set | No |
filter.zip_area | aray<object> | List of zip code areas where a recipient is located. This is only possible for recipients that have a purely numeric zip code in | not set | No |
filter.zip_area[n].from | number | Start of the zip code area to be filtered | not set | No |
filter.zip_area[n].to | number | End of the zip code area to filter | not set | No |
* Provided the message is sent to only connected devices, the content can be personalized.
The following tags are supported for this purpose:
Tag | Tag |
---|---|
~A-FirstName~ | First name |
~A-LastName~ | LastName |
~A-Street1~ | Street |
~A-Street2~ | Street suffix |
~A-Title~ | Title |
~A-Salutation~ | Salutation |
~A-City | City |
~A-Zip~ | Postal code |
~A-CompleteSalutation~ | Salutation (generated by store) |
~VOUCHER-Number~ | Personalized voucher number (if a batch ID was specified) |
Example Request-Body
Send a personalized message with the name "Hello" to store customers living within Nuremberg (zip codes 90402 to 90491).
A personalized voucher from the batch "appvoucher" is to be included. This message is to be read in the news for the next 30 days.
...
If an error occurred, a 400 code is returned.
Error code | Description |
---|---|
400 | The passed content is faulty. |
Status request for sending a personalized push message
...
Code Block | ||
---|---|---|
| ||
{ "id": 66, "status": 2, "subshop": "Deutsch", "type": 1, "name": "Hallo", "createTime": "1574870841", "updateTime": "1574870941", "validUntil": "30", "title": "Nachrichten Titel", "text": "Nachrichteninhalt", "url": "internal-login", "urlType": "https://www.domain.de/?voucher_number=~VOUCHER-Number~", "voucher": "appvoucher", "countReceiver": 10, "countSent": 3, "countError": 1, "error": "", "filter": { ... } } |
Field description
Field name | Description |
---|---|
id | ID of the push message |
status | Status of the dispatch Possible values: |
subshop | Subshop for which the message was created |
type | Type of push message: |
name | Internal name of the push message for identification in the shipping list |
createTime | Timestamp when the push message was created |
updateTime | Timestamp when the entry was last updated |
validUntil | Number of days the message should be displayed on the devices in the news section |
title | Message title |
text | Message text |
urlType | Type of the specified URL |
url | URL to be opened on click |
voucher | Specified batch ID of the voucher to be personalized |
countReceiver | Total number of recipients who should receive the push message |
countSent | Number of push messages already sent |
countError | Number of failed delivery attempts |
error | Error text (if sending was aborted by error) |
If an error has occurred, a 400 code is returned.
Error code | Description |
---|---|
400 | The passed content is faulty |
404 | No entry found with the specified ID |
Include Page | ||||
---|---|---|---|---|
|