Notification
4 endpoints
POST
/notifications/{notificationId}
Subscribe to notification by creating a receiver
Subscribe to a specific type of notification and receiver channels (url, slack, ...).
Parameters
notificationId required
Notification ID
Request Body
email
slack
Slack Webhook URL for sending notification
sms
Phone number for SMS notification
url
URL to make a POST request to
authenticationId
Identity of receiver
Responses
201
400
Bad request
401
Unauthorized
404
Not found
POST https://api.qa.onyze.pro/v1/notifications/{notificationId}
Request body
{
"email": "test@gmail.com",
"slack": "https://hooks.slack.com/services/QQ1FZ7BAZ/B02AXS18ZSG/tv2sxD6A228xs1qVFAjFKxsk",
"sms": "+34123456789",
"url": "https://test.com/",
"authenticationId": "Receiver_1"
}
Response 201
{
"id": "2cdc8ab1-6d50-49cc-ba14-54e4ac7ec231"
}
PATCH
/notifications/{notificationId}/receivers/{receiverId}
Update a receiver of notification
Update an existing notification subscription.
Parameters
notificationId required
Notification ID
receiverId required
Receiver ID
Request Body
email
slack
Slack Webhook URL for sending notification
sms
Phone number for SMS notification
url
URL to make a POST request to
authenticationId
Identity of receiver
Responses
200
400
Bad request
401
Unauthorized
404
Not found
PATCH https://api.qa.onyze.pro/v1/notifications/{notificationId}/receivers/{receiverId}
Request body
{
"email": "test@gmail.com",
"slack": "https://hooks.slack.com/services/QQ1FZ7BAZ/B02AXS18ZSG/tv2sxD6A228xs1qVFAjFKxsk",
"sms": "+34123456789",
"url": "https://test.com/",
"authenticationId": "Receiver_1"
}
Response 200
{
"id": "2cdc8ab1-6d50-49cc-ba14-54e4ac7ec231"
}
DELETE
/notifications/{notificationId}/receivers/{receiverId}
Unsubscribe receiver from notifications
DELETE an existing receiver.
Parameters
notificationId required
Notification ID
receiverId required
Receiver ID
Responses
200
401
Unauthorized
404
Not found
DELETE https://api.qa.onyze.pro/v1/notifications/{notificationId}/receivers/{receiverId}
Response 200
{
"id": "2cdc8ab1-6d50-49cc-ba14-54e4ac7ec231"
}
GET
/notifications
Get notifications list
Obtain the list of notification types to which clients can subscribe to (user creation, wallet creation, purchase, transfer, etc).
Parameters
page
Page number of the records list
limit
Max number of records by page. limit=0 to return all records
sort
Sort the response PARAM or -PARAM
Responses
200
401
Unauthorized
404
Not found
GET https://api.qa.onyze.pro/v1/notifications
Response 200
[
{
"id": "d8vJIh-H",
"createdAt": "2018-08-17T17:04:55.626Z",
"updatedAt": "2018-08-21T18:24:17.185Z",
"event": "purchase.is-created",
"description": "string",
"receivers": [
{
"email": "test@gmail.com",
"slack": "https://hooks.slack.com/services/QQ1FZ7BAZ/B02AXS18ZSG/tv2sxD6A228xs1qVFAjFKxsk",
"sms": "+34123456789",
"url": "https://test.com/",
"authenticationId": "Receiver_1"
}
]
}
]