QUICKSTART
API Quick Start
Authentication
SignString
OAuth
Overview
Getting Started
Scope List
Versioning
Rate Limit
Body Envelope
Request Errors
Try API Endpoints
CHANGELOG
Changelog
Migration Guide
REFERENCE
API Overview
Trackings
Get trackings
get
Create a tracking
post
Get a tracking by ID
get
Update a tracking by ID
put
Delete a tracking by ID
delete
Retrack an expired tracking by ID
post
Mark tracking as completed by ID
post
Get a tracking (Legacy)
get
Update a tracking (Legacy)
put
Delete a tracking (Legacy)
delete
Retrack an expired tracking (Legacy)
post
Mark tracking as completed (Legacy)
post
Couriers
Get user activated couriers
get
Detect courier
post
Get all couriers
get
Last Checkpoints
Get last checkpoint by tracking ID
get
Get last checkpoint (Legacy)
get
Notifications
Get tracking notification by tracking ID
get
Add a notification by tracking ID
post
Remove a notification by tracking ID
post
Get tracking notification (Legacy)
get
Add a notification (Legacy)
post
Remove a notification (Legacy)
post
Estimated delivery date
Batch prediction for the Estimated Delivery Date
post
MODEL
Tracking
Courier
Checkpoint
Notification
ENUM
Additional Tracking Fields
Delivery Statuses
Delivery Sub-statuses
Slug Groups
Events
Confidence Codes
Webhook
Webhook Overview
Webhook Versioning
Webhook Specifications
Webhook Signature
Webhook OAuth 2.0
Webhook Outgoing IPs
Webhook Changelog
OTHERS
Supported Couriers
CSV Upload & CSV Auto-Fetch
Shipment CSV Export
Order CSV Export
SDK
Android SDK
iOS SDK
Java SDK
Node.js SDK
.NET SDK
Python SDK
Ruby Gem
PHP SDK
Golang SDK
Open Source
phone
email-verifier
Support
Contact Support

CSV Upload & CSV Auto-Fetch

Upload CSV for bulk import of trackings to AfterShip Tracking for auto tracking and notifications. You can upload CSV manually or use auto-fetch for importing trackings at a specific time from the remote server, e.g. FTP server.

  1. Login to your AfterShip account (Sign up free)
  2. Download a CSV sample:
  3. Manually upload a CSV file, or setup an Auto-fetch

Please ensure your CSV follows the RFC 4180 standard.


ParameterDescriptionExample
tracking_numberThe tracking number of a shipment. (Note: Duplicate tracking numbers or tracking numbers with invalid formats will not be accepted.)9400111206213642173009

