1.0.0
OAS3
Welcome to Parcels API - track any package and shipment in the world.
The tracking is done in 2 phases, since it can take some time to fetch tracking information.
Please note, that you don't need to store UUID, initiate new Tracking Request to get new UUID, every time your require updated tracking result.
Tracking Request UUIDs are temporary and are kept only for 30 minutes, to allow tracking process to finish and for your code to have time to query tracking results.
You will receive unique identifier of the tracking request or uuid for short.
You can also get all or part of the requested tracking results in response which are cached at the moment. In this case fromCache flag will be set to true
cURL call:
curl --location --request POST 'https://parcelsapp.com/api/v3/shipments/tracking' \
--header 'Content-Type: application/json' \
--data-raw '{
"shipments": [
{
"trackingId": "EE10021942088880001030003D0N",
"destinationCountry": "Canada"
}
],
"language": "en",
"apiKey": "<YOUR API KEY>"
}'
Node.js with Axios
var axios = require('axios');
var data = JSON.stringify({
"shipments": [
{
"trackingId": "EE10021942088880001030003D0N",
"destinationCountry": "Canada"
}
],
"language": "en",
"apiKey": "<YOUR API KEY>"
});
var config = {
method: 'post',
url: 'https://parcelsapp.com/api/v3/shipments/tracking',
headers: {
'Content-Type': 'application/json'
},
data : data
};
axios(config)
.then(function (response) {
console.log(JSON.stringify(response.data));
})
.catch(function (error) {
console.log(error);
});
You will receive shipment status updates with attributes like weight, origin, destination, etc. if applicable. Repeat calling this method until you get results or error.
cURL call:
curl --location --request GET 'https://parcelsapp.com/api/v3/shipments/tracking?uuid=<UUID from Step 1>&apiKey=<YOUR API KEY>' --header 'Accept: application/json'
Node.js with Axios
var axios = require('axios');
var config = {
method: 'get',
url: 'https://parcelsapp.com/api/v3/shipments/tracking?uuid=<UUID from Step 1>&apiKey=<YOUR API KEY>',
headers: {
'Accept': 'application/json'
}
};
axios(config)
.then(function (response) {
console.log(JSON.stringify(response.data));
})
.catch(function (error) {
console.log(error);
});
const request = require('request');
const apiKey = 'your_api_key_here';
const trackingUrl = 'https://parcelsapp.com/api/v3/shipments/tracking';
const shipments = [{ trackingId: 'tracking_number_1', language: 'en', country: 'United States' },
{ trackingId: 'tracking_number_2', language: 'en', country: 'Canada' },
...];
// Initiate tracking request
request.post({
url: trackingUrl,
json: { apiKey: apiKey, shipments: shipments }
}, (err, res, body) => {
if (err) {
console.error(err);
} else {
// Get UUID from response
const uuid = body.uuid;
// Function to check tracking status with UUID
const checkTrackingStatus = () => {
request.get({
url: `${trackingUrl}?apiKey=${apiKey}&uuid=${uuid}`
}, (err, res, body) => {
if (err) {
console.error(err);
} else {
if (body.done) {
console.log('Tracking complete');
} else {
console.log('Tracking in progress...');
setTimeout(checkTrackingStatus, 1000);
}
}
});
}
checkTrackingStatus();
}
});
import requests
import json
import time
apiKey = 'your_api_key_here'
trackingUrl = 'https://parcelsapp.com/api/v3/shipments/tracking'
shipments = [{'trackingId': 'tracking_number_1', 'language': 'en', 'country': 'United States'},
{'trackingId': 'tracking_number_2', 'language': 'en', 'country': 'United States'},
...]
# Initiate tracking request
response = requests.post(trackingUrl, json={'apiKey': apiKey, 'shipments': shipments})
if response.status_code == 200:
# Get UUID from response
uuid = response.json()['uuid']
# Function to check tracking status with UUID
def check_tracking_status():
response = requests.get(trackingUrl, params={'apiKey': apiKey, 'uuid': uuid})
if response.status_code == 200:
if response.json()['done']:
print('Tracking complete')
else:
print('Tracking in progress...')
time.sleep(N) # sleep for N sec
check_tracking_status()
else:
print(response.text)
check_tracking_status()
else:
print(response.text)
Create tracking requests and retrieve results