Tracking Number Carrier Detector API
Guess the carrier of a tracking number: GHN, GHTK, Viettel Post, VNPost, J&T, SPX, Ninja Van, plus UPS, FedEx, DHL, USPS with check digits.
Send a tracking number (mã vận đơn) and get the likely carrier with a confidence, the official tracking page and, when the carrier supports it, a direct tracking link. Vietnamese carriers: VNPost / EMS (UPU S10 codes ending in VN, check digit verified), SPX Express (SPXVN…), Giao Hàng Tiết Kiệm (S…route codes), Ninja Van, Lazada Logistics, Viettel Post, Giao Hàng Nhanh, J&T Express (12 digits starting with 8), BEST Express and Ahamove. International: UPS (1Z…, check digit), FedEx (12, 15, 18, 22, 32 and 34 digits with their check digits), USPS (IMpb and 20-digit codes), DHL Express (mod 7), DHL eCommerce and UPU S10 codes of other postal operators (with the country of origin and service type).
Several carriers use plain digit codes of similar length, so the answer lists every candidate sorted by confidence and sets ambiguous when more than one is plausible; a failed check digit lowers the confidence to 0.1. Batch up to 100 numbers with numbers. The international formats and check digits follow the open tracking_number_data project (MIT).
Detection only: no carrier API is called, so the shipment status is not returned.
Parameters
| Name | In | Type | Required | Default | |
|---|---|---|---|---|---|
number | query|body | string | yes | The tracking number (spaces and dashes ignored, max 60 characters). Or numbers: array of up to 100. |
Example
curl "https://apibox.io.vn/v1/tracking-detect?number=EB123456785VN" \
-H "Authorization: Bearer YOUR_API_KEY"const res = await fetch('https://apibox.io.vn/v1/tracking-detect?number=EB123456785VN', {
method: 'GET',
headers: {
Authorization: 'Bearer YOUR_API_KEY',
},
});
const data = await res.json();
console.log(data);import requests
res = requests.get(
"https://apibox.io.vn/v1/tracking-detect?number=EB123456785VN",
headers={"Authorization": "Bearer YOUR_API_KEY"},
timeout=30,
)
print(res.json())<?php
$ch = curl_init('https://apibox.io.vn/v1/tracking-detect?number=EB123456785VN');
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ['Authorization: Bearer YOUR_API_KEY'],
]);
$response = curl_exec($ch);
print_r(json_decode($response, true));Response
{
"input": "EB123456785VN",
"normalized": "EB123456785VN",
"valid_format": true,
"carrier": {
"id": "vnpost",
"name": "VNPost / EMS Việt Nam",
"country": "VN",
"confidence": 0.97,
"check_digit": true,
"tracking_page": "https://www.vnpost.vn/tra-cuu-hanh-trinh/buu-pham",
"tracking_url": "https://www.vnpost.vn/tra-cuu-hanh-trinh/buu-pham?key=EB123456785VN",
"note": "UPU S10 code issued in Vietnam (check digit verified)",
"service": "EMS (express)",
"origin_country": "VN"
},
"candidates": [
"…"
],
"ambiguous": false,
"note": "Detection from the format only: no carrier API is called, so the shipment status is not known."
}
Use cases
- Route "where is my order" chatbot questions to the right carrier
- Fill the carrier field automatically when staff paste tracking numbers
- Validate tracking numbers before sending them to customers
- Build tracking links in order e-mails
FAQ
Does it return the shipment status?
No. It recognises the format only; use the tracking_url to open the carrier page.
Why several candidates?
Some Vietnamese carriers use plain digit codes that overlap; codes with a check digit (S10, UPS, FedEx, USPS) are identified with high confidence.
Which international carriers are covered?
UPS, FedEx, USPS, DHL Express, DHL eCommerce and every postal operator using UPU S10 codes.
Related APIs
JSON Validator
Check JSON syntax with exact line and column of errors, and validate data against a JSON Schema (draft 4, 7, 2019-09 or 2020-12).
{ }JSON Formatter
Pretty print JSON with 0-8 spaces or tabs, minify it, or sort object keys recursively. Syntax errors are reported with line and column.
CSVCSV to JSON
Convert CSV into an array of JSON objects using the header row, with delimiter auto-detection, number and boolean typing, and row-level errors.