Skip to main content

Delete Tracking Parcel

Deletes a tracking parcel from your account. This stops all tracking and removes the parcel from your account.

Endpoint

DELETE /v1/tracking-parcels/{id}

Authentication

API key required. Include it in the Authorization header:

Authorization: Bearer YOUR_API_KEY

Path Parameters

ParameterTypeDescription
idstringThe ID of the tracking parcel to delete.

Response

204 No Content

A successful deletion returns a 204 No Content response with no body.

Error Responses

Status CodeDescription
401Unauthorized - Invalid or missing API key
403Forbidden - You don't have permission to delete this tracking parcel
404Not Found - The specified tracking parcel could not be found
429Too Many Requests - Rate limit exceeded
500Server Error - Something went wrong on our end

Example Request

cURL

curl -X DELETE \
https://api.shipping-channels.com/v1/tracking-parcels/tp_123456 \
-H "Authorization: Bearer YOUR_API_KEY"

PHP

<?php
$client = new \GuzzleHttp\Client();

$response = $client->request('DELETE', 'https://api.shipping-channels.com/v1/tracking-parcels/tp_123456', [
'headers' => [
'Authorization' => 'Bearer YOUR_API_KEY',
'Accept' => 'application/json',
],
]);

// 204 No Content response indicates success
$statusCode = $response->getStatusCode();

JavaScript

fetch('https://api.shipping-channels.com/v1/tracking-parcels/tp_123456', {
method: 'DELETE',
headers: {
'Authorization': 'Bearer YOUR_API_KEY',
'Accept': 'application/json'
}
})
.then(response => {
if (response.status === 204) {
console.log('Tracking parcel deleted successfully');
} else {
return response.json().then(data => Promise.reject(data));
}
})
.catch(error => console.error('Error:', error));

Implications of Deletion

You can only delete external tracking parcels. Internal tracking parcels cannot be deleted via this endpoint.

When you delete a tracking parcel:

  1. All tracking for the parcel stops immediately
  2. The parcel and its tracking history are removed from your account
  3. Any webhook subscriptions for this parcel will no longer receive updates
  4. This action cannot be undone

If you need to resume tracking for a deleted parcel, you'll need to create a new tracking parcel with the same tracking number.