Misc

Detect Carrier From Tracking Number

0calls
2 credits / call

Not sure which carrier a tracking number belongs to? This endpoint identifies the carrier without performing a tracking lookup.

GET
uapis.cn
/api/v1/misc/tracking/detect
Query parameters
1
tracking_number
string
required

Tracking number to identify.

Overview

Given a tracking number, the endpoint quickly identifies the most likely carrier based on tracking-number format. If multiple carriers match, the alternatives are returned in the alternatives field.

Usage notes

  • Fast: Pattern-matching only; no tracking is fetched. Typical response time is under 100 ms.
  • Accurate: Carrier rules are tuned to match each carrier’s number format with above-95% accuracy.
  • Multiple matches: When the format is ambiguous, all matching carriers are returned.

Query parameters

tracking_number
stringrequired

Tracking number to identify.

Response

200 / OK

Detection succeeded. Returns the matched carrier and any alternatives.

JSON
{
  // Tracking number being identified.
  "tracking_number": "SF1234567890123",
  // Detected carrier code.
  "carrier_code": "shunfeng",
  // Detected carrier name.
  "carrier_name": "顺丰速运",
  // Other matching carriers. Empty array when there are no alternatives.
  "alternatives": [
    {
      // Carrier code.
      "code": "ems",
      // Carrier name.
      "name": "EMS"
    }
  ]
}

404 / Not Found

Cannot identify the tracking number.

JSON
{
  "code": "NO_MATCH",
  "message": "Cannot identify the tracking number"
}