Aftership API

Tracking / API Key Intermediate HTTPS CORS
Varies by plan (check documentation)

Overview

Aftership is a shipment tracking API that aggregates tracking data from over 900 carriers worldwide into a single unified interface. You can add tracking numbers, monitor shipment status, and receive webhooks for real-time delivery updates. It is widely used by e-commerce stores to provide customers with automatic shipping notifications.

💡

Beginner Tip

When adding a tracking number, you can specify the carrier slug (e.g., "ups", "fedex") to skip auto-detection and get faster, more reliable tracking. Use the /couriers/detect endpoint first if you are unsure which carrier to use.

Available Data

track name and artist
album metadata
audio preview URLs
popularity score
genre classification
IP address information

Example Response

JSON Response
{
  "name": "Bohemian Rhapsody",
  "artist": "Queen",
  "album": "A Night at the Opera",
  "duration_ms": 354000,
  "popularity": 92,
  "preview_url": "https://p.scdn.co/mp3-preview/..."
}

Field Reference

tracking.id Unique Aftership ID for this tracking record
tracking.tracking_number The shipment tracking number provided by the carrier
tracking.tag Standardized delivery status: "Pending", "InTransit", "OutForDelivery", "Delivered", "Exception"
tracking.checkpoints Chronological list of tracking events with location, timestamp, and status message
tracking.estimated_delivery_date Predicted delivery date in ISO 8601 format, if available from the carrier
tracking.slug Carrier identifier slug used by Aftership (e.g., "ups", "fedex", "dhl")

Implementation Example

const url = "https://developers.aftership.com/reference/quick-start";
// Replace headers or query params with the values required by this API.
const response = await fetch(url, {
  headers: {
  "X-API-Key": "YOUR_API_KEY"
  }
});
if (!response.ok) throw new Error(`Request failed: ${response.status}`);
const data = await response.json();
console.log(data);

What Can You Build?

Note: These code examples are AI-generated and unverified. Always refer to the official API documentation for accurate usage.

Common Errors & Troubleshooting

401 Unauthorized Missing or invalid API key in the as-api-key header
Obtain your API key from the Aftership dashboard and send it in the "as-api-key" header with every request
4003 Tracking already exists You are trying to add a tracking number that has already been added to your account
Use GET /trackings/{slug}/{tracking_number} to retrieve the existing tracking instead of creating a duplicate
Tracking status stuck at "Pending" The carrier was not detected automatically or the tracking number format is unrecognized
Explicitly specify the carrier "slug" when creating the tracking, or use /couriers/detect to identify the correct carrier

Matrix Score Breakdown

🌐 Reachability 30/30
⚡ Speed 5/20
🔒 Security 15/15
🛠 Developer XP 17/20
✓ Reliability 10/15

Partially tested on Apr 5, 2026

Technical Specifications

Auth API Key
HTTPS REQUIRED
CORS YES
Category Tracking
Difficulty Intermediate
Verified: 2026-04-07

Similar APIs

View All →