Create a tracking

post
/trackings

Create a tracking.

[url](../../docs/enum/additional_tracking_fields.md)[url](../../docs/enum/delivery_sub_statuses.md)[url](../../docs/enum/delivery_statuses.md)[url](../../docs/enum/slug_groups.md)[url](../../model/resource/tracking.v4.json)[url](../../model/resource/checkpoint.v4.json)[url](../../model/resource/courier.v4.json)[url](../../model/resource/notification.v4.json)[url](../../model/enum/additional_fields.v1.json)[url](../../model/enum/slug_group.v1.json)[url](../../model/enum/tag.v1.json)[url](../../reference/api.v4.json/paths/~1trackings/get)[url](../../reference/api.v4.json/paths/~1trackings/post)[url](../../reference/api.v4.json/paths/~1trackings~1{slug}~1{tracking_number}/get)[url](../../reference/api.v4.json/paths/~1trackings~1{slug}~1{tracking_number}/put)[url](../../reference/api.v4.json/paths/~1trackings~1{slug}~1{tracking_number}/delete)[url](../../reference/api.v4.json/paths/~1trackings~1{slug}~1{tracking_number}~1retrack/post)[url](../../reference/api.v4.json/paths/~1trackings~1{slug}~1{tracking_number}~1mark-as-completed/post)[url](../../reference/api.v4.json/paths/~1couriers/get)[url](../../reference/api.v4.json/paths/~1couriers~1detect/post)[url](../../reference/api.v4.json/paths/~1couriers~1all/get)[url](../../reference/api.v4.json/paths/~1last_checkpoint~1{slug}~1{tracking_number}/get)[url](../../reference/api.v4.json/paths/~1notifications~1{slug}~1{tracking_number}/get)[url](../../reference/api.v4.json/paths/~1notifications~1{slug}~1{tracking_number}~1add/post)[url](../../reference/api.v4.json/paths/~1notifications~1{slug}~1{tracking_number}~1remove/post)
Content-Type
string
required

Content-Type

Allowed value:
application/json
Default:
application/json

Create tracking object

tracking
object
required
tracking_number
string
required

Tracking number of a shipment.Show all...

>= 1 characters
slug

comma seperated slug

title
string

Title of the tracking. You can customize the title for short notes. Default value as tracking_number

>= 1 characters
order_id
string

A globally-unique identifier for the order.

>= 1 characters
order_id_path
string

Text field for order path

>= 1 characters
custom_fields
object

Custom fields that accept an object with string, boolean or number fields.

language
string

Enter ISO 639-1 Language Code to specify the store, customer or order language.

>= 1 characters
order_promised_delivery_date
string<date>

Promised delivery date of an order in YYYY-MM-DD format.

>= 1 characters
Match pattern:
^[0-9]{4}-[0-9]{2}-[0-9]{2}$
delivery_type
string

Shipment delivery typeShow all...

>= 1 characters
Allowed values:
pickup_at_storedoor_to_doorpickup_at_courier
pickup_location
string

Shipment pickup location for receiver

>= 1 characters
pickup_note
string

Shipment pickup note for receiver

>= 1 characters
tracking_account_number
string

Account number of the shipper for a specific courier. Required by some couriers. Refer to this page for more details

tracking_origin_country
string

Origin Country/Region of the shipment for a specific courier. Required by some couriers. Refer to this page for more details

tracking_destination_country
string

Destination Country/Region of the shipment for a specific courier. Required by some couriers. Refer to this page for more details

tracking_key
string

Key of the shipment for a specific courier. Required by some couriers. Refer to this page for more details

tracking_postal_code
string

The postal code of receiver's address. Required by some couriers. Refer to this page for more details

tracking_ship_date
string

Shipping date in YYYYMMDD format. Required by some couriers. Refer to this page for more details

tracking_state
string

Located state of the shipment for a specific courier. Required by some couriers. Refer to this page for more details

ios
array[string]

Apple iOS device IDs to receive the push notifications. Accept either array or comma separated as input.

android
array[string]

Google cloud message registration IDs to receive the push notifications. Accept either array or comma separated as input.

emails
array[string]

Email address(es) to receive email notifications. Accept either array or comma separated as input.

smses
array[string]

Phone number(s) to receive sms notifications. Enter + andarea code before phone number. Accept either array or comma separated as input.

customer_name
string

Customer name of the tracking.

origin_country_iso3
string

Enter ISO Alpha-3 (three letters) to specify the origin of the shipment (e.g. USA for United States).

destination_country_iso3
string

Enter ISO Alpha-3 (three letters) to specify the destination of the shipment (e.g. USA for United States). If you use postal service to send international shipments, AfterShip will automatically get tracking results at destination courier as well.

note
string

Text field for the note

slug_group
string

Slug group is a group of slugs which belong to same courier. For example, when you inpit "fedex-group" as slug_group, AfterShip will detect the tracking with "fedex-uk", "fedex-fims", and other slugs which belong to "fedex". It cannot be used with slug at the same time. (See slug_groups definition)

Allowed values:
amazon-groupfedex-grouptoll-grouptaqbin-grouptnt-groupcj-grouphermes-groupdpd-groupgls-groupdhl-groupfastway-groupasendia-group
order_date
string

Order date in YYYY-MM-DDTHH:mm:ssZ format. e.g. 2021-07-26T11:23:51Z

order_number
string

The unique numeric identifier for the order for use by shop owner and customer.(will come into action from est. 24 Feb)

Auth
:
Parameters
:
Body
preparing...