Skip to main content

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

ParameterTypeDescription
idstringThe 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 CodeDescription
401Unauthorized - Invalid or missing API key
403Forbidden - You don't have permission to access 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 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:

StatusDescription
createdNewly created, not yet tracked
in_transitPackage is in transit
out_for_deliveryPackage is out for delivery
deliveredPackage has been delivered
exceptionProblem with delivery (e.g., failed attempt)
returningPackage is being returned to sender
returnedPackage has been returned to sender