ParameterDescriptionExample
courierUnique courier code. Get courier codes here.fedex
emailEmail address(es) to receive email notifications. Comma separated for multiple values."[email protected],[email protected]"
smsThe phone number(s) to receive sms notifications. Phone number should begin with + and Area Code before phone number. Comma separated for multiple values."+18555072509,+18555072501"
order_idA globally-unique identifier for the order.6845a095a27a4caeb27487806f058add
titleBy default this field shows the tracking_number, but you can customize it as you wish with any info (e.g. the order number).#123456
order_pathThe URL for the order in your system or store.https://www.aftership.com/my-orders/6845a095a27a4caeb27487806f058add
customer_nameCustomer name of the tracking.Steve Young
origin_countryThe ISO Alpha-3 code (3 letters) for the origin country/region. This can help AfterShip with various functions like tracking, carrier auto-detection and auto-correction, calculating an EDD, etc. Also the additional field required by some carriers to retrieve the tracking info. The destination country/region of the shipment. Refer to our article on additional tracking fields for more details.USA
destination_countryThe ISO Alpha-3 code (3 letters) for the destination country/region. This can help AfterShip with various functions like tracking, carrier auto-detection and auto-correction, calculating an EDD, etc. Also the additional field required by some carriers to retrieve the tracking info. The destination country/region of the shipment. Refer to our article on additional tracking fields for more details.USA
{custom_field}One of the key of the custom fields of the tracking. e.g. store_name. Supports up to 25 keys. In order to protect the privacy of your customers, do not include any personal data in custom fields.my-store-1
tracking_postal_code(Legacy) Replaced by destination_postal_code. Additional field required by some carriers to retrieve the tracking info. The postal code of the recipient’s address. Refer to our article on additional tracking fields for more details.90213
tracking_ship_dateAdditional field required by some carriers to retrieve the tracking info. The date the shipment was sent, using the format YYYYMMDD. Refer to our article on additional tracking fields for more details.20220101
tracking_account_numberAdditional field required by some carriers to retrieve the tracking info. The shipper’s carrier account number. Refer to our article on additional tracking fields for more details.86f058add
tracking_keyAdditional field required by some carriers to retrieve the tracking info. A type of tracking credential required by some carriers. Refer to our article on additional tracking fields for more details.86f058add
tracking_destination_country(Legacy) Replaced by destination_country_iso3. Additional field required by some carriers to retrieve the tracking info. The destination country/region of the shipment. Refer to our article on additional tracking fields for more details.USA
order_dateThe date and time the order was created in your system or store. It uses the format: YYYY-MM-DDTHH:mm:ssZ based on whichever timezone you provide.2022-01-20T15:56:12+08:00
order_numberA unique, human-readable identifier for the order.162654659775
languageThe recipient’s language. If you set up AfterShip notifications in different languages, we use this to send the recipient tracking updates in their preferred language. Use an ISO 639-1 Language Code to specify the language.en
shipment_typeThe carrier service type for the shipment. If you provide info for this field, AfterShip will not update it with info from the carrier.FedEx SmartPost
order_promised_delivery_dateThe promised delivery date of the order. It uses the format YYYY-MM-DD. This has no timezone and uses whatever date you provide.2022-01-01
shipment_tagsUsed to add tags to your shipments to help categorize and filter them easily. Comma separated for multiple values."tag1,tag2"
courier_connection_idIf you’ve connected multiple accounts for a single carrier on AfterShip, you can now use the courier_connection_id field to tell AfterShip which carrier account you’ve used to handle a shipment so we can track it. (Get your courier connection id)8e1261bde336436abbc7cb3eee8cd707
origin_stateThe state of the sender’s address. This can help AfterShip with various functions like tracking, carrier auto-detection and auto-correction, calculating an EDD, etc.Beijing
origin_cityThe city of the sender’s address. This can help AfterShip with various functions like tracking, carrier auto-detection and auto-correction, calculating an EDD, etc.Beijing
origin_postal_codeThe postal of the sender’s address. This can help AfterShip with various functions like tracking, carrier auto-detection and auto-correction, calculating an EDD, etc.065001
origin_addressThe sender address that the shipment is shipping from. This can help AfterShip with various functions like tracking, carrier auto-detection and auto-correction, calculating an EDD, etc."Lihong Gardon 4A 2301, Chaoyang District, Beijing, BJ, 065001, CHN, China"
destination_stateThe state of the recipient’s address. This can help AfterShip with various functions like tracking, carrier auto-detection and auto-correction, calculating an EDD, etc. Also the additional field required by some carriers to retrieve the tracking info. The state/province of the recipient’s address. Refer to our article on additional tracking fields for more details.New York
destination_cityThe city of the recipient’s address. This can help AfterShip with various functions like tracking, carrier auto-detection and auto-correction, calculating an EDD, etc.New York City
destination_postal_codeThe postal of the recipient’s address. This can help AfterShip with various functions like tracking, carrier auto-detection and auto-correction, calculating an EDD, etc. Also the additional field required by some carriers to retrieve the tracking info. The postal code of the recipient’s address. Refer to our article on additional tracking fields for more details.10001
destination_addressThe shipping address that the shipment is shipping to. This can help AfterShip with various functions like tracking, carrier auto-detection and auto-correction, calculating an EDD, etc."13th Street, New York, NY, 10011, USA, United States"

If your service restricts reception by public IPs, please add all the following IPs to the allow list.

preparing...