Purolator International 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 100slugstring, staticpurolator-international.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.
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.
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.
Delete a tracking
Delete a tracking.
Parameters
idstring required
Tracking ID
Returns
Returns a deleted object on success. Otherwise, this call raises an error.
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.
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 to Exception and the subtag will be updated toException_011.
Allowed values: DELIVERED LOST RETURNED_TO_SENDER
Returns
meta meta required
Meta data
codeinteger required
meta code
Example:200messagestring
error message, only exist if the response status is not 2xxtypestring
error type, only exist if the response status is not 2xx
Allowed values:BadRequestUnauthorizedForbiddenNotFoundTooManyRequestsInternalError
dataobject requiredtrackingTracking
Object describes the tracking information.
Purolator International 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,zip
Example:city,taglangstring
Support Chinese to English translation forchina-emsandchina-postonly
Example:en
Returns
metametacodeinteger required
meta code
Example: 200messagestring
error message, only exist if the response status is not 2xxtypestring
error type, only exist if the response status is not 2xx
Allowed values:BadRequestUnauthorizedForbiddenNotFound
TooManyRequestsInternalError
dataobjectidstring
Tracking idtracking_numberstring
Tracking number.slugstring purolator-international
Unique code of courier.tagstring
Current status of tracking. (See tag definition)
Allowed values:PendingInfoReceivedInTransitOutForDeliveryAttemptFailDeliveredAvailableForPickupExceptionExpired
Example:Deliveredsubtagstring
Current subtag of tracking. ([See subtag definition]subtag_messagestring
Normalized tracking message. (See subtag message definition)checkpointCheckpoint
Object describes checkpoint information.
Purolator International Estimated delivery date API
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.
Display accurate estimated delivery dates on the product page, store cart, and order checkout page to encourage customers to check out faster and give them a better customer experience.
Contact sales to activate this feature.
Supported functionalities require:
- One
EstimatedDeliveryDateobject for one prediction result. - Maximum 5
EstimatedDeliveryDateobjects are allowed. - API call will fail if any of the requests
EstimatedDeliveryDateobjects do not meet the specification requirement.
Parameters
estimated_delivery_datesarray[EstimatedDeliveryDate] required
>= 1 items<= 5 itemsslugstringpurolator-internationalrequired
AfterShip's unique code of courier. Please refer to https://track.aftership.com/couriers/download.service_type_namestring or null
AfterShip’s unique code represents carrier’s shipping and delivery options. Refer to Download Link.origin_addressobjectrequired
The location from where the package is picked up by the carrier to be delivered to the final destination.destination_addressobjectrequired
The final destination of the customer where the delivery will be made.weightobject or null
AfterShip uses this object to calculate the total weight of the order.package_countinteger or null
The number of packages.pickup_timestring or null
The local pickup time in the origin address time zone of the package.estimated_pickupobject or null
The local pickup time of the package. Eitherpickup_timeorestimated_pickupis required.
Returns
metameta requiredcodeinteger required
meta codemessagestring
error message, only exist if the response status is not 2xxtypestring
error type, only exist if the response status is not 2xx
Allowed values:BadRequestUnauthorizedForbiddenNotFoundTooManyRequestsInternalError
- data object required
estimated_delivery_datesarray[EstimatedDeliveryDate] required
Purolator International Rate API
We currently do not support this API. If you are interested in this API, please request for an integration.
Purolator International Label API
We currently do not support this API. If you are interested in this API, please request for an integration.
Purolator International Manifest API
We currently do not support this API. If you are interested in this API, please request for an integration.
Purolator International Cancel Label API
We currently do not support this API. If you are interested in this API, please request for an integration.
Purolator International Pickup API
We currently do not support this API. If you are interested in this API, please request for an integration.
Purolator International Cancel Pickup API
We currently do not support this API. If you are interested in this API, please request for an integration.
Purolator International Shipper Account API
Create a shipper account
This endpoint allows you to create your shipper account via API. You can integrate our API with your system and manage the shipper account according to your needs.
Please ensure that your account credentials are correct. Different carriers have different requirements for account credentials, you can refer to Shipper account's credetials for more details.
Parameters
slugstringpurolator-internationaldescriptionstringtimezonestringcredentialsobject
Please refer to Shipper account's credetialsaddressAddress
Address object: the description of address informationstreet1string required
address_line1 of addresscountrystring required
Country in ISO 3166-1 alpha 3 codecontact_namestring required
contact_name of address
Returns
metaMeta
Meta data object.codeinteger required
Code of Metamessagestring required
Message of Metadetailsarray[Error]
Details of Metaretryableboolean
Whether this request will be retryable or not
dataShipperAccount
ShipperAccount object: the description of shipper account informationidstring
Shipper Account IDaddressAddress
Address object: the description of address information
Get a shipper account
This endpoint allows you get a specific shipper account details by shipper account id.
Parameters
idstring required
Shipper account id
Returns
metaMeta
Meta data object.codeinteger required
Code of Metamessagestring required
Message of Metadetailsarray[Error]
Details of Metaretryableboolean
Whether this request will be retryable or not
dataShipperAccount
ShipperAccount object: the description of shipper account informationidstring
Shipper Account IDaddressAddress
Address object: the description of address information
Purolator International Address Validation (Beta) API
Create an address validation
Create an address validation
Parameters
addressAddress
Address object: the description of address informationstreet1string required
address_line1 of addresscountrystring required
Country in ISO 3166-1 alpha 3 codecontact\_namestring required
contact_name of address
Returns
metaMeta
Meta data object.codeinteger required
Code of Metamessagestring required
Message of Metadetailsarray[Error]
Details of Metaretryableboolean
Whether this request will be retryable or not
dataShipperAccount
ShipperAccount object: the description of shipper account informationidstring
Shipper Account IDaddressAddress
Address object: the description of address information

