Guia de webhooks
Exemplos do corpo JSON enviado em cada evento. Cadastre endpoints em POST /api/webhooks ou na tela Webhooks do painel.
Cada notificação é um POST JSON na sua URL, com:
Content-Type: application/jsonX-Webhook-Event— nome do evento (ex.:DeliveryCreated)X-Hub-Signature—sha256=+ HMAC-SHA256 do corpo com osecretdo endpoint
Nc* incluem origin: delivery (canhoto), occurrence (trânsito) ou freight (CT-e).
DeliveryCreated
Disparado ao criar uma entrega.
{
"event_type": "DeliveryCreated",
"event_id": "66a1b2c3d4e5f",
"timestamp": "2026-07-31T15:30:00+00:00",
"delivery": {
"id": 1001,
"tracking_code": "TRK-ABC123",
"operation_id": 12,
"direction": "outbound",
"description": "Pedido 45890",
"expected_freight_cost": 85.5,
"scheduled_at": "2026-08-20 14:00:00",
"created_at": "2026-07-31 12:30:00"
},
"customer": {
"id": 55,
"name": "Cliente Exemplo LTDA",
"document": "12345678000199",
"email": "contato@cliente.com",
"phone": "11999990000"
},
"destination": {
"address": "Rua das Flores",
"number": "100",
"neighborhood": "Centro",
"city": "São Paulo",
"state": "SP",
"zip_code": "01001000"
},
"invoices": [
{
"invoice_key": "35260712345678000199550010000000011000000010",
"invoice_number": "1",
"invoice_series": "1",
"invoice_value": 1500.0,
"invoice_weight": 12.5,
"item_quantity": 3
}
],
"volumes": {
"total_items": 3,
"total_value": 1500.0,
"invoice_count": 1
}
}
RedeliveryCreated
Disparado ao criar reentrega (ex.: decisão de NC de trânsito approve_redelivery).
{
"event_type": "RedeliveryCreated",
"event_id": "66a1b2c3d4e60",
"timestamp": "2026-07-31T18:00:00+00:00",
"parent_delivery": {
"id": 1001,
"tracking_code": "TRK-ABC123",
"attempt_number": 1
},
"delivery": {
"id": 1002,
"tracking_code": "TRK-ABC123-R2",
"attempt_number": 2,
"parent_delivery_id": 1001
},
"invoices": [
{
"invoice_key": "35260712345678000199550010000000011000000010",
"invoice_number": "1",
"invoice_series": "1",
"invoice_value": 1500.0,
"invoice_weight": 12.5,
"item_quantity": 3
}
]
}
OccurrenceCreated
Disparado ao registrar ocorrência (status) na entrega.
{
"event_type": "OccurrenceCreated",
"event_id": "66a1b2c3d4e61",
"timestamp": "2026-07-31T16:10:00+00:00",
"delivery": {
"id": 1001,
"tracking_code": "TRK-ABC123",
"company_id": 7
},
"customer": {
"id": 55,
"name": "Cliente Exemplo LTDA",
"document": "12345678000199",
"email": "contato@cliente.com",
"phone": "11999990000"
},
"destination": {
"address": "Rua das Flores",
"number": "100",
"complement": "Apto 12",
"neighborhood": "Centro",
"city": "São Paulo",
"state": "SP",
"zip_code": "01001000"
},
"invoices": [
{
"invoice_key": "35260712345678000199550010000000011000000010",
"invoice_number": "1",
"invoice_series": "1",
"invoice_value": 1500.0,
"invoice_weight": 12.5,
"item_quantity": 3
}
],
"status": {
"id": "ENTREGUE",
"name": "Entregue",
"is_final": true,
"is_successful": true,
"notes": "Entrega realizada"
},
"location": {
"latitude": "-23.550520",
"longitude": "-46.633308",
"google_maps_link": "https://www.google.com/maps?q=-23.550520,-46.633308"
},
"actor": {
"user_id": 88,
"name": "Motorista João",
"ip": "203.0.113.10"
},
"evidence": {
"proof_image_url": "https://app.traceablelog.com/media/proof_xyz.jpg",
"signature_image_url": "https://app.traceablelog.com/media/sign_xyz.jpg"
},
"receiver": {
"name": "Maria Silva",
"document": "12345678901"
}
}
AuditCreated
Evidência técnica de canhoto (foto e/ou geo) em final com sucesso. Não dispara em final sem sucesso.
{
"event_type": "AuditCreated",
"delivery_id": 1001,
"tracking_code": "TRK-ABC123",
"audit_data": {
"ip_address": "203.0.113.10",
"geolocation_captured": true,
"proof_image_captured": true,
"coordinates": {
"lat": "-23.550520",
"lng": "-46.633308"
}
}
}
AuditScore
Resultado da auditoria de canhoto. Em reprovação, também pode vir NcCreated com origin=delivery.
{
"event_type": "AuditScore",
"delivery_id": 1001,
"audit_status": "rejected",
"checklist": {
"location": true,
"photo": false,
"receiver": true
},
"notes": "Foto ilegível"
}
NcCreated
NC aberta. Extras variam (ex.: deadline_at / sla_hours no trânsito).
{
"event_type": "NcCreated",
"nc_id": 501,
"origin": "occurrence",
"status": "open",
"decision": null,
"delivery_id": 1001,
"tracking_code": "TRK-ABC123",
"freight_bill_id": null,
"audit_id": null,
"occurrence_id": 9001,
"cte_number": null,
"description": "NC gerada automaticamente pela ocorrência: Destinatário ausente",
"timestamp": "2026-07-31T16:15:00+00:00",
"deadline_at": "2026-08-02 16:15:00",
"sla_hours": 48,
"has_evidence": true
}
Exemplo frete (origin=freight):
{
"event_type": "NcCreated",
"nc_id": 502,
"origin": "freight",
"status": "open",
"decision": null,
"delivery_id": null,
"tracking_code": null,
"freight_bill_id": 330,
"audit_id": null,
"occurrence_id": null,
"cte_number": "123456",
"description": "Divergência CONEMB: provisão R$ 100,00 vs cobrado R$ 150,00",
"timestamp": "2026-07-31T17:00:00+00:00"
}
NcJustified
Justificativa enviada (fluxo de NC de trânsito).
{
"event_type": "NcJustified",
"nc_id": 501,
"origin": "occurrence",
"status": "answered",
"decision": null,
"delivery_id": 1001,
"tracking_code": "TRK-ABC123",
"freight_bill_id": null,
"audit_id": null,
"occurrence_id": 9001,
"cte_number": null,
"description": "NC gerada automaticamente pela ocorrência: Destinatário ausente",
"timestamp": "2026-08-01T10:00:00+00:00",
"justification": "Cliente reagendou a entrega para amanhã.",
"has_evidence": true
}
NcEvaluated
Decisão / resolução da NC. decision e extras (glosa_id, redelivery_id, etc.) dependem do fluxo.
{
"event_type": "NcEvaluated",
"nc_id": 501,
"origin": "occurrence",
"status": "resolved",
"decision": "approve_redelivery",
"delivery_id": 1001,
"tracking_code": "TRK-ABC123",
"freight_bill_id": null,
"audit_id": null,
"occurrence_id": 9001,
"cte_number": null,
"description": "NC gerada automaticamente pela ocorrência: Destinatário ausente",
"timestamp": "2026-08-01T14:00:00+00:00",
"evaluation_status": "resolved",
"solution_note": "Aprovado: reentrega criada",
"redelivery_id": 1002,
"redelivery_tracking_code": "TRK-ABC123-R2",
"glosa_id": null
}