Skip to Content
TimeToCargo

Delete or archive tracked shipments

Download OpenAPI
DELETE
/v2/shipments

A non-archived tracking record created no more than 72 hours ago is deleted with a refund of one tracking credit if shipment_status is not IN_TRANSIT, including DELIVERED, UNKNOWN, and STUCK. Records with IN_TRANSIT and non-archived records older than 72 hours are archived without a refund. Records that are already archived are deleted without a refund. Deleted IDs are returned in data.deleted, and archived IDs in data.archived.

Authorization

api_key
queryapi_key<token>

Request Body

application/json
  1. body
shipmentIds*array<string>

List of UUIDs of shipments that you want to delete

Response Body

OK

application/json
  1. response
success*boolean

Whether processing succeeded. For tracking results, also check status: success=true does not mean data was found.

data*|

Information about deleted and archived shipments

status*string

Request execution status

Value in"OK""WRONG_PARAMS""UNEXPECTED_ERROR""INFO_NOT_FOUND""LINE_IS_UNDER_MAINTENANCE""LINE_NO_RESPONSE""API_KEY_WRONG""API_KEY_LIMIT_REACHED""API_KEY_RATE_LIMIT""LOW_BALANCE""SERVICE_UNAVAILABLE"
status_description*|

Status description

Example Request
curl -X DELETE 'https://tracking.timetocargo.com/v2/shipments' \  -H 'Content-Type: application/json' \  -d '{  "shipmentIds": [    "9ff48bf7-4541-49e2-947c-c269200e030f",    "fb8936b9-ff16-4776-8710-d4073ab06d1e",    "2305a40b-97b2-4c1b-94c4-6d9416b22bde"  ]}'
{  "success": true,  "data": {    "deleted": [      "9ff48bf7-4541-49e2-947c-c269200e030f",      "fb8936b9-ff16-4776-8710-d4073ab06d1e"    ],    "archived": [      "2305a40b-97b2-4c1b-94c4-6d9416b22bde"    ]  },  "status": "OK",  "status_description": "Shipments have been successfully removed"}