Articles on: Others

Learn About New Changes to AfterShip Tracking API, Webhook, and CSV

We are launching some key changes to AfterShip Tracking API, Webhook, and CSV that will take effect on March 30, 2023.


Below is a summary of all the upcoming changes:


1. Existing fields changes


We are changing the behavior of several existing fields listed below:


Behaviour changes to API and Webhook fields


Field name

Old Behavior

New Behavior

expected_delivery

expected_delivery combines the carrier EDD and AfterShip API EDD. Also, the time is filled in “00:00:00” format. For example, if the carrier provides the date only, the value is “2022-01-20T00:00:00”.

expected_delivery will consider the estimated delivery date provided by the carrier only. You can use the AfterShip API EDD field (aftership_estimated_delivery_date) if needed. And, the default time fill-in logic will be removed. For example, if the carrier provides the date only, the value will be “2022-01-20”.

order_date

The current format for the order date is YYYY-MM-DDTHH:mm:ss[Z], e.g. “2022-01-20T14:43:20Z”.

The new format for the order date will be YYYY-MM-DDTHH:mm:ssZ, e.g. “2022-01-20T14:43:20+08:00”. It only impacts the GET response. For the POST and PUT requests, we don’t change the behavior and support both formats.

shipment_pickup_date

The time is filled in “00:00:00” format. For example, if the carrier provides the date only, the value is “2022-01-20T00:00:00”.

The default time fill-in logic will be removed. For example, if the carrier provides the date only, the value will be “2022-01-20”.

shipment_delivery_date

The time is filled in “00:00:00” format. For example, if the carrier provides the date only, the value is “2022-01-20T00:00:00”.

The default time fill-in logic will be removed. For example, if the carrier provides the date only, the value will be “2022-01-20”.

latest_estimated_delivery

The source of latest_estimated_delivery supports Courier EDD, AI predictive EDD, and Custom EDD.

The source of latest_estimated_delivery will support Courier EDD, AI predictive EDD, Custom EDD, and Order EDD.

Behavior changes to CSV export fields


Field Name

Old Behavior

New Behavior

created_at

The UTC offset is always UTC+0, e.g. “2022-01-20T15:00:00+00:00”

The UTC offset will be converted by your organization timezone setting and will remain consistent with the admin shipments page. e.g. “2022-01-20T10:00:00-05:00”.

updated_at

The UTC offset is always UTC+0, e.g. “2022-01-20T15:00:00+00:00”

The UTC offset will be converted by your organization timezone setting and will remain consistent with the admin shipments page. e.g. “2022-01-20T10:00:00-05:00”.

scheduled_delivery_date

The time is filled in “00:00:00” format. For example, if the carrier provides the date only, the value is “2022-01-20T00:00:00”.

The default time fill-in logic will be removed. For example, if the carrier provides the date only, the value will be “2022-01-20”.

shipment_pickup_date

The time is filled in “00:00:00” format. For example, if the carrier provides the date only, the value is “2022-01-20T00:00:00”.

The default time fill-in logic will be removed. For example, if the carrier provides the date only, the value will be “2022-01-20”.

shipment_delivery_date

The time is filled in “00:00:00” format. For example, if the carrier provides the date only, the value is “2022-01-20T00:00:00”.

The default time fill-in logic will be removed. For example, if the carrier provides the date only, the value will be “2022-01-20”.

2. New detailed address fields


We are adding new fields to help you input and receive detailed origin and destination addresses with API, Webhook, and CSV.


New fields for API and Webhook


Field Name

Type

Description

first_estimated_delivery

object

The first estimated delivery date.

custom_estimated_delivery_date

object

The estimated delivery date based on your custom settings.

origin_state

string

The state of the sender’s address.

origin_city

string

The city of the sender’s address.

origin_postal_code

string

The postal code of the sender’s address.

origin_raw_location

string

The sender’s full address.

destination_state

string

The state of the recipient’s address.

destination_city

string

The city of the recipient’s address.

destination_postal_code

string

The postal code of the recipient’s address.

New fields for CSV import


Field Name

Type

Description

origin_state

string

The state of the sender’s address.

origin_city

string

The city of the sender’s address.

origin_postal_code

string

The postal code of the sender’s address.

origin_address

string

The sender’s full address.

destination_state

string

The state of the recipient’s address.

destination_city

string

The city of the recipient’s address.

destination_postal_code

string

The postal code of the recipient’s address.

destination_address

string

The recipient’s full address

The existing fields, including tracking_origin_country, tracking_destination_country, tracking_postal_code, and tracking_state, will be marked as legacy fields and will be replaced by the new fields. However, the legacy fields will still be available. Check the details below.


Legacy Fields

New Fields

tracking_origin_country

origin_country_iso3

tracking_destination_country

destination_country_iso3

tracking_postal_code

destination_postal_code

tracking_state

destination_state

We are working on updating our API docs as well. It will be completed before the actual release. For more details, please refer to AfterShip Tracking model page.


3. Normalized date and time information


AfterShip Tracking will now automatically deduce the timezone of the tracking events using our AI-powered address parser service. It will add the timezone to your tracking events if the carrier doesn’t provide it.


If you have any questions, feel free to reach out to our support team for quick assistance.

Updated on: 27/12/2023