Push API
Overview
This API documentation covers submitting push jobs from external services.
URL scheme: https://<customer-id>.push.delivery/push-api/<endpoint>
To use the service you need HTTP basic auth. Data is sent as JSON via POST.
REST Endpoints
push
Submit a push job. Tags to be addressed can be specified via their id’s or their source id’s. For this endpoint a specific push user is available and can be looked up in the administration UI. Alternatively any user login can also be used to submit a push. If no appId’s are specified, it means all apps that are connected to the specified tags will be addressed, this is the default behavior.
The payload is typically an encoded JSON object, which then is transformed using a template for each platform. See Push templates information.
Name | Type | Description | Required | Example |
---|---|---|---|---|
tagIds |
Array |
the IDs of the tags |
Either tagIds or tagSourceIds required |
101, 102 |
tagSourceIds |
Array |
the source IDs of the tags |
Either tagIds or tagSourceIds required |
sport_football_team_fcb_goal, sport_football_team_fca_goal |
filterTagIds |
Array |
the IDs of the tags that should be always present |
Optional |
103, 104 |
filterTagSourceIds |
Array |
the source IDs of the tags that should be always present |
Optional |
sport_language_german |
appIds |
Array |
the IDs of the apps |
Optional |
110, 111 |
payload |
String |
the payload of the push as string, typically a JSON object (escaped) |
Required |
{ \'message \' : \'test\' } |
if the tag is expired notification will be not delivered. |
https://<customer-id>.push.delivery/push-api/push
{
"tagIds": [ <id-number>, <id-number> ... ],
"payload": "{ \"field1\" : \"value\", \"field2\" : \"value\" ... }"
}
{
"tagSourceIds": ["sport_football_team_fcb_goal", "sport_football_team_fca_goal"],
"payload": "{ \"field1\" : \"value\", \"field2\" : \"value\" ... }"
}
{
"tagIds": [ <id-number>, <id-number> ... ],
"payload": "{ \"field1\" : \"value\", \"field2\" : \"value\" ... }",
"appIds" : [ <id-number> ]
}
adfb51b1-b037-cf17-b1f1-fafa60de1203
The response will be a push job id that can be used for status queries.
In case of an invalid request, the response will be a HTTP 422 code. Invalid requests are missing for example payload, or tag id’s or specify non-existant tag source id’s.
status
Query the status of a push job. The status response will have an entry for each app addressed in the push job. It also will carry the transformed (by the push template) payload for each app.
https://<customer-id>.push.delivery/push-api/status/<status-id>
https://<customer-id>.push.delivery/push-api/status/adfb51b1-b037-cf17-b1f1-fafa60de1203
[
{
key: {
id: "<job-id-string>",
platformId: <platform-id>,
appId: <app-id>
},
created: <timestamp-long>,
finished: <timestamp-long>,
state: "<state-string>",
totalCount: <count-long>,
successCount: <count-long>,
noFeedbackCount: <count-long>,
errorCount: <count-long>,
messages: [ ],
transformedPayload: "{ \"field1\" : \"value\"}"
}
]