webhooks
PATCH /api/v3/webhooks/{webhook_id}
Changed onUpdate webhook configuration. You can update headers or/and status_rules.
webhook notification example:
{
"headers": {
"Content-Type": "application/json" // Change the headers
},
"status_rules": {
"allowed_status_names": [
"delivered" // Change the allowed status names
]
}
}
Catálogo de estados predeterminados
Los siguientes 15 estados se incluyen por defecto al registrar un webhook.
Para actualizar la suscripción, envía los valores de StatusName en status_rules.allowed_status_names. La lista enviada reemplaza la lista configurada actualmente. StatusCode se incluye como referencia del evento notificado y se envía como string; StatusName utiliza camelCase.
| StatusCode | StatusName |
|---|---|
| 2002 | onRoadToPickup |
| 2003 | collected |
| 2101 | unsuccessfulPickup |
| 3001 | stored |
| 3004 | onLinehaul |
| 4001 | onRoadToDelivery |
| 4002 | delivered |
| 4101 | unsuccessfulDelivery |
| 5001 | onRoadToReturn |
| 5002 | returned |
| 5101 | unsuccessfulReturn |
| 8001 | stolen |
| 8002 | lost |
| 8003 | cancelled |
| 8005 | invalidAddress |
Request
- Base URLhttps://delivery.99minutos.com
- URLhttps://delivery.99minutos.com/api/v3/webhooks/{webhook_id}
- AuthHTTP bearer
Request body
Example request
{
"status_rules": {
"allowed_status_names": [
"delivered",
"unsuccessfulDelivery",
"unsuccessfulReturn"
]
}
}Response
Config Response
Changes
- info
endpoint added
- info