Tracking Subscriptions
A subscription links your webhook to one shipment (ldv). You are only notified about shipments you
have explicitly subscribed to.
| Method | Path | Description |
|---|---|---|
GET | /webhook/subscriptions | List your subscriptions |
POST | /webhook/subscriptions | Subscribe 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
| Field | Type | Required | Description |
|---|---|---|---|
ldv | string | Yes | Shipment number, max 64 characters. Normalised to uppercase |
cURL
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
| Code | Description |
|---|---|
201 | Created — new subscription |
200 | OK — you were already subscribed, the existing subscription is returned |
401 | Missing or invalid access token |
409 | No webhook registered |
422 | Validation 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
| Field | Type | Description |
|---|---|---|
ldv | string | The shipment number, uppercased |
last_status | number | null | Last status code you were notified about. null before the first notification |
last_status_at | string | null | ISO-8601 timestamp of the last notification |
delivered_at | string | null | ISO-8601 timestamp when the shipment reached status 5. Drives the 30-day pruning window |
created_at | string | ISO-8601 timestamp when the subscription was created |
Response Codes
| Code | Description |
|---|---|
200 | OK — array in data (possibly empty) |
401 | Missing or invalid access token |
409 | No 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
| Code | Description |
|---|---|
200 | Subscription removed |
401 | Missing or invalid access token |
404 | Subscription not found |
409 | No 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.