{
"header" : {
"resultCode" : 40401,
"resultMessage" : "Client Error. Not found. messageId<3496615188236841>",
"isSuccessful" : false
}
}
If integration with ‘Log&Crash Search’ is added as scheduled, message delivery can be recorded at a user’s ‘Log&Crash Search’.
- Channel has been deleted from v2.0 API. Channel served as a grouper of tokens: one token was restricted to be included to only one channel.
Channel is to be replaced with Tag as of June 2017. One token can have many tags.
- Register Token API, and Channel field deleted
- 'Channel' type from target.type of Send Message API deleted
- Channel API deleted
API Endpoint: https://api-push.cloud.toast.com
Collect Receipt/Check Messages Endpoint: https://collector-push.cloud.toast.com
Header
X-Secret-Key: [a-zA-Z0-9]{8}
Go to console and click Notification > Push, then click URL & AppKey at the top right to create.
200 OK. Respond with 200 OK to all API requests. Can find detailed response results at the Header of Response Body.
{
"header" : {
"isSuccessful" : true,
"resultCode": 0,
"resultMessage" : "SUCCESS"
}
}
isSuccessful | resultCode | resultMessage |
---|---|---|
true | 0 | SUCCESS |
false | 40001 | Client Error. Parameter is invalid. |
false | 40002 | Client Error. Parameter is invalid format. |
false | 40003 | Client Error. Parameter is empty or null. |
false | 40004 | Client Error. Duplicate certificate. |
false | 40005 | Client Error. Expired certificate. |
false | 40006 | Client Error. Already registered. |
false | 40007 | Client Error. Maximum limit exceeded. |
false | 40008 | Client Error. Already completed. |
false | 40101 | Client Error. Access is not allowed. |
false | 40102 | Client Error. Unavailable key. |
false | 40401 | Client Error. Not found. |
false | 50001 ~ 50501 | Internal Error. Please report this. 'http://cloud.toast.com/support/faq'. |
false | 400 | Client Error. Error of Client occurred at a tag API. |
false | 500 | Internal Error. Internal error occurred at a tag API. |
POST /push/v2.0/appkeys/{appkey}/tokens
Content-Type: application/json;charset=UTF-8
Field | Usage | Description |
---|---|---|
appkey | Required, String | Path Variable, Appkey issued on Enable |
{
"oldToken": "oldToken",
"token": "token",
"isNotificationAgreement": true,
"isAdAgreement": true,
"isNightAdAgreement": true,
"pushType": "GCM",
"timezoneId": "Asia/Seoul",
"uid": "uid",
"country": "KR",
"language": "ko",
"deviceId": "X3LOdJSQdNzCCvcbiSPZTGK1M9srPU5EumRD"
}
Field | Usage | Description |
---|---|---|
token | Required, String | Token, the maximum length is 1,600 |
oldToken | Optional, String | Old token, the maximum length is 1,600 |
pushType | Required, String | 'GCM', 'APNS', 'APNS_SANDBOX', 'TENCENT', 'APNS_VOIP', 'APNS_SANDBOXVOIP', and 'ADM' |
isNotificationAgreement | Required, Boolean | True or false |
isAdAgreement | Required, Boolean | True or false |
isNightAdAgreement | Required, Boolean | True or false |
timezoneId | Required, String | Area/Name. IANA time zone database. |
country | Required, String | ISO 3166-1 alpha-2, ISO 3166-1 alpha-3, 3 bytes |
language | Required, String | ISO 639-1, ISO 639-2, iOS (language code + script code), 8 bytes |
uid | Required, String | User ID, no emojis allowed, no more than 64 bytes |
deviceId | Optional, String | Device ID, 36 bytes |
{
"header" : {
"isSuccessful" : true,
"resultCode": 0,
"resultMessage" : "SUCCESS"
}
}
curl -X POST -H "Content-Type: application/json;charset=UTF-8" https://api-push.cloud.toast.com/push/v2.0/appkeys/{appkey}/tokens -d '{"oldToken":"oldToken","token":"token","isNotificationAgreement":true,"isAdAgreement":true,"isNightAdAgreement":true,"pushType":"GCM","timezoneId":"Asia/Seoul","uid":"uid","country":"KR","language":"ko"}'
GET /push/v2.0/appkeys/{appkey}/tokens/{token}?pushType={pushType}
Content-Type: application/json;charset=UTF-8
Field | Usage | Description |
---|---|---|
appkey | Required, String | Path Variable, Appkey issued on Enable |
pushType | Required, String | 'GCM', 'APNS', 'APNS_SANDBOX', 'TENCENT', 'APNS_VOIP', 'APNS_SANDBOXVOIP', and 'ADM' |
{
"token" : {
"pushType" : "GCM",
"isNotificationAgreement": true,
"isAdAgreement": true,
"isNightAdAgreement": true,
"timezoneId" : "Asia/Seoul",
"country": "KR",
"language": "ko",
"uid" : "User ID",
"token" : "Token",
"updateDateTime": "2017-08-12T01:04:18.000+09:00",
"adAgreementDateTime": "2017-08-12T01:04:19.000+09:00",
"nightAdAgreementDateTime": "2017-08-12T01:04:19.000+09:00"
},
"header" : {
"isSuccessful" : true,
"resultCode": 0,
"resultMessage" : "SUCCESS"
}
}
Field | Usage | Description |
---|---|---|
updateDateTime | -, DateTime String | Date/time of a token update |
adAgreementDateTime | -, DateTime String | Date/time agreeing to receive ad push messages |
nightAdAgreementDateTime | -, DateTime String | Date/time agreeing to receive night-time ad push messages |
curl -X GET -H "Content-Type: application/json;charset=UTF-8" https://api-push.cloud.toast.com/push/v2.0/appkeys/{appkey}/tokens/token?pushType=GCM
GET /push/v2.0/appkeys/{appkey}/tokens?uid={uid}
Content-Type: application/json;charset=UTF-8
X-Secret-Key: [a-zA-Z0-9]{8}
Field | Usage | Description |
---|---|---|
appkey | Required, String | Path Variable, Appkey issued on Enable |
uid | Required, String | User ID to get |
{
"tokens": [{
"pushType" : "GCM",
"isNotificationAgreement": true,
"isAdAgreement": true,
"isNightAdAgreement": true,
"timezoneId" : "Asia/Seoul",
"country": "KR",
"language": "ko",
"uid" : "User ID",
"token" : "Token",
"updateDateTime": "2017-08-12T01:04:18.000+09:00",
"adAgreementDateTime": "2017-08-12T01:04:19.000+09:00",
"nightAdAgreementDateTime": "2017-08-12T01:04:19.000+09:00"
}],
"header" : {
"isSuccessful" : true,
"resultCode": 0,
"resultMessage" : "SUCCESS"
}
}
curl -X GET -H "Content-Type: application/json;charset=UTF-8" -H "X-Secret-Key: SECRET_KEY" https://api-push.cloud.toast.com/push/v2.0/appkeys/{appkey}/tokens?uid=uid
GET /push/v2.0/appkeys/{appkey}/invalid-tokens?pageIndex={pageIndex}&pageSize={pageSize}&from={from}&to={to}&messageId={messageId}
Content-Type: application/json;charset=UTF-8
X-Secret-Key: [a-zA-Z0-9]{8}
Field | Usage | Description |
---|---|---|
appkey | Required, String | Path Variable, Appkey issued on Enable |
pageIndex | Optional, Number | Default is 0 |
pageSize | Optional, Number | Default is 25; Max 100 |
from | Optional, DateTime String | Up to the latest 30 days (ISO 8601, e.g. YYYY-MM-DDThh:mm:ss.SSSTZD, 2018-04-24T06:00:00.000%2B09:00) |
to | Optional, DateTime String | Up to the latest 30 days (ISO 8601, e.g. YYYY-MM-DDThh:mm:ss.SSSTZD, 2018-04-24T06:00:00.000%2B09:00) |
messageId | Optional, Number | Message ID with invalid token |
N/A
{
"header" : {
"resultCode" : 0,
"resultMessage" : "SUCCESS",
"isSuccessful" : true
},
"invalidTokens" : [{
"messageId" : 0,
"uid" : "uid",
"token" : "invalid-token",
"pushType" : "GCM",
"createdDateTime" : "2017-02-08T19:39:04.000+09:00"
}
]
}
curl -X GET -H "Content-Type: application/json;charset=UTF-8" -H "X-Secret-Key: SECRET_KEY" https://api-push.cloud.toast.com/push/v2.0/appkeys/{appkey}/invalid-tokens
This API has been deprecated. Please use API v2.4 or higher.
GET /push/v2.0/appkeys/{appkey}/statistics/token-properties?from={from}&to={to}&tokenProperties={tokenProperties}
Content-Type: application/json;charset=UTF-8
X-Secret-Key: [a-zA-Z0-9]{8}
Field | Usage | Description |
---|---|---|
appkey | Required, String | Path Variable, Appkey issued on Enable |
from | Optional, DateTime String | Up to the latest 30 days (ISO 8601, e.g. YYYY-MM-DDThh:mm:ss.SSSTZD, 2018-04-24T06:00:00.000%2B09:00) |
to | Optional, DateTime String | Up to the latest 30 days (ISO 8601, e.g. YYYY-MM-DDThh:mm:ss.SSSTZD, 2018-04-24T06:00:00.000%2B09:00) |
tokenProperties | Optional, String Array | 'agreement', 'country', 'language', 'timezoneId' Delimited by ',', e.g. tokenProperties=country,language |
N/A
{
"tokenPropertiesStatistics" : [{
"dateTime" : "2016-07-11 17:50:00.00+9:00",
"countries" : {
"KR" : 100,
"JP" : 60,
"CN" : 100
},
"languages" : {
"ko" : 90,
"ja" : 60,
"zh" : 100
},
"timezoneIds": {
"Asia/Seoul": 260
},
"agreements": {
"ON": 260
}
}, {
"dateTime" : "2016-07-11 17:51:00.00+9:00",
"countries" : {
"KR" : 100,
"JP" : 60,
"CN" : 100
},
"languages" : {
"ko" : 90,
"ja" : 60,
"zh" : 100
},
"timezoneIds": {
"Asia/Seoul": 260
},
"agreements": {
"ON": 260
}
}
],
"header" : {
"isSuccessful" : true,
"resultCode" : 0,
"resultMessage" : "SUCCESS"
}
}
Field | Usage | Description |
---|---|---|
dateTime | String | Time of data collection |
agreements | String | 'ON'(receive all), 'NIGHT_AD_OFF' (reject night-time ad messages), 'AD_OFF' (reject ad messages), 'OFF' (reject all) |
countries.XX | String | ISO 3166-1 alpha-2, ISO 3166-1 alpha-3, 3 bytes |
languages.XX | String | ISO 639-1, ISO 639-2, iOS(language code + script code), 8 bytes |
timezoneIds.XX | String | Area/Name. IANA time zone database |
curl -X GET -H "Content-Type: application/json;charset=UTF-8" -H "X-Secret-Key: SECRET_KEY" https://api-push.cloud.toast.com/push/v2.0/appkeys/{appkey}/statistics/token-properties
This API has been deprecated. Please use API v2.4 or higher.
GET /push/v2.0/appkeys/{appkey}/statistics/token-registrations?from={from}&to={to}
Content-Type: application/json;charset=UTF-8
X-Secret-Key: [a-zA-Z0-9]{8}
Field | Usage | Description |
---|---|---|
appkey | Required, String | Path Variable, Appkey issued on Enable |
from | Optional, DateTime String | Up to the latest 30 days (ISO 8601, e.g. YYYY-MM-DDThh:mm:ss.SSSTZD, 2018-04-24T06:00:00.000%2B09:00) |
to | Optional, DateTime String | Up to the latest 30 days (ISO 8601, e.g. YYYY-MM-DDThh:mm:ss.SSSTZD, 2018-04-24T06:00:00.000%2B09:00) |
N/A
{
"tokenRegistrationStatistics" : [{
"dateTime" : "2016-07-11 17:50:00.00+9:00",
"registered" : 90,
"deleted" : 20
}, {
"dateTime" : "2016-07-11 17:51:00.00+9:00",
"registered" : 45,
"deleted" : 10
}
],
"header" : {
"isSuccessful" : true,
"resultCode" : 0,
"resultMessage" : "SUCCESS"
}
}
Field | Usage | Description |
---|---|---|
dateTime | String | Date and time of data collection |
registered | Number | Number of registered tokens |
deleted | Number | Number of deleted tokens |
curl -X GET -H "Content-Type: application/json;charset=UTF-8" -H "X-Secret-Key: SECRET_KEY" https://api-push.cloud.toast.com/push/v2.0/appkeys/{appkey}/statistics/token-registrations
※ Push messages sent by API cannot be retrieved in the console or by the Get or List API.
POST /push/v2.0/appkeys/{appkey}/messages
Content-Type: application/json;charset=UTF-8
X-Secret-Key: [a-zA-Z0-9]{8}
{
"target" : {
"type" : "UID",
"to": ["uid-1", "uid-2"]
},
"content" : {
"default" : {
"title": "title",
"body": "body"
}
},
"messageType" : "AD",
"contact": "1588-1588",
"removeGuide": "menu > setting",
"timeToLiveMinute": 1,
"provisionedResourceId": "id"
}
{
"message" : {
"messageId" : 0,
"messageIdString": "0"
},
"header" : {
"isSuccessful" : true,
"resultCode": 0,
"resultMessage" : "SUCCESS"
}
}
Field | Usage | Description |
---|---|---|
appkey | Required, String | Path Variable, Appkey issued on Enable |
target.type | Required, String | Type of receiving targets, such as 'ALL', 'UID', and 'TAG' |
target.to | Optional, String Array | target.type is the UID list of recipients (no more than 10,000) or tag condition |
target.pushTypes | Optional, String Array | 'GCM', 'APNS', 'APNS_SANDBOX', 'TENCENT', 'APNS_VOIP', 'APNS_SANDBOXVOIP', and 'ADM' |
target.countries | Optional, String Array | ISO 3166-1 alpha-2, ISO 3166-1 alpha-3 (up to 3 bytes) |
content | Required, Map | Messages to deliver to recipient (up to 8,192 bytes) |
content.default | Required, Map | For details, refer to ‘common message type’ below |
content.default.title | Optional, String | |
content.default.body | Optional, String | |
messageType | Required, String | NOTIFICATION, AD |
contact | Optional, String | Required if the messageType is AD. Only numbers (0-9) and hyphens are available. |
removeGuide | Optional, String | Required if the messageType is AD. |
timeToLiveMinute | Optional, Number | The unit is minute, ranged from 1 to 60. Default is 10. |
provisionedResourceId | Optional, String | Refers to a provisioned resource ID. Contact: support@cloud.toast.com |
curl -X POST -H "Content-Type: application/json;charset=UTF-8" -H "X-Secret-Key: SECRET_KEY" https://api-push.cloud.toast.com/push/v2.0/appkeys/{appkey}/messages -d '{"target":{"type":"UID","to":["uid"]},"content":{"default":{"title":"title","body":"body","customKey1":"It is default"},"ko":{"title":"제목","body":"내용","customKey2":"한국어 입니다."}},"messageType":"AD","contact":"1588-1588","removeGuide":"매뉴 > 설정","timeToLiveMinute":1}'
When “content” has messages written as below, messages are created for each push type before delivered.
Reserved Word | Platform | Usage | GCM | APNS | TENCENT | ADM |
---|---|---|---|---|---|---|
title | Android, iOS Watch, Tencent, ADM |
Optional, String | data.title | aps.alert.title | title | data.title |
body | Android, iOS, Tencent, ADM |
Optional, String | data.body | aps.alert.body | content | data.body |
title-loc-key | iOS | Optional, String | - | aps.alert.title-loc-key | - | - |
title-loc-args | iOS | Optional, Array of Strings | - | aps.alert.title-loc-args | - | - |
action-loc-key | iOS | Optional, String | - | aps.alert.action-loc-key | - | - |
loc-key | iOS | Optional, String | - | aps.alert.loc-key | - | - |
loc-args | iOS | Optional, Array of String | - | aps.alert.loc-args | - | - |
launch-image | iOS | Optional, String | - | aps.alert.launch-image | - | - |
badge | iOS | Optional, Number | - | aps.badge | - | - |
sound | Android, iOS, Tencent, ADM |
Optional, String | data.sound | aps.sound | custom_content.sound | data.sound |
content-available | iOS | Optional, String | - | aps.content-available | - | - |
category | iOS | Optional, String | - | aps.category | - | - |
mutable-content | iOS | Optional, String | - | aps.mutable-content | - | - |
consolidationKey | ADM | Optional, String | - | - | - | consolidationKey |
expiresAfter | ADM | Optional, Number | - | - | - | expiresAfter |
messageDeliveryReceipt | Android, iOS, Tencent |
Unnecessary | - | - | - | - |
messageDeliveryReceiptData | Android, iOS, Tencent |
Unnecessary | - | - | - | - |
Reserved Word, when a message is created, is set at appropriate locations for each platform. User cannot change data type or locations as they want. User-defined words can be specified in the Custom Key/Value field as below:
Word | Platform | Usage | GCM | APNS | TENCENT | ADM |
---|---|---|---|---|---|---|
customKey | Android, iOS, Tencent |
Optional, Object, Array, String, Number |
data.customKey | customKey | custom_content.customKey | data.customKey |
Below is an example of sending messages to all registered targets.
{
"target" : {
"type" : "ALL"
},
"content" : {
"default" : {
"title": "title",
"body": "body"
}
},
"messageType" : "NOTIFICATION"
}
Below is an example of sending messages to specific users based on their IDs.
{
"target" : {
"type" : "UID",
"to": ["uid-01", "uid-02"]
},
"content" : {
"default" : {
"title": "title",
"body": "body"
}
},
"messageType" : "NOTIFICATION"
}
.Below is an example of sending messages to users of particular countries or devices (like Android or iOS).
{
"target" : {
"type" : "ALL",
"countries": ["KR", "JP"],
"pushTypes": ["GCM", "APNS"]
},
"content" : {
"default" : {
"title": "title",
"body": "body"
}
},
"messageType" : "NOTIFICATION"
}
Below is an example of conversion rule, applied for each push type for sending messages:
{
"target" : {
"type" : "ALL"
},
"content" : {
"default" : {
"title": "title",
"body": "body",
"badge": 1,
"customKey": "value"
}
},
"messageType" : "NOTIFICATION"
}
{
"data": {
"title": "title",
"body": "body",
"customKey": "value"
}
}
{
"aps": {
"alert": {
"title": "title",
"body": "body"
},
"badge": 1
},
"customKey": "value"
}
{
"title": "title",
"body": "body",
"custom_content": {
"customKey": "value"
}
}
{
"data": {
"title": "title",
"body": "body",
"customKey": "value"
}
}
Below is an example of advertising words to be added for ad messages.
{
"target" : {
"type" : "ALL"
},
"content" : {
"default" : {
"title": "Special Event for Friday",
"body": "Now order at 50% off the price!"
}
},
"messageType" : "AD",
"contact": "1588",
"removeGuide": "Menu > Set Notifications"
}
{
"data": {
"title": "(AD) Special Event for Friday 1588",
"body": "Now order at 50% off the price!\n Menu > Set notifications"
}
}
{
"aps": {
"alert": {
"title": "(AD) Special Event for Friday 1588",
"body": "Now order at 50% off the price!\n Menu > Set notification"
}
}
}
{
"data": {
"title": "Special Event for Friday",
"body": "Now order at 50% off the price!"
}
}
{
"aps": {
"alert": {
"title": "Special Event for Friday",
"body": "Now order at 50% off the price!"
}
}
}
Below shows an example of sending messages in various languages.
{
"target" : {
"type" : "ALL"
},
"content" : {
"default" : {
"title": "title",
"body": "body",
"customKey": "value"
},
"ko" : {
"title": "title",
"body": "body",
"customKey": "Set for such language codes starting with'ko' or 'ko-'."
},
"ja" : {
"title": "タイトル",
"body": "プッシュ・メッセージ"
}
},
"messageType" : "NOTIFICATION"
}
{
"data": {
"title": "title",
"body": "body",
"customKey": "Set for the language codes starting with'ko'or 'ko-'."
}
}
{
"data": {
"title": "title",
"body": "body",
"customKey": "Set for the language codes starting with'ko'."
}
}
{
"data": {
"title": "タイトル",
"body": "プッシュ・メッセージ",
"customKey": "value"
}
}
{
"data": {
"title": "title",
"body": "body",
"customKey": "value"
}
}
When the 'richMessage' field is defined at 'content', rich messages can be delivered.
Such messages can be sent along with Common, Ad, or Multi-Language Messages.
v1.7 or higher SDKs are required.
{
"target" : {
"type" : "ALL"
},
"content" : {
"default" : {
"title" : "title",
"body" : "body",
"richMessage" : {
"buttons" : [{
"name" : "Button Name",
"submitName": "Send Button Name",
"buttonType" : "REPLY | OPEN_APP | OPEN_URL | DISMISS",
"link" : "URL | ...",
"hint" : "Enter your message."
}
],
"media" : {
"sourceType" : "REMOTE | LOCAL",
"source" : "URL | LOCAL_RESOURCE",
"mediaType" : "IMAGE | GIF | VEDIO | AUDIO",
"extension" : "jpg | png",
"expandable" : true
},
"largeIcon" : {
"sourceType" : "REMOTE | LOCAL",
"source" : "URL | LOCAL_RESOURCE"
},
"group" : {
"key" : "KEY",
"description" : "Group of Notifications"
}
}
}
},
"messageType" : "NOTIFICATION"
}
Field | Usage | Description |
---|---|---|
richMessage | Optional, Object | Required for rich messages |
richMessage.buttons | Optional, Object Array | Buttons added for rich messages: up to 3. |
richMessage.button.name | Required, String | Button name |
richMessage.button.submitName | Optional, String | Send button name: shows when the button type on iOS is REPLY. |
richMessage.button.buttonType | Required, String | Button type: REPLY, OPEN_APP, OPEN_URL, or DISMISS |
richMessage.button.link | Required, String | Link connected at the press of the button |
richMessage.button.hint | Required, String | Hint for a button |
richMessage.media | Optional, Object | Media added for rich messages |
richMessage.media.sourceType | Required, String | Media location: REMOTE or LOCAL |
richMessage.media.source | Required, String | Address where media is located |
richMessage.media.mediaType | Required, String | Media type: IMAGE, GIF, VEDIO, or AUDIO. Android supports IMAGE only. |
richMessage.media.extension | Required, String | Extension of media file |
richMessage.media.expandable | Required, Boolean | Click to expand media on Android |
richMessage.largeIcon | Optional, Object | Large icons added for rich messages: only on Android. |
richMessage.largeIcon.sourceType | Required, String | Location of large icons: REMOTE or LOCAL |
richMessage.largeIcon.source | Required, String | Address where media is located |
richMessage.group | Optional, Object | Bind many messages into a group: only on Android |
richMessage.group.key | Required, String | Key of a group |
richMessage.group | Required, String | Description of a group |
※ Only the push messages sent using the console can be retrieved by the List API.
GET /push/v2.0/appkeys/{appkey}/messages?pageIndex={pageIndex}&pageSize={pageSize}&from={from}&to={to}&deliveryType={deliveryType}&messageStatus={messageStatus}
Content-Type: application/json;charset=UTF-8
X-Secret-Key: [a-zA-Z0-9]{8}
Field | Usage | Description |
---|---|---|
appkey | Required, String | Path Variable, Appkey issued on Enable |
pageIndex | Optional, Number | Default is 0 |
pageSize | Optional, Number | Default is 25; Max 100 |
from | Optional, DateTime String | Up to the latest 30 days (ISO 8601, e.g. YYYY-MM-DDThh:mm:ss.SSSTZD, 2018-04-24T06:00:00.000%2B09:00) |
to | Optional, DateTime String | Up to the latest 30 days (ISO 8601, e.g. YYYY-MM-DDThh:mm:ss.SSSTZD, 2018-04-24T06:00:00.000%2B09:00) |
deliveryType | Optional, String | 'INSTANT'(immediate delivery), 'RESERVATION'(scheduled delivery) |
messageStatus | Optional, String | 'READY', 'PROCESSING', 'COMPLETE', 'CANCEL_NO_TARGET', 'CANCEL_INVALID_CERTIFICATE', 'CANCEL_INVALID_MESSAGE', 'CANCEL_UNSUPPORTED_MESSAGE_TYPE', 'CANCEL_UNAUTHORIZED', 'CANCEL_UNKNOWN' |
N/A
{
"header" : {
"isSuccessful" : true,
"resultCode": 0,
"resultMessage" : "SUCCESS"
},
"messages" : [{
"messageId" : 0,
"messageIdString": "0",
"target" : {
"type" : "ALL"
},
"content" : {
"default" : {
"title": "title",
"body": "body"
}
},
"messageType" : "AD",
"contact": "1588-1588",
"removeGuide": "menu > setting",
"timeToLiveMinute": 60,
"createdDateTime": "2017-02-13T09:30:00.000+09:00",
"completedDateTime": "2017-02-13T09:30:00.000+09:00",
"targetCount": 1000,
"sentCount": 1000,
"messageStatus": "COMPLETE",
"provisionedResourceId": "[a-zA-Z0-9]{16}"
}],
"toatalCount": 1
}
curl -X GET -H "Content-Type: application/json;charset=UTF-8" -H "X-Secret-Key: SECRET_KEY" https://api-push.cloud.toast.com/push/v2.0/appkeys/{appkey}/messages
Field | Usage | Description |
---|---|---|
createdDateTime | - | Date and time of message creation (ISO 8601) |
completedDateTime | - | Date and time of delivery completed (ISO 8601) |
targetCount | - | Number of target tokens to deliver |
sentCount | - | Number of tokens actually delivered |
provisionedResourceId | - | Provisioned resource ID of a message delivered |
totalCount | - | Total number of filtered messages |
※ Only the push messages sent using the console can be retrieved by the Get API.
GET /push/v2.0/appkeys/{appkey}/messages/{message-id}
Content-Type: application/json;charset=UTF-8
X-Secret-Key: [a-zA-Z0-9]{8}
Field | Usage | Description |
---|---|---|
appkey | Required, String | Path Variable, Appkey issued on Enable |
messageId | Required, Number | Message ID |
N/A
{
"message" : {
"messageId" : 0,
"messageIdString": "0",
"target" : {
"type" : "ALL"
},
"content" : {
"default" : {
"title": "title",
"body": "body"
}
},
"messageType" : "AD",
"contact": "1588-1588",
"removeGuide": "menu > setting",
"timeToLiveMinute": 60,
"createdDateTime": "2017-02-13T09:30:00.000+09:00",
"completedDateTime": "2017-02-13T09:30:00.000+09:00",
"targetCount": 1000,
"messageStatus": "COMPLETE",
"provisionedResourceId": "[a-zA-Z0-9]{16}"
},
"header" : {
"isSuccessful" : true,
"resultCode": 0,
"resultMessage" : "SUCCESS"
}
}
curl -X GET -H "Content-Type: application/json;charset=UTF-8" -H "X-Secret-Key: SECRET_KEY" https://api-push.cloud.toast.com/push/v2.0/appkeys/{appkey}/messages/{messageId}
Can list messages that are failed in delivery. However, invalid token (INVALID_TOKEN) is not deemed as a delivery failure.
GET /push/v2.0/appkeys/{appkey}/message-errors?messageId={messageId}&messageErrorType={messageErrorType}&messagErrorCause={messageErrorCause}&from={from}&to={to}&limit={limit}
HEADER
Content-Type: application/json;charset=UTF-8
X-Secret-Key: [a-zA-Z0-9]{8}
Field | Usage | Description |
---|---|---|
appkey | Required, String | Path Variable, Appkey issued on Enable |
messageId | Optional, Number | Message ID |
messageErrorType | Optional, String | 'CLIENT_ERROR', 'EXTERNAL_ERROR', 'INTERNAL_ERROR' |
messageErrorCause | Optional, String | 'UNSUPPORTED_MESSAGE_TYPE', 'INVALID_MESSAGE', 'INVALID_CERTIFICATE', 'UNAUTHORIZED', 'EXPIRED_TIME_OUT', 'APNS_ERROR', 'GCM_ERROR', 'TENCENT_ERROR', 'AGENT_ERROR', 'ADM_ERROR' |
from | Optional, DateTime String | Up to the latest 30 days, or 7 days for default (ISO 8601, e.g. YYYY-MM-DDThh:mm:ss.SSSTZD) |
to | Optional, DateTime String | Up to the latest 30 days, or 7 days for default (ISO 8601, e.g. YYYY-MM-DDThh:mm:ss.SSSTZD) |
limit | Optional, Number | Size to list at once: default and maximum value is 100 |
pageNumber | Optional, Number | Page number, default is 1 |
##### Description | ||
- messageErrorType and messageErrorCause mean the followings: | ||
- CLIENT_ERROR: Client’s wrong request | ||
- UNSUPPORTED_MESSAGE_TYPE: Unsupported type of message | ||
- INVALID_MESSAGE: Invalid message | ||
- INVALID_CERTIFICATE: Expired or wrong certificate | ||
- UNAUTHORIZED: Expired or wrong certificate | ||
- EXTERNAL_ERROR: Error in external services related to push, such as APNS, CGM, Tencent, or ADM | ||
- APNS_ERROR: Delivery to APNS (iOS) failed | ||
- GCM_ERROR: Delivery to GCM (Google) failed | ||
- TENCENT_ERROR: Delivery to Tencent failed | ||
- ADM_ERROR: Delivery to ADM failed | ||
- INTERNAL_ERROR: Internal error of push | ||
- EXPIRED_TIME_OUT: Valid time expired due to delivery delay | ||
- AGENT_ERROR: Agent Delivery failed due to internal error of Agent |
N/A
{
"messageErrors" : [{
"messageId" : 0,
"messageIdString" : "0",
"pushType" : "GCM",
"messageErrorType" : "ClientError",
"messageErrorCause" : "INVALID_CERTIFICATE",
"payload" : {
"data" : {
"title" : "title",
"body" : "body"
}
},
"createdDateTime" : "2017-05-18T15:47:00.000+09:00",
"tokens" : [{
"uid" : "uid-1",
"token" : "token-1"
}
]
}
],
"header" : {
"isSuccessful" : true,
"resultCode" : 0,
"resultMessage" : "Success."
}
}
{
"messageErrors" : [{
...
}],
"header" : {
"resultCode" : 40010,
"resultMessage" : "Client Error. Too much:use'from' and 'to' shorten. totalCount<10>",
"isSuccessful" : false
}
}
Field | Usage | Description |
---|---|---|
messageId | - | ID of failed messages |
messageIdString | - | ID of failed messages |
pushType | - | 'GCM', 'APNS', 'APNS_SANDBOX', 'TENCENT', 'APNS_VOIP', 'APNS_SANDBOXVOIP', 'ADM' |
payload | - | Messages actually delivered on a device |
tokens | - | UID and token of recipient to failed delivery |
curl -X GET -H "Content-Type: application/json;charset=UTF-8" -H "X-Secret-Key: SECRET_KEY" https://api-push.cloud.toast.com/push/v2.0/appkeys/{appkey}/message-errors
This API has been deprecated. Please use API v2.4 or higher.
Enable Message Delivery Receipt and apply v1.4 or higher SDK, so as to check the status of message delivery/receipt. Can get collected data with statistics API. Go to the [Console] > [Settings] tab to enable the function.
GET /push/v2.0/appkeys/{appkey}/statistics/message-delivery-receipts?from={from}&to={to}&event={event}&timeUnit={timeUnit}&messageId={messageId}
HEADER
Content-Type: application/json;charset=UTF-8
X-Secret-Key: [a-zA-Z0-9]{8}
Field | Usage | Description |
---|---|---|
appkey | Required, String | Path Variable, Appkey issued on Enable |
from | Optional, DateTime String | Up to the latest 30 days (ISO 8601, e.g. YYYY-MM-DDThh:mm:ss.SSSTZD) |
to | Optional, DateTime String | Up to the latest 30 days (ISO 8601, e.g. YYYY-MM-DDThh:mm:ss.SSSTZD) |
event | Optional, String | 'SENT', 'SENT_FAILED', 'RECEIVED', 'OPENED' |
timeUnit | Optional, String | 'MINUTES', 'HOURS', 'DAYS' When value is not available, statistics are randomly provided, depending on the retrieved period. A day or more is displayed in Days, between 1 and 24 hours is in Hours, and less than 1 hour is in Minutes. |
messageId | Optional, Number | Message ID |
N/A
{
"messageDeliveryReceiptStatistics" : [{
"dateTime" : "2016-07-11 17:50:00.00+9:00",
"sent" : 13,
"sentFailed": 0,
"received" : 12,
"opened" : 10
}
],
"header" : {
"isSuccessful" : true,
"resultCode" : 0,
"resultMessage" : "SUCCESS"
}
}
Field | Usage | Description |
---|---|---|
dateTime | Optional, DateTime String | ISO 8601 |
sent | Optional, Number | Number of deliveries from a server |
sentFailed | Optional, Number | Number of failed delivery from a server |
received | Optional, Number | Number of receipt on a device |
opened | Optional, Number | Number of user’s click-to-open on device |
curl -X GET -H "Content-Type: application/json;charset=UTF-8" -H "X-Secret-Key: SECRET_KEY" https://api-push.cloud.toast.com/push/v2.0/appkeys/{appkey}/statistics/message-delivery-receipts
POST /push/v2.0/appkeys/{appkey}/schedules
Content-Type: application/json;charset=UTF-8
X-Secret-Key: [a-zA-Z0-9]{8}
Field | Usage | Description |
---|---|---|
appkey | Required, String | Path Variable, Appkey issued on Enable |
{
"type" : "EVERY_MONTH",
"fromDate" : "2016-12-30",
"toDate" : "2017-01-02",
"times" : [
"12:00",
"17:00"
],
"days" : [
1,
15
],
"daysOfWeek": [
"SUNDAY",
"MONDAY"
]
}
Field | Usage | Description |
---|---|---|
type | Required, String | 'EVERY_DAY' (daily), 'EVERY_WEEK' (weekly), 'EVERY_MONTH' (monthly) |
fromDate | Required, Date String | Start date of scheduled message (YYYY-MM-DD) |
toDate | Required, Date String | End date of scheduled message (YYYY-MM-DD) |
times | Required, Time String | Delivery hour/minute of scheduled message (hh:mm) |
days | Optional, Number Array | Set when the type is ‘EVERY_MONTH’ (1, 2, ..., 31: 1day, 2 days, ..., 31days) |
daysOfWeek | Optional, String Array | Set when the type is ‘EVERY_WEEK’ ('SUNDAY', 'MONDAY', 'TUESDAY', 'WEDNESDAY', 'THURSDAY', 'FRIDAY', 'SATURDAY') |
{
"header" : {
"resultCode" : 0,
"resultMessage" : "SUCCESS",
"isSuccessful" : true
},
"schedules" : [
"2016-12-01T12:00",
"2016-12-01T17:00",
"2016-12-15T12:00",
"2016-12-15T17:00",
"2017-01-01T12:00",
"2017-01-01T17:00",
"2017-01-15T12:00",
"2017-01-15T17:00",
"2017-02-01T12:00",
"2017-02-01T17:00",
"2017-02-15T12:00",
"2017-02-15T17:00"
]
}
Field | Usage | Description |
---|---|---|
schedules | - | Date and time (ISO 8601, e.g. YYYY-MM-DDThh:mm), Maximum: 60 days from the current date (e.g. 31 July 2024 23:59 if the current date is 1 June 2024) |
curl -X POST -H "Content-Type: application/json;charset=UTF-8" -H "X-Secret-Key: SECRET_KEY" https://api-push.cloud.toast.com/push/v2.0/appkeys/{appkey}/schedules -d '{"type":"EVERY_MONTH","fromDate":"2016-12-30","toDate":"2017-01-02","times":["12:00","17:00"],"days":[1,15],"daysOfWeek":["SUNDAY","MONDAY"]}'
POST /push/v2.0/appkeys/{appkey}/reservations
Content-Type: application/json;charset=UTF-8
X-Secret-Key: [a-zA-Z0-9]{8}
Field | Usage | Description |
---|---|---|
appkey | Required, String | Path Variable, Appkey issued on Enable |
{
"schedules" : [
"2016-12-30T12:40",
"2016-12-31T12:40"
],
"isLocalTime" : false,
"target" : {
"type" : "UID",
"to": ["uid-1", "uid-2"]
},
"content" : {
"default" : {
"title": "title",
"body": "body"
}
},
"messageType" : "AD",
"contact": "1588-1588",
"removeGuide": "menu > setting",
"timeToLiveMinute": 1,
"provisionedResourceId": "id"
}
Field | Usage | Description |
---|---|---|
schedules | Required, DateTime String Array | List of delivery schedule of scheduled messages |
isLocalTime | Required, Boolean | Whether to be sent on the local-time basis |
{
"header" : {
"resultCode" : 0,
"resultMessage" : "SUCCESS",
"isSuccessful" : true
},
"reservation" : {
"reservationId": 666810348995587,
"reservationIdString": "666810348995587"
}
}
Field | Usage | Description |
---|---|---|
reservationId | Number | ID of scheduled message |
reservationIdString | String | ID string of scheduled messages |
curl -X POST -H "Content-Type: application/json;charset=UTF-8" -H "X-Secret-Key: SECRET_KEY" https://api-push.cloud.toast.com/push/v2.0/appkeys/{appkey}/reservations -d '{"schedules":["2016-12-30T12:40","2016-12-31T12:40"],"isLocalTime":false,"target":{"type":"UID","to":["uid"]},"content":{"default":{"title":"title","body":"body"}},"messageType":"AD","contact":"1588-1588","removeGuide":"매뉴 > 설정","timeToLiveMinute":1}'
GET /push/v2.0/appkeys/{appkey}/reservations?pageIndex={pageIndex}&pageSize={pageSize}&reservationStatus={reservationsStatus}
Content-Type: application/json;charset=UTF-8
X-Secret-Key: [a-zA-Z0-9]{8}
Field | Usage | Description |
---|---|---|
appkey | Required, String | Path Variable, Appkey issued on Enable |
pageIndex | Optional, Number | Default is 0 |
pageSize | Optional, Number | Default is 25; Max 100 |
from | Optional, DateTime String | Up to the latest 30 days (ISO 8601, e.g. YYYY-MM-DDThh:mm:ss.SSSTZD) |
to | Optional, DateTime String | Up to the latest 30 days (ISO 8601, e.g. YYYY-MM-DDThh:mm:ss.SSSTZD) |
reservationStatus | Optional, String | 'RESERVED', 'COMPLETE' |
N/A
{
"header" : {
"resultCode" : 0,
"resultMessage" : "SUCCESS",
"isSuccessful" : true
},
"reservations" : [{
"reservationId" : 666810348995587,
"reservationIdString" : "666810348995587",
"schedules" : [{
"scheduleId" : 2455708,
"scheduleIdString" : "2455708",
"reservationId" : 666810348995587,
"reservationIdString" : "666810348995587",
"deliveryDateTime" : "2016-12-30T12:40:00.000+09:00",
"timezoneOffset" : 0,
"scheduleStatus" : "READY"
}
],
"isLocalTime" : false,
"target" : {
"type" : "UID",
"to" : [
"uid"
]
},
"content" : {
"default" : {
"title" : "default title",
"body" : "default body"
},
"ko" : {
"title" : "Korean title",
"body" : "Korean body"
}
},
"messageType" : "NOTIFICATION",
"timeToLiveMinute" : 60,
"createdDateTime" : "2016-12-30T10:34:40.000+09:00",
"updatedDateTime" : "2016-12-30T10:34:40.000+09:00",
"completedDateTime" : "2016-12-30T10:34:40.000+09:00",
"reservationStatus" : "RESERVED"
}
],
"totalCount" : 1
}
Field | Usage | Description |
---|---|---|
reservationIdString | - | ID string of scheduled message |
createdDateTime | - | Date and time of scheduled message creation (ISO 8601) |
updatedDateTime | - | Date and time of message modification (ISO 8601) |
completedDateTime | - | Date and time of message delivery completed; if not completed, show the current time (ISO 8601) |
reservationStatus | - | 'RESERVED', 'COMPLETED' |
schedules.scheduleId | - | Delivery schedule ID of scheduled messages |
schedules.scheduleIdString | - | ID String of delivery schedule of a scheduled message |
schedules.reservationIdString | - | ID String of a scheduled message to which message delivery schedule belongs |
schedules.deliveryDateTime | - | Date and time of scheduled message delivery |
schedules.timezoneOffset | - | Delivery time zone of scheduled message: to be set when delivered on the local-time basis |
schedules.scheduleStatus | - | Status of delivery schedule of scheduled messages, such as 'READY', 'SENDING', 'CANCELED', and 'DONE'READY', 'SENDING', 'CANCELED', 'DONE' |
totalCount | - | Number of total registered scheduled messages |
curl -X GET -H "Content-Type: application/json;charset=UTF-8" -H "X-Secret-Key: SECRET_KEY" https://api-push.cloud.toast.com/push/v2.0/appkeys/{appkey}/reservations
GET /push/v2.0/appkeys/{appkey}/reservations/{reservation-id}
Content-Type: application/json;charset=UTF-8
X-Secret-Key: [a-zA-Z0-9]{8}
N/A
{
"header" : {
"resultCode" : 0,
"resultMessage" : "SUCCESS",
"isSuccessful" : true
},
"reservation" : {
"reservationId" : 666810348995587,
"reservationIdString" : "666810348995587",
"schedules" : [{
"scheduleId" : 2455708,
"scheduleIdString" : "2455708",
"reservationId" : 666810348995587,
"reservationIdString" : "666810348995587",
"deliveryDateTime" : "2016-12-30T12:40:00.000+09:00",
"timezoneOffset" : 0,
"scheduleStatus" : "READY"
}
],
"isLocalTime" : false,
"target" : {
"type" : "UID",
"to" : [
"uid"
]
},
"content" : {
"default" : {
"title" : "default title",
"body" : "default body"
},
"ko" : {
"title" : "Korean title",
"body" : "Korean body"
}
},
"messageType" : "NOTIFICATION",
"timeToLiveMinute" : 60,
"createdDateTime" : "2016-12-30T10:34:40.000+09:00",
"updatedDateTime" : "2016-12-30T10:34:40.000+09:00",
"completedDateTime" : "2016-12-30T10:34:40.000+09:00",
"reservationStatus" : "RESERVED"
}
}
Field | Usage | Description |
---|---|---|
updatedDateTime | DateTime String | Date and time of schedule modification (ISO 8601) |
curl -X GET -H "Content-Type: application/json;charset=UTF-8" -H "X-Secret-Key: SECRET_KEY" https://api-push.cloud.toast.com/push/v2.0/appkeys/{appkey}/reservations/{reservationId}
GET /push/v2.0/appkeys/{appkey}/reservations/{reservation-id}/messages?pageIndex={pageIndex}&pageSize={pageSize}
Content-Type: application/json;charset=UTF-8
X-Secret-Key: [a-zA-Z0-9]{8}
Field | Usage | Description |
---|---|---|
appkey | Required, String | Path Variable, Appkey issued on Enable |
reservationId | Required, Number | ID of scheduled messages |
pageIndex | Optional, Number | Default is 0 |
pageSize | Optional, Number | Default is 25; Max 100 |
N/A
{
"header" : {
"resultCode" : 0,
"resultMessage" : "success",
"isSuccessful" : true
},
"messages" : [{
"messageId" : 356125922591162,
"messageIdString" : "356125922591162",
"target" : {
"type" : "ALL",
"pushTypes" : ["GCM", "APNS", "APNS_SANDBOX", "TENCENT", "ADM"]
},
"content" : {
"default" : {
"title" : "Scheduled message for 6:55",
"body" : "API v2"
}
},
"messageType" : "NOTIFICATION",
"createdDateTime" : "2017-04-05T18:55:00.000+09:00",
"completedDateTime" : "2017-04-05T18:55:00.000+09:00",
"targetCount" : 38,
"sentCount" : 38,
"messageStatus" : "COMPLETE"
}
],
"totalCount" : 1
}
Field | Usage | Description |
---|---|---|
totalCount | - | Total number of delivered messages |
curl -X GET -H "Content-Type: application/json;charset=UTF-8" -H "X-Secret-Key: SECRET_KEY" https://api-push.cloud.toast.com/push/v2.0/appkeys/{appkey}/reservations/{reservationId}/messages
PUT /push/v2.0/appkeys/{appkey}/reservations/{reservationId}
Content-Type: application/json;charset=UTF-8
X-Secret-Key: [a-zA-Z0-9]{8}
{
"schedules" : [
"2016-12-30T10:05",
"2016-12-31T12:40"
],
"target" : {
"type" : "UID",
"to" : [
"uid"
]
},
"content" : {
"default" : {
"title" : "default title",
"body" : "default body"
},
"ko" : {
"title" : "Korean title",
"body" : "Korean body"
}
},
"isLocalTime" : false,
"messageType" : "NOTIFICATION"
}
{
"header" : {
"resultCode" : 0,
"resultMessage" : "SUCCESS",
"isSuccessful" : true
}
}
curl -X PUT -H "Content-Type: application/json;charset=UTF-8" -H "X-Secret-Key: SECRET_KEY" https://api-push.cloud.toast.com/push/v2.0/appkeys/{appkey}/reservations/{reservationId} -d '{"schedules":["2018-12-30T12:40","2018-12-31T12:40"],"isLocalTime":false,"target":{"type":"UID","to":["uid"]},"content":{"default":{"title":"title","body":"body"}},"messageType":"AD","contact":"1588-1588","removeGuide":"menu > setting","timeToLiveMinute":1}'
DELETE /push/v2.0/appkeys/{appkey}/reservations?reservationIds={reservationId,}
Content-Type: application/json;charset=UTF-8
X-Secret-Key: [a-zA-Z0-9]{8}
Field | Usage | Description |
---|---|---|
appkey | Required, String | Path Variable, Appkey issued on Enable |
reservationIds | Required, Number Array | Delimited by ',' (e.g. reservationIds=1,2) |
N/A
{
"header" : {
"resultCode" : 0,
"resultMessage" : "SUCCESS",
"isSuccessful" : true
}
}
curl -X DELETE -H "Content-Type: application/json;charset=UTF-8" -H "X-Secret-Key: SECRET_KEY" https://api-push.cloud.toast.com/push/v2.0/appkeys/{appkey}/reservations?reservationIds={reservationId,}
POST /push/v2.0/appkeys/{appkey}/tags
Content-Type: application/json;charset=UTF-8
X-Secret-Key: [a-zA-Z0-9]{8}
{
"tagName" : "Thirty"
}
Field | Usage | Description |
---|---|---|
tagName | Required, String | Tag name, the maximum length is 255 |
{
"header" : {
"isSuccessful" : true,
"resultCode" : 0,
"resultMessage" : "SUCCESS"
},
"tag" : {
"tagId" : "12345678"
}
}
Field | Usage | Description |
---|---|---|
tagId | Required, String | Created tag ID, the length of 8 |
curl -X POST -H "Content-Type: application/json;charset=UTF-8" -H "X-Secret-Key: SECRET_KEY" https://api-push.cloud.toast.com/push/v2.0/appkeys/{appkey}/tags -d '{"tagName":"thirty"}'
POST /push/v2.0/appkeys/{appkey}/tags/{tag-id}/uids
Content-Type: application/json;charset=UTF-8
X-Secret-Key: [a-zA-Z0-9]{8}
{
"uids" : [
"uid-01",
"uid-02"
]
}
Field | Usage | Description |
---|---|---|
uids | Required, String Array | UID string array, 16 to the longest; UID, 64 to the longest |
{
"header" : {
"isSuccessful" : true,
"resultCode" : 0,
"resultMessage" : "SUCCESS"
}
}
curl -X POST -H "Content-Type: application/json;charset=UTF-8" -H "X-Secret-Key: SECRET_KEY" https://api-push.cloud.toast.com/push/v2.0/appkeys/{appkey}/tags/{tagId}/uids -d '{"uids":["uid"]}'
POST /push/v2.0/appkeys/{appkey}/uids
Content-Type: application/json;charset=UTF-8
X-Secret-Key: [a-zA-Z0-9]{8}
{
"uid" : "uid-01",
"tagIds" : [
"12345678",
"23456789"
]
}
{
"header" : {
"isSuccessful" : true,
"resultCode" : 0,
"resultMessage" : "SUCCESS"
}
}
curl -X POST -H "Content-Type: application/json;charset=UTF-8" -H "X-Secret-Key: SECRET_KEY" https://api-push.cloud.toast.com/push/v2.0/appkeys/{appkey}/uids -d '{"uid":"uid","tagIds":["TAG_ID"]}'
GET /push/v2.0/appkeys/{appkey}/tags?tagName={tagName}
Content-Type: application/json;charset=UTF-8
X-Secret-Key: [a-zA-Z0-9]{8}
Field | Usage | Description |
---|---|---|
tagName | Optional, String | Tag name |
N/A
{
"header" : {
"isSuccessful" : true,
"resultCode" : 0,
"resultMessage" : "SUCCESS"
},
"tags" : [
{
"tagId" : "12345678",
"tagName" : "tagName",
"createdDateTime" : "2017-07-07T07:07:07.777+09:00",
"updatedDateTime" : "2017-07-07T07:07:07.777+09:00"
}
]
}
Field | Usage | Description |
---|---|---|
createdDateTime | Required, Date Time String | Date and time of creation (ISO 8601) |
updatedDateTime | Required, Date Time String | Date and time of modification (ISO 8601) |
curl -X GET -H "Content-Type: application/json;charset=UTF-8" -H "X-Secret-Key: SECRET_KEY" https://api-push.cloud.toast.com/push/v2.0/appkeys/{appkey}/tags
GET /push/v2.0/appkeys/{appkey}/tags/{tag-id}
Content-Type: application/json;charset=UTF-8
X-Secret-Key: [a-zA-Z0-9]{8}
N/A
{
"header" : {
"isSuccessful" : true,
"resultCode" : 0,
"resultMessage" : "SUCCESS"
},
"tag" : {
"tagId" : "12345678",
"tagName" : "thirty",
"createdDateTime" : "2017-07-07T07:07:07.777+09:00",
"updatedDateTime" : "2017-07-07T07:07:07.777+09:00"
}
}
curl -X GET -H "Content-Type: application/json;charset=UTF-8" -H "X-Secret-Key: SECRET_KEY" https://api-push.cloud.toast.com/push/v2.0/appkeys/{appkey}/tags/{tagId}
GET /push/v2.0/appkeys/{appkey}/tags/{tag-id}/uids?offsetUid={uid}&limit={limit}
Content-Type: application/json;charset=UTF-8
X-Secret-Key: [a-zA-Z0-9]{8}
Field | Usage | Description |
---|---|---|
offsetUid | Optional, String | Get starts next from set UID |
limit | Optional, Number | Number of UIDs to list |
N/A
{
"header" : {
"isSuccessful" : true,
"resultCode" : 0,
"resultMessage" : "SUCCESS"
},
"uids" : [
{
"uid" : "uid-01",
"tags" : [
{
"tagId" : "tag-id-01",
"tagName" : "tag-name-01",
"createdDateTime" : "2017-07-07T07:07:07.777+09:00",
"updatedDateTime" : "2017-07-07T07:07:07.777+09:00"
}
],
"contacts" : [
{
"contactType" : "TOKEN_GCM",
"contact" : "token",
"createdDateTime" : "2017-07-07T07:07:07.777+09:00"
}
]
}
]
}
Field | Usage | Description |
---|---|---|
contacts | -, Object Array | List of UID contacts and tokes |
contactType | -, String | Token type, 'TOKEN_GCM', 'TOKEN_APNS', 'TOKEN_APNS_SANDBOX', 'TOKEN_TENCENT', 'TOKEN_ADM' |
contact | -, String | Token |
createdDateTime | Required, Date Time String | Date and time of creation (ISO 8601) |
curl -X GET -H "Content-Type: application/json;charset=UTF-8" -H "X-Secret-Key: SECRET_KEY" https://api-push.cloud.toast.com/push/v2.0/appkeys/{appkey}/tags/{tagId}/uids
GET /push/v2.0/appkeys/{appkey}/uids/{uid}
Content-Type: application/json;charset=UTF-8
X-Secret-Key: [a-zA-Z0-9]{8}
N/A
{
"header" : {
"isSuccessful" : true,
"resultCode" : 0,
"resultMessage" : "SUCCESS"
},
"uid" : {
"uid" : "uid-01",
"tags" : [
{
"tagId" : "12345678",
"tagName" : "tag-name-01",
"createdDateTime" : "2017-07-07T07:07:07.777+09:00",
"updatedDateTime" : "2017-07-07T07:07:07.777+09:00"
}
],
"contacts" : [
{
"contactType" : "TOKEN_GCM",
"contact" : "token",
"createdDateTime" : "2017-07-07T07:07:07.777+09:00"
}
]
}
}
curl -X GET -H "Content-Type: application/json;charset=UTF-8" -H "X-Secret-Key: SECRET_KEY" https://api-push.cloud.toast.com/push/v2.0/appkeys/{appkey}/uids/uid
PUT /push/v2.0/appkeys/{appkey}/tags/{tag-id}
Content-Type: application/json;charset=UTF-8
X-Secret-Key: [a-zA-Z0-9]{8}
{
"tagName" : "30s"
}
{
"header" : {
"isSuccessful" : true,
"resultCode" : 0,
"resultMessage" : "SUCCESS"
}
}
curl -X PUT -H "Content-Type: application/json;charset=UTF-8" -H "X-Secret-Key: SECRET_KEY" https://api-push.cloud.toast.com/push/v2.0/appkeys/{appkey}/tags/{tagId} -d '{"tagName":"thirty three"}'
DELETE /push/v2.0/appkeys/{appkey}/tags/{tag-id}
Content-Type: application/json;charset=UTF-8
X-Secret-Key: [a-zA-Z0-9]{8}
N/A
{
"header" : {
"isSuccessful" : true,
"resultCode" : 0,
"resultMessage" : "SUCCESS"
}
}
curl -X DELETE -H "Content-Type: application/json;charset=UTF-8" -H "X-Secret-Key: SECRET_KEY" https://api-push.cloud.toast.com/push/v2.0/appkeys/{appkey}/tags/{tagId}
DELETE /push/v2.0/appkeys/{appkey}/uids?uids={uid,}
Content-Type: application/json;charset=UTF-8
X-Secret-Key: [a-zA-Z0-9]{8}
Field | Usage | Description |
---|---|---|
uids | -, Object Array | Delimit list of UIDs to delete by comma (,): can delete up to 16 at once. |
N/A
{
"header" : {
"isSuccessful" : true,
"resultCode" : 0,
"resultMessage" : "SUCCESS"
}
}
curl -X DELETE -H "Content-Type: application/json;charset=UTF-8" -H "X-Secret-Key: SECRET_KEY" https://api-push.cloud.toast.com/push/v2.0/appkeys/{appkey}/uids?uids=uid
DELETE /push/v2.0/appkeys/{appkey}/tags/{tagId}/uids?uids={uid,}
Content-Type: application/json;charset=UTF-8
X-Secret-Key: [a-zA-Z0-9]{8}
N/A
{
"header" : {
"isSuccessful" : true,
"resultCode" : 0,
"resultMessage" : "SUCCESS"
}
}
curl -X DELETE -H "Content-Type: application/json;charset=UTF-8" -H "X-Secret-Key: SECRET_KEY" https://api-push.cloud.toast.com/push/v2.0/appkeys/{appkey}/tags/{tagId}/uids?uids=uid
POST /push/v2.0/appkeys/{appkey}/uids/{uid}/tag-ids
Content-Type: application/json;charset=UTF-8
{
"tagIds": ["TAG_ID01"]
}
{
"header" : {
"isSuccessful" : true,
"resultCode" : 0,
"resultMessage" : "SUCCESS"
}
}
curl -X POST -H "Content-Type: application/json;charset=UTF-8" https://api-push.cloud.toast.com/push/v2.0/appkeys/{appkey}/uids/uid/tag-ids -d '{"tagIds":["TAG_ID"]}'
GET /push/v2.0/appkeys/{appkey}/uids/{uid}/tag-ids
Content-Type: application/json;charset=UTF-8
N/A
{
"header" : {
"isSuccessful" : true,
"resultCode" : 0,
"resultMessage" : "SUCCESS"
},
"tagIds": ["TAG_ID01"]
}
curl -X GET -H "Content-Type: application/json;charset=UTF-8" https://api-push.cloud.toast.com/push/v2.0/appkeys/{appkey}/uids/uid/tag-ids
PUT /push/v2.0/appkeys/{appkey}/uids/{uid}/tag-ids
Content-Type: application/json;charset=UTF-8
{
"tagIds": ["TAG_ID02"]
}
{
"header" : {
"isSuccessful" : true,
"resultCode" : 0,
"resultMessage" : "SUCCESS"
}
}
curl -X PUT -H "Content-Type: application/json;charset=UTF-8" https://api-push.cloud.toast.com/push/v2.0/appkeys/{appkey}/uids/uid/tag-ids -d '{"tagIds":["TAG_ID"]}'
DELETE /push/v2.0/appkeys/{appkey}/uids/{uid}/tag-ids?tagIds={tagId,}
Content-Type: application/json;charset=UTF-8
N/A
{
"header" : {
"isSuccessful" : true,
"resultCode" : 0,
"resultMessage" : "SUCCESS"
}
}
Field | Usage | Description |
---|---|---|
tagIds | Required, String Array | Query String, Tag ID to delete: delimited by comma (,) |
curl -X DELETE -H "Content-Type: application/json;charset=UTF-8" https://api-push.cloud.toast.com/push/v2.0/appkeys/{appkey}/uids/uid/tag-ids?tagIds=TAG_ID_01,TAG_ID_02