Get Tracking Parcel
Retrieves a specific tracking parcel by ID, including its current status and tracking history.
Endpoint
GET /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 retrieve. |
Query Parameters
This endpoint does not support any query parameters at the moment.
Response
200 OK
{
"data": {
"id": "tp_123456",
"tracking_number": "1234567890",
"shipping_channel_id": "ch_123456",
"status": "created",
"recipient_name": "John Doe",
"recipient_email": "john@example.com",
"recipient_phone": "+1234567890",
"created_at": "2025-04-06T10:00:00Z",
"updated_at": "2025-04-07T12:00:00Z",
"status_updates": [
{
"id": "tpu_123456",
"status": "delivered",
"location": "New York, NY",
"description": "Delivered, Front Door",
"timestamp": "2025-04-07T12:00:00Z"
},
{
"id": "tpu_123455",
"status": "out_for_delivery",
"location": "New York, NY",
"description": "Out for delivery",
"timestamp": "2025-04-07T08:30:00Z"
},
{
"id": "tpu_123454",
"status": "in_transit",
"location": "New York Distribution Center",
"description": "Arrived at facility",
"timestamp": "2025-04-07T02:15:00Z"
}
]
}
}
Error Responses
| Status Code | Description |
|---|---|
| 401 | Unauthorized - Invalid or missing API key |
| 403 | Forbidden - You don't have permission to access 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 GET \
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('GET', 'https://api.shipping-channels.com/v1/tracking-parcels/tp_123456', [
'headers' => [
'Authorization' => 'Bearer YOUR_API_KEY',
'Accept' => 'application/json',
],
]);
$data = json_decode($response->getBody(), true);
JavaScript
fetch('https://api.shipping-channels.com/v1/tracking-parcels/tp_123456', {
method: 'GET',
headers: {
'Authorization': 'Bearer YOUR_API_KEY',
'Accept': 'application/json'
}
})
.then(response => response.json())
.then(data => console.log(data))
.catch(error => console.error('Error:', error));
Tracking Status Values
The status field can have the following values:
| Status | Description |
|---|---|
created | Newly created, not yet tracked |
in_transit | Package is in transit |
out_for_delivery | Package is out for delivery |
delivered | Package has been delivered |
exception | Problem with delivery (e.g., failed attempt) |
returning | Package is being returned to sender |
returned | Package has been returned to sender |