/api/v2/external/webhook, singular.
Register it
events to subscribe to all ten. To narrow it, list the ones you act on:
201 response carries the endpoint and the signing secret. Repeating the same request returns the same endpoint and secret with 200:
subscribedEventTypes is a set; its order has no meaning.
Events
An endpoint created before the newer events existed keeps its own list; add them with
PATCH.
The delivery
Example delivery:shipmentId, reference, merchantCompanyId (the store), status, lifecycleState, shipmentVersion, deliveryFeeAmount, deliveryFeeCurrency, and proofAvailable. reasonCode is added on shipment.failed and shipment.cancelled; eta on shipment.eta_updated. sequence equals shipmentVersion. Several events can share one value — shipment.eta_updated does not change the shipment’s version — so deduplicate on Webhook-Id, not on sequence. Deliveries of different events are not ordered: a retried shipment.created can arrive after shipment.no_driver_available for the same shipment, so apply events by sequence and ignore an older one.
status is the same status the shipment read returns. lifecycleState is DropHub’s internal state name (for example PENDING_APPROVAL, ACCEPTED, DELIVERY_FAILED); it is kept for existing receivers — use status.data.merchantCompanyId identifies the store and each store has its own signing secret.
Verifying the signature
The signed message is:
Webhook-Timestamp is far from your clock.
Responding and retries
Return a2xx quickly and process asynchronously. HTTP 408, 425, 429, 5xx, timeouts, and transport failures are retried with the same Webhook-Id, body, and Idempotency-Key, and a fresh timestamp and signature. The delay before attempt n is a random value up to 30 seconds × 2n−1, capped at 1 hour; Retry-After is honoured up to 1 hour. After 8 attempts the event is not retried again.
There is no replay or test-send API. After an outage, read the shipments you care about — the current status is authoritative.
Changing it
PATCH, DELETE, and rotation require the endpoint’s current version in If-Match (from GET or the last response’s ETag). Missing → 428; stale → 412.
PATCH accepts url, status (ACTIVE or PAUSED), and events. An unknown event name answers 422 UNSUPPORTED_EVENT_TYPE.
After
DELETE /api/v2/external/webhook you can register a new webhook; it gets a new signing secret. While a webhook exists, a second POST with a different body is refused with 409 IDEMPOTENCY_KEY_REUSED.Rotating the secret
signingSecret and sets previousSecretValidUntil 24 hours ahead. Every delivery sent after the rotation — including retries of earlier events — is signed with the new secret only, so switch your verifier to it as soon as you receive it. Keep accepting the old secret only for deliveries already in your queue.