API Reference
Carriers

Carriers API

The Carriers API lets you list all carriers supported by TrackLogy, look up a specific carrier by slug, and auto-detect which carrier a tracking number belongs to. The public endpoints do not require authentication.


GET /v1/public/carriers — List All Carriers

Returns all carriers in the TrackLogy system. No authentication required.

Query Parameters

ParameterTypeDescription
qstringSearch carriers by name or slug (optional)
limitintegerMaximum number of results to return. Default: all. Max: 5000 (optional)

Example

# All carriers
curl https://api.tracklogy.com/v1/public/carriers
 
# Search with limit
curl "https://api.tracklogy.com/v1/public/carriers?q=fedex&limit=10"

Response

{
  "success": true,
  "data": {
    "carriers": [
      {
        "id": 1,
        "name": "FedEx",
        "slug": "fedex",
        "image_url": "https://...",
        "is_active": true
      }
    ],
    "total": 120
  }
}

GET /v1/public/carriers/show — Get Single Carrier

Returns a single carrier by its slug. No authentication required.

Query Parameters

ParameterTypeDescription
slugstringCarrier slug (required)

Example

curl "https://api.tracklogy.com/v1/public/carriers/show?slug=dhl"

POST /v1/public/carriers/detect — Detect Carrier (Public)

Auto-detects the carrier from a tracking number's format using pattern matching. No authentication required.

Request Body

{ "tracking_number": "1Z999AA10123456784" }

Example

curl -X POST https://api.tracklogy.com/v1/public/carriers/detect \
  -H "Content-Type: application/json" \
  -d '{"tracking_number": "1Z999AA10123456784"}'

Response (matched)

{
  "success": true,
  "data": {
    "tracking_number": "1Z999AA10123456784",
    "status": "matched",
    "carrier": {
      "id": 8,
      "name": "UPS",
      "slug": "ups",
      "image_url": "https://..."
    },
    "matches": [
      { "carrier": { "name": "UPS", "slug": "ups" }, "priority": 100 }
    ]
  }
}

Detection Status Values

ValueMeaning
matchedSingle carrier identified with high confidence
ambiguousMultiple carriers match the pattern — specify manually
noneNo pattern matched — carrier is unknown
emptyAn empty tracking number was provided

When creating a shipment via POST /v1/shipments, if you omit tracking_provider, TrackLogy automatically runs carrier detection for you. You only need to call this endpoint directly if you want to show carrier suggestions in your own UI before submitting.


POST /v1/carriers/detect — Detect Carrier (Authenticated)

Identical to the public endpoint above, but requires authentication. Use this when building authenticated server-side integrations where you want carrier detection within a secured context.

Authentication

Authorization: Bearer YOUR_API_KEY

Example

curl -X POST https://api.tracklogy.com/v1/carriers/detect \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"tracking_number": "1Z999AA10123456784"}'

The response format is identical to the public endpoint.