Notifications
Get a single notification message by reference.
GET /v1/notifications/messages/{messageReference}
Auth: Access token (Bearer).
Parameters
| Name | In | Required | Description |
|---|---|---|---|
messageReference | path | Yes | The unique reference of the message. |
Responses
| Status | Description |
|---|---|
200 | The request was successful and the message was returned. |
400 | The request failed validation, the error object will contain further information. |
401 | The authorization information provided is not valid, authentication is required to access this resource. |
403 | The authorization header does not contain the correct type or you do not have access to this resource. |
404 | The request was successful but does not return any results. |
422 | The request payload is invalid, the error object will contain further information. |
429 | Too many requests are being sent concurrently or rate limiting has taken effect. |
500 | An unexpected error occurred, the error object will contain further information. |
Response body
| Field | Type | Required | Description |
|---|---|---|---|
success | boolean | No | Gets a value indicating whether the operation was successful. |
result | object | No | An in-app notification message displayed to a consumer or merchant. |
json
{
"success": true,
"result": {
"reference": "00000000-0000-0000-0000-000000000000",
"messageType": "Information",
"messageTarget": "None",
"messagePlacement": "None",
"header": "string",
"body": "string",
"navigationKey": "string",
"navigationValue": "string",
"buttonText": "string",
"isRead": true,
"readDate": "string",
"visibleFromDate": "string",
"visibleUntilDate": "string",
"createdDate": "string"
}
}Code samples
ts
// @vantagepay/vantagepay
const message = await client.notifications.getMessage('2a2b2c2d-3e3f-4a4b-5c5d-6e6f7a7b8c9d')csharp
// VantagePay.SDK
var message = await client.Notifications.GetMessageAsync(Guid.Parse("2a2b2c2d-3e3f-4a4b-5c5d-6e6f7a7b8c9d"));Delete a notification message.
DELETE /v1/notifications/messages/{messageReference}
Auth: Access token (Bearer).
Parameters
| Name | In | Required | Description |
|---|---|---|---|
messageReference | path | Yes | The unique reference of the message. |
Responses
| Status | Description |
|---|---|
200 | The request was successful and the message was deleted. |
400 | The request failed validation, the error object will contain further information. |
401 | The authorization information provided is not valid, authentication is required to access this resource. |
403 | The authorization header does not contain the correct type or you do not have access to this resource. |
404 | The request was successful but does not return any results. |
422 | The request payload is invalid, the error object will contain further information. |
429 | Too many requests are being sent concurrently or rate limiting has taken effect. |
500 | An unexpected error occurred, the error object will contain further information. |
Response body
| Field | Type | Required | Description |
|---|---|---|---|
success | boolean | No | Gets a value indicating whether the operation was successful. |
json
{
"success": true
}Code samples
ts
// @vantagepay/vantagepay
await client.notifications.deleteMessage('2a2b2c2d-3e3f-4a4b-5c5d-6e6f7a7b8c9d')csharp
// VantagePay.SDK
await client.Notifications.DeleteMessageAsync(Guid.Parse("2a2b2c2d-3e3f-4a4b-5c5d-6e6f7a7b8c9d"));Get all notification messages for the authenticated merchant or consumer.
GET /v1/notifications/messages
Auth: Access token (Bearer).
Responses
| Status | Description |
|---|---|
200 | The request was successful and the messages were returned. |
400 | The request failed validation, the error object will contain further information. |
401 | The authorization information provided is not valid, authentication is required to access this resource. |
403 | The authorization header does not contain the correct type or you do not have access to this resource. |
422 | The request payload is invalid, the error object will contain further information. |
429 | Too many requests are being sent concurrently or rate limiting has taken effect. |
500 | An unexpected error occurred, the error object will contain further information. |
Response body
| Field | Type | Required | Description |
|---|---|---|---|
success | boolean | No | Gets a value indicating whether the operation was successful. |
result | array<object>? | No | Gets the response payload. |
json
{
"success": true,
"result": [
{}
]
}Code samples
ts
// @vantagepay/vantagepay
const messages = await client.notifications.getMessages()csharp
// VantagePay.SDK
var messages = await client.Notifications.GetMessagesAsync();Mark a notification message as read.
PATCH /v1/notifications/messages/{messageReference}/read
Auth: Access token (Bearer).
Parameters
| Name | In | Required | Description |
|---|---|---|---|
messageReference | path | Yes | The unique reference of the message. |
Responses
| Status | Description |
|---|---|
200 | The request was successful and the message was marked as read. |
400 | The request failed validation, the error object will contain further information. |
401 | The authorization information provided is not valid, authentication is required to access this resource. |
403 | The authorization header does not contain the correct type or you do not have access to this resource. |
404 | The request was successful but does not return any results. |
422 | The request payload is invalid, the error object will contain further information. |
429 | Too many requests are being sent concurrently or rate limiting has taken effect. |
500 | An unexpected error occurred, the error object will contain further information. |
Response body
| Field | Type | Required | Description |
|---|---|---|---|
success | boolean | No | Gets a value indicating whether the operation was successful. |
json
{
"success": true
}Code samples
ts
// @vantagepay/vantagepay
await client.notifications.markMessageAsRead('2a2b2c2d-3e3f-4a4b-5c5d-6e6f7a7b8c9d')csharp
// VantagePay.SDK
await client.Notifications.MarkMessageAsReadAsync(Guid.Parse("2a2b2c2d-3e3f-4a4b-5c5d-6e6f7a7b8c9d"));