Saltar al contenido principal

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
string · path
Notification ID

Request Body

email
string
slack
string
Slack Webhook URL for sending notification
sms
string
Phone number for SMS notification
url
string
URL to make a POST request to
authenticationId
string
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
string · path
Notification ID
receiverId required
string · path
Receiver ID

Request Body

email
string
slack
string
Slack Webhook URL for sending notification
sms
string
Phone number for SMS notification
url
string
URL to make a POST request to
authenticationId
string
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
string · path
Notification ID
receiverId required
string · path
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
number · query
Page number of the records list
limit
number · query
Max number of records by page. limit=0 to return all records
sort
string · query
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"
}
]
}
]