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
api_key<token>

In: query

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

curl -X DELETE "https://example.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"}