Consultar Notificación
Utilice este endpoint para consultar los detalles de una notificación específica por su id.
Entornos Disponibles
- Producción
https://api.gateway.com.br/dispatcher
Endpoint
- Método:
GET - Endpoint:
/request/{id} - Autenticación: Bearer token
Path Params
| Nombre | Tipo | Obligatorio | Descripción | Validaciones |
|---|---|---|---|---|
id | string | Sí | Identificador de la notificación | Debe ser un ID de notificación válido |
Ejemplo de Solicitud
- cURL
- JavaScript
curl --request GET \
--url https://api.gateway.com.br/dispatcher/request/553e8400-e29b-41d4-a716-446655440000 \
--header 'Authorization: Bearer su-token-jwt'
const response = await fetch('https://api.gateway.com.br/dispatcher/request/553e8400-e29b-41d4-a716-446655440000', {
method: 'GET',
headers: {
'Authorization': 'Bearer su-token-jwt'
}
});
const data = await response.json();
Respuesta Exitosa
| Campo | Tipo | Obligatorio | Descripción |
|---|---|---|---|
id | string | Sí | ID de la notificación |
hash | string | Sí | Hash de la notificación |
tenant | string | Sí | Tenant de la notificación |
url | string | Sí | URL de destino de la notificación |
referenceId | string | Sí | ID de referencia |
body | object | string | Sí | Payload enviado en la notificación |
tags | string[] | Sí | Etiquetas de la notificación |
status | string (enum) - RECEIVED, SENT, FAILED, ERROR | Sí | Estado actual de la notificación |
statusHistory | array | Sí | Historial de estados (ver Sub-Objeto StatusHistory) |
createdAt | string (ISO) | Sí | Fecha de creación |
updatedAt | string (ISO) | Sí | Fecha de la última actualización |
executions | array | Sí | Ejecuciones de la notificación (ver Sub-Objeto Execution) |
error | string | Sí | Mensaje de error de la notificación (devuelve null cuando no hay error) |
Sub-Objetos
StatusHistory (elemento)
| Campo | Tipo | Obligatorio | Descripción |
|---|---|---|---|
status | string | Sí | Estado registrado en el historial |
date | string (ISO) | Sí | Fecha y hora del cambio de estado |
durationInMilliseconds | number | No | Duración del estado anterior en milisegundos |
Execution (item)
| Campo | Tipo | Obligatorio | Descripción |
|---|---|---|---|
url | string | Sí | URL llamada en la ejecución de la notificación |
headers | object | No | Headers enviados en la ejecución |
createdAt | string (ISO) | Sí | Fecha y hora de la ejecución |
response | object | Sí | Respuesta de la ejecución (ver Sub-Objeto ResponseVo) |
userId | string | Sí | Identificador del usuario relacionado con la ejecución |
storeId | string | Sí | Identificador de la tienda relacionada con la ejecución |
ResponseVo
| Campo | Tipo | Obligatorio | Descripción |
|---|---|---|---|
statusCode | number | Sí | Código de estado HTTP devuelto por el destino |
body | any | Sí | Cuerpo de la respuesta devuelto por el destino |
responseTime | number | Sí | Tiempo de respuesta de la ejecución en milisegundos |
Ejemplo de Respuesta (con todos los campos)
{
"id": "553e8400-e29b-41d4-a716-446655440000",
"hash": "ffb2f88d-a863-4a03-bf53-81e7ef73db31",
"tenant": "splitwave.com.br",
"url": "https://api.example.com/webhook",
"referenceId": "123e4567-e89b-12d3-a456-426614174001",
"body": {
"event": "PAYMENT_APPROVED",
"amount": 1000
},
"tags": ["webhook", "notification"],
"status": "RECEIVED",
"statusHistory": [
{
"status": "RECEIVED",
"date": "2026-03-24T10:00:00.000Z",
"durationInMilliseconds": 1000
},
{
"status": "FAILED",
"date": "2026-03-24T10:00:01.000Z",
"durationInMilliseconds": 4000
},
{
"status": "SENT",
"date": "2026-03-24T10:00:05.000Z"
}
],
"createdAt": "2026-03-24T10:00:00.000Z",
"updatedAt": "2026-03-24T10:00:05.000Z",
"executions": [
{
"url": "https://api.example.com/webhooks/order-events",
"headers": {
"Content-Type": "application/json",
"X-Splitwave-Signature": "sha256=abcdef123456"
},
"createdAt": "2026-03-24T10:00:01.000Z",
"response": {
"statusCode": 500,
"body": "Internal Server Error",
"responseTime": 1200
},
"userId": "11111111-1111-1111-1111-111111111111",
"storeId": "22222222-2222-2222-2222-222222222222"
},
{
"url": "https://api.example.com/webhooks/order-events",
"headers": {
"Content-Type": "application/json",
"X-Splitwave-Signature": "sha256=abcdef123456"
},
"createdAt": "2026-03-24T10:00:05.000Z",
"response": {
"statusCode": 200,
"body": "ok",
"responseTime": 350
},
"userId": "11111111-1111-1111-1111-111111111111",
"storeId": "22222222-2222-2222-2222-222222222222"
}
],
"error": "Connection timeout on first attempt"
}
Errores Posibles
| Código | Descripción | Solución |
|---|---|---|
| 401 | Credenciales inválidas | Verifique su token |
| 403 | Sin permiso/autorización | Verifique el alcance get_dispatcher |
| 404 | Notificación no encontrada | Verifique el id enviado |
| 500 | Error interno | Contacte al soporte |