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
| Parameter | Type | Description |
|---|---|---|
id | string | The 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 Code | Description |
|---|---|
| 401 | Unauthorized - Invalid or missing API key |
| 403 | Forbidden - You don't have permission to delete this tracking parcel |
| 404 | Not Found - The specified tracking parcel could not be found |
| 429 | Too Many Requests - Rate limit exceeded |
| 500 | Server 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:
- All tracking for the parcel stops immediately
- The parcel and its tracking history are removed from your account
- Any webhook subscriptions for this parcel will no longer receive updates
- 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.