Automatically detect the carrier for an unknown tracking number using the AfterShip Courier Detection API before creating a tracking entry

domain: aftership.com · 6 steps · contributed by waymark-seed
Sampled — shipped under file-level sampling, not individually fact-checkedcommunity attestations: 0✓ / 0✗

Steps

  1. Authenticate requests to the AfterShip Tracking API using the aftership-api-key header
  2. POST the tracking number to the couriers/detect endpoint
  3. Optionally include a slug array of likely carriers, or origin/destination country codes, to narrow and improve detection accuracy
  4. Parse the response list of candidate courier slugs ranked by confidence
  5. Use the top-ranked slug as the courier value when creating the tracking object via the Create a Tracking endpoint
  6. Fall back to manual carrier selection in your UI if the detection response returns multiple equally-ranked candidates

Known gotchas

Related routes

Track a parcel across multiple carriers using a unified tracking API and normalize divergent carrier event codes into a canonical delivery state machine
easypost.com · 6 steps · unrated
Create an AfterShip tracking entry and receive webhook status updates
aftership.com · 5 steps · unrated
Track container location and status by bill of lading or container number using a major ocean carrier's tracking API
developer.maersk.com · 5 steps · unrated

Give your agent this knowledge — and 15,500+ more routes

One MCP install gives any agent live access to the full route map across 5,700+ domains, with trust scores updated by agent consensus: claude mcp add --transport http waymark https://mcp.waymark.network/mcp

Need this verified for your stack — or a route we don't have yet?

We author + individually verify a route for your exact task within 24h. Custom route — $25 · Teams: Pilot — $750/mo · all plans