Skip to main content

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​

  1. It is necessary to first consult pre-existing events in order to gather data to resend notifications, listed in Request
  2. 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
GET

Query Parameters​

ParameterTypeDescription
event_typestringEvent Type (ex: "debt_disbursed")
callback_statusstringCallback Status (ex: "failed", "sent", etc.)
origin_keyuuidUnique event key
start_datetimestringStarting date/time of event "YYYY-MM-DDTHH:mm:ssZ" (UTC timezone)
end_datetimestringEnd date/time of event "YYYY-MM-DDTHH:mm:ssZ" (UTC timezone)

Observation: The time window between start_datetime and end_datetime must be at most 14 days, or else an error will be returned.

Response​

STATUS
200
Response 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​

ParametersTypeDescription
event_keyuuidEvent unique key
event_typestringEvent type (ex: "debt_disbursed")
statusstringEvent Status (ex: "processed")
origin_enumeratorstringAPI origin enumeratior (ex: "lego")
origin_keyuuidOrigin unique key
callbackslistCallback object list
paginationobjectObject Pagination

Callback Object​

ParametersTypeDescription
callback_keyuuidCalback unique key
callback_statusstringCallback Status (ex: "failed", "sent", etc.)

Pagination Object​

ParameterTypeDescription
current_pageintegerCurrent page number
rows_per_pageintegerNumber of rows per page
STATUS
400
Response 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
PATCH

Path Parameters​

ParameterTypeDescription
event_keyuuidEvent unique key (obtained in GET method)
callback_keyuuidCallback 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
204
Response Body
{}

Troubleshooting​

When facing errors:

  1. Verify the event_key and callback_key are correct.
  2. Confirm the callback exists.
  3. Verify the time window is within 14 days.
  4. In case you are experiencing continuous errors, please contact the support team.