Shopee Express API - AfterShip
Empower Your Dev Team with the Shopee Express Tracking API via AfterShip
Integrate seamless Shopee Express tracking integration with robust RESTful API and webhooks to automate Shopee Express delivery updates in real-time.
With an AfterShip developer account, you'll experience fast tracking updates and industry-leading 99.9% API uptime. Enhance your logistics now with the Shopee Express Tracking API.
Shopee Express Tracking API
Create a tracking
Creates a new tracking object.
Parameters
tracking_numberstring required
Tracking number of a shipment. Duplicated tracking numbers, tracking numbers with invalid tracking number format will not be accepted.Only accept tracking numbers with length from 4 to 100
slugstring, staticspx.titlestring
By default this field shows thetracking_number, but you can customize it as you wish with any info (e.g., the order number).order_idstring
A globally-unique identifier for the order.order_promised_delivery_datestring
The promised delivery date of the order. It uses the formatYYYY-MM-DD. This has no timezone and uses whatever date you provide. Since other EDDs use the shipment recipient’s timezone, we suggest following the same logic here.
Returns
Return a tracking object if the call succeeded.
curl --request POST \
--url https://api.aftership.com/tracking/2024-04/trackings \
--header 'Content-Type: application/json'\
--data '{"tracking":{"slug":"spx","title":"Title Name","smses":["+18555072509","+18555072501"],"emails":["email@yourdomain.com","another_email@yourdomain.com"],"order_id":"ID 1234","language":"en","pickup_note":"Reach out to our staffs when you arrive our stores for shipment pickup","origin_city":"Beijing","order_number":"1234","origin_state":"Beijing","order_id_path":"http://www.aftership.com/order_id=1234","custom_fields":{"product_name":"iPhone Case","product_price":"USD19.99"},"delivery_type":"pickup_at_store","tracking_number":"123456789","pickup_location":"Flagship Store","destination_city":"New York City","destination_state":"New York","origin_postal_code":"065001","origin_country_iso3":"CHN","origin_raw_location":"Lihong Gardon 4A 2301, Chaoyang District, Beijing, BJ, 065001, CHN, China","destination_postal_code":"10001","destination_country_iso3":"USA","destination_raw_location":"13th Street, New York, NY, 10011, USA, United States","order_promised_delivery_date":"2019-05-20"}}'
Retrieve a tracking
Retrieves the details of an existing tracking. Supply the unique tracking ID from either a tracking creation request or the tracking list, and AfterShip will return the corresponding tracking information.
Parameters
fieldsstring
List of fields to include in the response. Use comma for multiple values. Fields to include:tracking_postal_code,tracking_ship_date,tracking_account_number,tracking_key,tracking_origin_country,tracking_destination_country,tracking_state,title,order_id,tag,checkpointslangstring
Translate checkpoint messages from the carrier’s provided language to the target language.
Returns
Returns a tracking object if a valid identifier was provided.
curl --request GET \
--url https://api.aftership.com/tracking/2024-04/trackings/id \
--header 'Content-Type: application/json'
Update a tracking
Updates the specific tracking by setting the values of the parameters passed. Any parameters not provided will be left unchanged.
Parameters
smsesarray[string]
The phone number(s) to receive sms notifications. Input [] to clear the value of this field. Supports up to 3 phone numbers.emailsarray[string]
Email address(es) to receive email notifications. Input [] to clear the value of this field. Supports up to 3 email addresses.titlestring
By default this field shows the tracking_number, but you can customize it as you wish with any info (e.g., the order number).customer_namestring
Customer name of the tracking.order_idstring
A globally-unique identifier for the order.order_id_pathstring
The URL for the order in your system or store.notestring
Text field for the note. Input "" to clear the value of this field.languagestring
The 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.order_promised_delivery_datestring
The promised delivery date of the order. It uses the format YYYY-MM-DD. This has no timezone and uses whatever date you provide. Since other EDDs use the shipment recipient’s timezone, we suggest following the same logic here.
Returns
Returns the tracking object if the update succeeded.
curl --request PUT \
--url https://api.aftership.com/tracking/2024-04/trackings/id \
--header 'Content-Type: application/json'\
--data '{"value":{"tracking":{"note":"some notes","title":"New Title"}}}'
Delete a tracking
Delete a tracking.
Parameters
idstring required
Tracking ID
Returns
Returns a deleted object on success. Otherwise, this call raises an error.
curl --request DELETE \
--url https://api.aftership.com/tracking/2024-04/trackings/id \
--header 'Content-Type: application/json'
Retrack an expired tracking
Retrack an expired tracking. Max 3 times per tracking.
Parameters
idstring, required
Tracking ID
Returns
Returns the tracking object if the retrack succeeded.
curl --request POST \
--url https://api.aftership.com/tracking/2024-04/trackings/id/retrack \
--header 'Content-Type: application/json'
Mark tracking as completed
Mark a tracking as completed. The tracking won't auto-update until retrack it.
Parameters
reason string required
required
One of DELIVERED, LOST or RETURNED_TO_SENDER.
- Mark the tracking as completed with
DELIVERED. The tag of the tracking will be updated to Delivered and the subtag will be updated toDelivered_001. - Mark the tracking as completed with
LOST. The tag of the tracking will be updated toExceptionand the subtag will be updated toException_013. - Mark the tracking as completed with
RETURNED_TO_SENDER. The tag of the tracking will be updated toExceptionand the subtag will be updated toException_011.
Returns
meta meta required
Meta data
codeinteger required
meta code
Example: 200
messagestring
error message, only exist if the response status is not 2xx
typestring
error type, only exist if the response status is not 2xx
Allowed values: BadRequest Unauthorized Forbidden NotFound TooManyRequests InternalError
data object required
trackingTracking
Object describes the tracking information.
curl --request POST \
--url https://api.aftership.com/tracking/2024-04/trackings/id/mark-as-completed \
--header 'Content-Type: application/json'\
--data '{"reason":{"type":"string","enum":["DELIVERED","LOST","RETURNED_TO_SENDER"],"description":"One of `DELIVERED`, `LOST` or `RETURNED_TO_SENDER`.
- Mark the tracking as completed with `DELIVERED`. The tag of the tracking will be updated to `Delivered` and the subtag will be updated to `Delivered_001`.
- Mark the tracking as completed with `LOST`. The tag of the tracking will be updated to `Exception` and the subtag will be updated to `Exception_013`.
- Mark the tracking as completed with `RETURNED_TO_SENDER`. The tag of the tracking will be updated to `Exception` and the subtag will be updated to `Exception_011`."}}'
Shopee Express Last Checkpoint API
Get last checkpoint
Return the tracking information of the last checkpoint of a single tracking.
Parameters
fieldsstring
List of fields to include in the response. Use comma for multiple values. Fields to include:slug,created_at,checkpoint_time,city,coordinates,country_iso3,country_name,message,state,tag,ziplangstring
Support Chinese to English translation forchina-emsandchina-postonly
Returns
metametadataobjectidstringtracking_numberstringslugstring spxtagstringsubtagstringsubtag_messagestringcheckpointCheckpoint
curl --request GET \
--url https://api.aftership.com/tracking/2024-04/last_checkpoint/tracking_id \
--header 'Content-Type: application/json'
Batch predict the estimated delivery date
The estimated delivery date is provided by AfterShip, based on its AI-predictive model. You can display the EDD on the product page, cart, and order checkout page. It indicates when a customer will receive the order.
You can use AfterShip’s AI-powered predictive estimated delivery date API to provide expected delivery dates to shoppers for online orders without tracking numbers. You can get the earliest date, the latest date, and the most likely arrival date through our AI-predictive EDD API.
Parameters
estimated_delivery_datesarray[EstimatedDeliveryDate] requiredslugstringspxrequired
AfterShip's unique code of courier. Please refer to Download Link.service_type_namestring or nullorigin_addressobject requireddestination_addressobject requiredweightobject or nullpackage_countinteger or nullpickup_timestring or nullestimated_pickupobject or null
Eitherpickup_timeorestimated_pickupis required.
Returns
metameta requiredcodeinteger requiredmessagestring
dataobject requiredestimated_delivery_datesarray[EstimatedDeliveryDate] required
curl --request POST \
--url https://api.aftership.com/tracking/2024-04/estimated-delivery-date/predict-batch \
--header 'Content-Type: application/json'\
--data '{"estimated_delivery_dates":[{"slug":"spx","service_type_name":"{service_type_name}","origin_address":{"country":"USA","state":"WA","city":"Seattle","postal_code":"98108","raw_location":"Seattle, Washington, 98108, USA, United States"},"destination_address":{"country":"USA","state":"CA","postal_code":"92019","raw_location":"El Cajon, California, 92019, USA, United States"},"weight":{"unit":"kg","value":1},"package_count":1,"pickup_time":"2021-07-01 15:00:00"}]}'
Why use AfterShip API for Shopee Express Integration
Integrating directly with Shopee Express's native API requires months of development, constant maintenance, and deep carrier-specific expertise. AfterShip offers a single unified RESTful API that supports Shopee Express and 1,200+ global carriers—while reducing development overhead, handling documentation changes, and managing regional exceptions. With AfterShip, you can focus on scaling operations rather than separate carrier technical challenges.