# SiteCheck Trade & Energy – Last Mile Courier Identifier

> SiteCheck Trade & Energy – Last Mile Courier Identifier is a paid API for AI agents from api.tradeenergy-api.workers.dev, paid per call via x402, $0.002/call, status unknown (last checked 2026-10-29).

Identifies which carrier(s) issued a tracking number by parsing its format and validating its check digit, and returns the official carrier tracking link.

## Facts

- Endpoint: GET https://api.tradeenergy-api.workers.dev/api/logistics/last-mile-courier?utm_source=zero.xyz
- Price: $0.002/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-29
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/sitecheck-trade-energy-last-mile-courier-identifier-73f97fbe
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_d-y4TH_GnZzQx83ljWoGL

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability sitecheck-trade-energy-last-mile-courier-identifier-73f97fbe
```

Example prompt: Can you figure out which courier issued tracking number 1Z999AA10123456784 and give me the official link to track it?

## When to prefer this

Use this endpoint when you have a raw tracking number and need to identify its carrier without calling each carrier's live tracking API. It is ideal for routing parcels to the correct carrier portal, validating number formats before submission, or enriching order data with carrier identity and tracking links. Prefer it over carrier-specific APIs when the carrier is unknown or when you only need format validation and a direct tracking URL rather than live scan events.

## Known failure modes

- Tracking number not recognised by any carrier format — recognised: false with empty candidates array
- Ambiguous number matching multiple carriers with no check digit to disambiguate — multiple candidates returned, no single bestMatch
- Malformed input (missing number query param) — HTTP 400 or error response
- Carrier does not publish check-digit rules — checkDigitValid may be null or absent for that candidate
- No live scan events returned — this endpoint only resolves carrier identity, not shipment status

## How this service works

Identify the courier behind a tracking number (UPS, FedEx, USPS, DHL Express, DPD, Royal Mail and other national posts) from its format, check the check digit where the carrier publishes one, and return the carrier's official tracking link. Several carriers can match the same pattern; each candidate says whether its check digit passed. It does not read live scan events (carriers serve them only through their own sites or keyed APIs).

## Output

A JSON object containing: the recognised flag (true/false), the bestMatch carrier with name, service description, tracking link, and check digit validity, a candidates array listing all carriers whose format matched along with their check digit results, the normalised tracking number, a checkedAt timestamp, and a note that live scan events must be retrieved from the carrier's own site or API.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "required": [
      "number"
     ],
     "properties": {
      "number": {
       "type": "string",
       "description": "Tracking number as printed (spaces allowed)"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "note": "Live scan events are on the carrier tracking page in trackingLink.",
  "number": "1Z999AA10123456784",
  "source": "carrier number formats and check-digit rules",
  "bestMatch": {
   "carrier": "UPS",
   "service": "1Z tracking number",
   "trackingLink": "https://www.ups.com/track?tracknum=1Z999AA10123456784",
   "checkDigitValid": true
  },
  "checkedAt": "2026-10-23T09:37:58.767Z",
  "candidates": [
   {
    "carrier": "UPS",
    "service": "1Z tracking number",
    "trackingLink": "https://www.ups.com/track?tracknum=1Z999AA10123456784",
    "checkDigitValid": true
   }
  ],
  "recognised": true
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/sitecheck-trade-energy-last-mile-courier-identifier-73f97fbe/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.tradeenergy-api.workers.dev](https://www.zero.xyz/host/api.tradeenergy-api.workers.dev/llms.txt)
