Resending notifications
This guide is aimed at presenting how to resend a webhook through our systems' endpoints. Resending webhooks may be done to any existing callback, regardless of its current status.
Notification flow
- It is necessary to first consult pre-existing events in order to gather data to resend notifications, listed in Request
- Once gathering the desired webhooks' information using the GET method, you will need to pass the event_key and callback_key inside your PATCH request, presented in Resending a callback
Listing eligible events
Request
ENDPOINT
/notification/events
METHOD
GETQuery Parameters
Parameter | Type | Description |
---|---|---|
event_type | string | Event Type (ex: "debt_disbursed") |
callback_status | string | Callback Status (ex: "failed", "sent", etc.) |
origin_key | uuid | Unique event key |
start_datetime | string | Starting date/time of event "YYYY-MM-DDTHH:mm:ssZ" (UTC timezone) |
end_datetime | string | End date/time of event "YYYY-MM-DDTHH:mm:ssZ" (UTC timezone) |
Observation: The time window between
start_datetime
andend_datetime
must be at most 14 days, or else an error will be returned.
Response
STATUS
200Response Body
{
"data": [
{
"event_key": "<UUID>",
"event_type": "debt_disbursed",
"status": "processed",
"origin_enumerator": "account",
"origin_key": "<UUID>",
"callbacks": [
{
"callback_key": "<UUID>",
"callback_status": "failed"
}
],
}
],
"pagination": {
"current_page": 1,
"rows_per_page": 25,
}
}
Response Parameters
Parameters | Type | Description |
---|---|---|
event_key | uuid | Event unique key |
event_type | string | Event type (ex: "debt_disbursed") |
status | string | Event Status (ex: "processed") |
origin_enumerator | string | API origin enumeratior (ex: "lego") |
origin_key | uuid | Origin unique key |
callbacks | list | Callback object list |
pagination | object | Object Pagination |
Callback Object
Parameters | Type | Description |
---|---|---|
callback_key | uuid | Calback unique key |
callback_status | string | Callback Status (ex: "failed", "sent", etc.) |
Pagination Object
Parameter | Type | Description |
---|---|---|
current_page | integer | Current page number |
rows_per_page | integer | Number of rows per page |
STATUS
400Response Body: Error
{
"code": "PMB000032",
"title": "Bad Request",
"description": "Selected timeframe should have a maximum of 14 days",
"translation": "O intervalo de tempo selecionado deve ter no máximo 14 dias",
}
Resending a callback
Request
Time limit
The window for searches is limited to 14 days.
Observations
Please check you are utilizing the event_key and callback_key fields gathered in the previous request.
ENDPOINT
/notification/event/{event_key}/callback/{callback_key}/retry
METHOD
PATCHPath Parameters
Parameter | Type | Description |
---|---|---|
event_key | uuid | Event unique key (obtained in GET method) |
callback_key | uuid | Callback unique key (obtained in GET method) |
Example usage
curl -X PATCH "https://api-auth.sandbox.qitech.app/notification/event/123e4567-e89b-12d3-a456-426614174000/callback/987fcdeb-51a2-43d7-9012-345678901234/retry"
Response
STATUS
204Response Body
{}
Troubleshooting
When facing errors:
- Verify the
event_key
andcallback_key
are correct. - Confirm the callback exists.
- Verify the time window is within 14 days.
- In case you are experiencing continuous errors, please contact the support team.