This guide covers when and how to cancel or delete parcel records.Cancel vs Delete#
| Action | Effect | Use case |
|---|
| Cancel | Parcel is marked as discarded but remains in system. Suffix added to identifiers, allowing reuse of sender parcel number. | Changing service code, correcting core data errors |
| Delete | Parcel is permanently removed from the system. | Removing test data, cleaning up duplicates |
When to cancel a parcel#
Once a parcel is created successfully, certain core data cannot be updated directly. To change these fields, you must cancel the existing parcel and create a new one:Service code (channel) - Cannot change the delivery channel after creation
Receiver (consignee) data - Address, country, or other receiver details that affect routing
Parcel number format - Different services use different number formats
Parcel can be updated by calling the API with the same identifiers (senderParcelNr and/or parcelNr). If the update results in an error, cancel the parcel and re-create with corrected data.Cancel a parcel#
Cancel a parcel by setting
isCancelled: true in the status section. Use the same identifiers as the original parcel.
@host = https:
@apiKey = apitest1234567890
PUT {{host}}/api/v1/parcels
content-type: application/json
X-API-KEY: {{apiKey}}
{
"identifiers": {
"senderParcelNr": "Test-SE-0036"
},
"status": {
"isCancelled": true
}
}
A suffix is added to senderParcelNr and parcelNr
The original senderParcelNr can be reused for a new parcel
The parcel record remains in the system for audit purposes
Delete a parcel#
Delete a single parcel by its ID.
@host = https:
@apiKey = apitest1234567890
DELETE {{host}}/api/v1/parcels/{{parcelId}}
X-API-KEY: {{apiKey}}
Delete multiple parcels in a single request.
@host = https:
@apiKey = apitest1234567890
DELETE {{host}}/api/v1/parcels/delete-many?Ids={{parcelId1}},{{parcelId2}},{{parcelId3}}
X-API-KEY: {{apiKey}}
Workflow: Changing core parcel data#
1.
Cancel the existing parcel
2.
Create a new parcel with the same senderParcelNr (now available) and corrected data
3.
A new parcelNr will be generated