Skip to Content
API ReferenceTracking Subscriptions

Tracking Subscriptions

A subscription links your webhook to one shipment (ldv). You are only notified about shipments you have explicitly subscribed to.

MethodPathDescription
GET/webhook/subscriptionsList your subscriptions
POST/webhook/subscriptionsSubscribe to a shipment
DELETE/webhook/subscriptions/{ldv}Unsubscribe from a shipment

All three endpoints require a registered webhook. Without one they return 409.


Subscribe to a Shipment

POST /webhook/subscriptions

Body Parameters

FieldTypeRequiredDescription
ldvstringYesShipment number, max 64 characters. Normalised to uppercase
curl -X POST https://delivery.spedisci.online/api/v2026-04/webhook/subscriptions \ -H "Authorization: Bearer <access_token>" \ -H "Content-Type: application/json" \ -H "Accept: application/json" \ -d '{ "ldv": "ABC123456789" }'

Response Codes

CodeDescription
201Created — new subscription
200OK — you were already subscribed, the existing subscription is returned
401Missing or invalid access token
409No webhook registered
422Validation failed (ldv missing or longer than 64 characters)

The operation is idempotent: subscribing twice to the same ldv never creates a duplicate. Use the status code to tell the two cases apart — 201 means it was just created, 200 means it already existed.

Subscribing does not verify that the shipment exists. You can subscribe before the shipment is created — notifications start flowing as soon as its first status change happens.


List Subscriptions

GET /webhook/subscriptions

curl https://delivery.spedisci.online/api/v2026-04/webhook/subscriptions \ -H "Authorization: Bearer <access_token>" \ -H "Accept: application/json"
{ "data": [ { "ldv": "ABC123456789", "last_status": 5, "last_status_at": "2026-04-18T14:32:05+00:00", "delivered_at": "2026-04-18T14:32:05+00:00", "created_at": "2026-04-15T11:04:19+00:00" }, { "ldv": "XYZ987654321", "last_status": 3, "last_status_at": "2026-04-17T06:03:12+00:00", "delivered_at": null, "created_at": "2026-04-16T08:00:00+00:00" } ] }

Subscriptions are returned newest first (by created_at descending).

Subscription Object

FieldTypeDescription
ldvstringThe shipment number, uppercased
last_statusnumber | nullLast status code you were notified about. null before the first notification
last_status_atstring | nullISO-8601 timestamp of the last notification
delivered_atstring | nullISO-8601 timestamp when the shipment reached status 5. Drives the 30-day pruning window
created_atstringISO-8601 timestamp when the subscription was created

Response Codes

CodeDescription
200OK — array in data (possibly empty)
401Missing or invalid access token
409No webhook registered

Unsubscribe

DELETE /webhook/subscriptions/{ldv}

curl -X DELETE https://delivery.spedisci.online/api/v2026-04/webhook/subscriptions/ABC123456789 \ -H "Authorization: Bearer <access_token>" \ -H "Accept: application/json"
{ "code": 200, "status": "success", "message": "Subscription removed." }

Response Codes

CodeDescription
200Subscription removed
401Missing or invalid access token
404Subscription not found
409No webhook registered

Automatic Pruning

Once a shipment is delivered (status 5) there are no further updates, so its subscription is deleted automatically 30 days after delivery. Disappearing subscriptions in that state are expected behaviour, not an error.

If you need the history of a delivered shipment after that point, use GET /tracking/{ldv} — available for 90 days from shipment creation.

Last updated on