Purpose of the API
The purpose of the API is to send a web-push notification.
Request URL
https://www.reson8.ae/rest-api/v1/web-push/send
Request Method
The API can be requested via POST
Request-Input-Format
The format for the request input is: application/json
Name | Value |
---|---|
X-Reson8-ID | reson8rest-oa |
X-Reson8-Token | ada2dbe85881dd101af6e4854577f56a30c733eb31de07d84eeb3f83d11c6825 |
api-key | Refer How to get access to the API key? |
Name | Value |
---|---|
payloadTitle | web-push payload title |
payloadOptions | web-push payload options |
targetType | target type (All/ID/User/Tag) |
targetData | one or more device-id/user/tag (max: 100) |
startDateTime | start date-time, applicable in tag-based targeting (format: yyyy-MM-dd HH:mm) |
endDateTime | end date-time, applicable in tag-based targeting (format: yyyy-MM-dd HH:mm) |
{
"payloadTitle": "This is a test notification",
"payloadOptions": {},
"targetType": "All"
}
Name | Value |
---|---|
requestID | unique request reference (available only post authentication) |
errorLevel | error category (available only post authentication) |
procResponse | status/error description |
notificationID | notification-id (if the notification was queued successfully) |
{
"requestID": "abae3d40-9a70-4568-9dd1-6477cdbca876",
"errorLevel": 0,
"procResponse": "Device registered successfully",
"notificationID": "9bae3d409a7045689dd16477cdbca435"
}
Name | Value |
---|---|
0 | request completed successfully |
9000 | invalid input structure |
9001 | data validation failure |
9998/9999 | unexpected application error |
Exact error/status description will be available in the procResponse attribute in the response body
Name | Value |
---|---|
200 | OK |
401 | Unauthorized |
429 | Too many requests |
500 | Unexpected application error |
503 | Service temporarily not available |