How do I get tracking by API or webhook?

Last reviewed on by DeltaVelocity team

Choose a method

Use webhooks when you need changes as they happen. Use the change feed to catch up or to check your webhook records. See Shipping API and MCP and the API integration overview.

Read tracking

Use GET /v1/shipments/{shipment_id} for the current state. Use GET /v1/shipments/{shipment_id}/tracking for the event history. The first call needs the orders:read scope. The second call needs the tracking:read scope. Save shipment_id as your join key.

Poll the change feed

Use GET /v1/shipments?updated_since=<timestamp>. It returns shipments in the order they changed.

The feed holds back changes from the last 60 seconds. It lags real time by about a minute. A change can appear twice, so start each poll a few minutes before the newest updated_at you saw. Remove repeats by shipment_id and updated_at.

Receive webhooks

  1. Deploy a public HTTPS receiver.
  2. Open Settings, then Developer, then Webhooks. Only brand admins can do this.
  3. Enter the Endpoint URL and pick the Events.
  4. Save the secret. DeltaVelocity shows it once.
  5. Verify each request before you read it.

You can also create an endpoint with POST /v1/webhooks.

DeltaVelocity publishes 13 webhook events in total:

  • 8 shipment events: shipment.created, shipment.picked_up, shipment.delivered, shipment.ndr, shipment.rto_initiated, shipment.rto_delivered, shipment.cancelled and shipment.status_changed.
  • 5 communication events: communication.message.received, communication.message.status, communication.request.created, communication.request.updated and communication.request.decided.

Verify the signature and rotate secrets

DeltaVelocity signs each webhook with HMAC-SHA256. The DV-Signature header has the form t=<unix seconds>,v1=<hex>. Compute the signature over the timestamp, a dot and the raw body. Reject timestamps more than five minutes from your clock.

When you rotate a signing secret, DeltaVelocity signs requests with both the new and previous secrets for 24 hours. Accept any matching v1= signature during that grace window.

Read set up webhooks and rotate secrets for full setup, test pings, dual-secret rotation and auto-disable alerts.

Retries and replay

DeltaVelocity tries a failed webhook 5 times in total. It tries once, then again after 1 minute, 10 minutes, 1 hour and 6 hours. After that it marks the delivery dead.

In Settings, Developer, Webhooks, open Deliveries and select Replay on a dead delivery. DeltaVelocity does not deliver events that occur while you pause an endpoint. You cannot replay them.

Related

Read the full reference in the DeltaVelocity docs

Ship with DeltaVelocity

Connect your store, compare couriers and track COD remittance from one dashboard.

Was this helpful?