Manage Notifications
This page details how to retrieve different kinds of notification, as well as how to resend Thredd notifications.
Get Notifications for Event Code
The Get Notifications for Event Code endpoint enables you to retrieve notifications related to an event code associated with a webhook, based on the webhookId and eventCode specified in the URL. You can retrieve a notifications for an event code by making a GET request to the Get Notifications for Event Code endpoint, including the webhookId, eventCode, the date in which the notification was created, and the count.
In the below example, the webhook is id 1234, the eventCode is 5678, the notification date is the 17th March 2024, and the count is 10.
https://thredd.webhook.management/api/v1/Webhooks/1234/events/5678/notifications?from=2024-03-17&count=10
If successful, a 200 response will return with notifications for the time frame entered in the URL to the current time, up to the limit set by the count field.
{
"status": "success",
"response": {
"webhookid": "af2d48de-2ad7-42f8-a252-8422cd9e6078",
"content": [
{
"eventCode": 101,
"notificationId": "1212-8543434-232",
"notificationStatus": "Delivered",
"payload": {
"cardholderName": "John Doe",
"last4Digits": 1234,
"transactionId": 98765432101212,
"tokenId": 545454121,
"transactionAmount": "50.75",
"currency": "USD",
"merchantName": "Sample Merchant",
"location": "London, United Kingdom",
"dateTime": "2024-01-24T14:30:00Z",
"mcc": "1234",
"posMode": "Online",
"cardProductName": "Gold Card",
"notificationMessageContent": "Did you attempt $50.75 on card ending 1234 at Example Merchant ? We suspect fraud and blocked the card, Acknowledge if you made this purchase."
},
"createdTime": "2024-01-24T23:20:28.000Z",
"lastSentTime": "2024-01-24T23:20:28.000Z"
}
]
}
}
More Information
- For more information on the fields in the Get Notifications for Event Code endpoint, see Get Notifications for Event Code - Field Descriptions
- See Get Notifications for Event Code to view the endpoint in the API Explorer
Get Notification Details
The Get Notification Details endpoint enables you to retrieve notifications based on a list of notification identifiers included in the request body. You can retrieve notification details by making a PUT request to the Get Notification Details endpoint, including the webhookId in the URL. For example:
https://thredd.webhook.management/api/v1/Webhooks/{webhook_id}/notifications
The request body should include the notification Ids you want to get the details of. For example:
{
"notificationIds" : ["1212-8543434-232","34343-7989-46232"]
}
If successful, a 200 response is returned and the details of the notifications specified in the request body are displayed.
{
"status": "success",
"response" : {
"webhookId": "12345",
"content": [
{
"eventCode": 101,
"notificationId": "1212-8543434-232",
"notificationStatus": "Pending",
"paylod": object,
"createdTime": "2024-01-24T23:20:28Z",
"lastSentTime": "2024-01-24T23:20:28Z"
},
{
"eventCode": 101,
"notificationId": "34343-7989-46232",
"notificationStatus": "Delivered",
"paylod": object,
"createdTime": "2024-01-24T23:20:28Z",
"lastSentTime": "2024-01-24T23:20:28Z"
}
]
}
More Information
- For more information on the fields in the Get Notification Details endpoint, see Get Notification Details - Field Descriptions
- See Get Notification Details to view the endpoint in the API Explorer
Get Undelivered Notification Details
The Get Undelivered Notification Details endpoint enables you to retrieve the count and notification Id of undelivered notifications against each event code from the date specified in the URL. You can retrieve undelivered notifications by making a GET request to the Get Undelivered Notification Details endpoint, including the webhookId and from date in the URL.
In the below example, the webhook ID is 1234 and the from date is set to the 17th March 2024, meaning that the response will include undelivered notifications for webhook 1234 from date onwards.
https://thredd.webhook.management/api/v1/Webhooks/{webhookId}/notifications/undelivered?from=2024-03-17
If successful, a 200 response is returned and a response displays a list of notification IDs that have been undelivered.
{
"status": "success",
"response": {
"webhookid": "af2d48de-2ad7-42f8-a252-8422cd9e6078",
"content": [
{
"eventCode": 101,
"count": 5,
"notificationId": [
"3434-8543-232",
"5656-7989-546",
"9866-5654-532"
]
}
],
"totalCount": 3
}
}
More Information
- For more information on the fields in the Get Undelivered Notification Details endpoint, see Get Undelivered Notification Details - Field Descriptions
- See Get Undelivered Notification Details to view the endpoint in the API Explorer
Resend Thredd Notifications
The Resend Thredd Notifications endpoint enables you to resend notifications sent through the Thredd platform to the intended client recipients. This action can be necessary in cases where notifications were not successfully delivered, or when you require the notification to be resent for any reason.
You can resend Thredd notifications by making a POST request to the Resend Thredd Notifications endpoint, including the webhookId in the URL. The header of the request must also include the program manager identifier (X-PM-Code
)For example:
https://thredd.webhook.management/api/v1/Webhooks/{webhook_id}/resend
The body should include the notification identifiers you want to resend. The header of the request must also include the program manager identifier (X-PM-Code
)For example:
curl --request POST \
--url https://thredd.webhook.management/api/v1/Webhooks/af2d48de-2ad7-42f8-a252-8422cd9e6078/resend \
--header 'X-PM-Code: 10023' \
--header 'accept: application/json' \
--header 'content-type: application/json' \
--data '
{
"notificationIds": [
"1313-8543434-999",
"1212-8543434-232"
]
}
'
If successful, a 200 response is returned with notification that the resend process has either started, or notification that there has been an issue.
{
"status": "success",
"response" : {
"webhookId":"12345",
"content": [
{
"notificationId" : "1212-8543434-232",
"resendStatus": "Resend request initiated",
},
{
"notificationId" : "34343-7989-46",
"resendStatus": "Unable to resend request",
},
{
"notificationId" : "5456-56542-532",
"resendStatus": "Invalid notification details",
},
]
}
More Information
- For more information on the fields in the Resend Thredd Notifications endpoint, see Resend Thredd Notifications - Field Descriptions
- See Resend Thredd Notifications to view the endpoint in the API Explorer
Create Fraud Alert Response
The Fraud Alert Response endpoint is used to deliver feedback regarding a fraud alert from the client, primarily consisting of the cardholder's response to the fraud alert.
You can send a fraud alert response by making a POST request to the Fraud Alert Response endpoint. For example:
https://thredd.webhook.management/api/v1/fraudalertresponse
The request body can include information about the alert, such as the unique identifier for the fraud alert, the notification identifier, and the response form the cardholder. See the below for an example.
{
"fraudAlertId": "af5d48de-2ad7-62f8-a252-743cd9e6078",
"notificationId": "f47ac10b-58cc-4372-a567-0e02b2c3d479",
"response": "YES"
}
If successful, a 200 response is returned with the status of the response and details on the request. See the below for an example.
{
"status": "success",
"response": "The request was successful"
}
More Information
- For more information on the fields in the Fraud Alert Response endpoint, see Fraud Alert Response - Field Descriptions
- See Fraud Alert Response to view the endpoint in the API Explorer
Updated 3 months ago