Order

id
string
read-only

Unique identifier generated by AfterShip.

<= 32 characters
source_id
string

A unique identifier for the order.

<= 32 characters
name
string

The order name.

<= 256 characters
number
string

The order number.

<= 64 characters
currency
string

The curreny of order.

status
string

The status of this order.

Allowed values:
openclosedcanceled
financial_status
string

The status of payments associated with the order.

Allowed values:
unpaidpartially_paidpaidpartially_refundedrefunded
fulfillment_status
string

The status of fulfillment associated with the order.

Allowed values:
unfulfilledpartially_fulfilledfulfilled
order_total
string

The total price of the order.

<= 100 characters
shipping_total
string

The total shipping fee applied to the price of the order.

<= 100 characters
tax_total
string

The sum of all the taxes applied to the order.

<= 100 characters
discount_total
string

The total discount applied to the order. Its value should be equal to the sum of all item discounts.

<= 100 characters
subtotal
string

The price of the order after discounts but before shipping and taxes.

<= 100 characters
items
array[OrderItem]

items of order.

<= 100 items
source_id
string
required

A unique identifier for the line item.

<= 32 characters
sku
string
required

Snapshot fieldThe item's SKU (stock keeping unit). Cannot be changed after creating in AfterShip.

<= 256 characters
quantity
integer
required

The number of items that have been purchased.

unit_weight
Weight
required
Example:
{"unit":"kg","value":10}
unit_price
string
required

Snapshot fieldThe price of the item before discounts and taxes have been applied. Cannot be changed after creating in AfterShip.

<= 100 characters
discount
string

The total amount of the discount allocated to the line item. Including the discount applied only on this item and the allocated discount for the order level discount.

<= 100 characters
tax
string

The total amount of the tax allocated to the line item.

<= 100 characters
fulfillable_quantity
integer

Total items available to fulfill.

source_product_id
string

Snapshot fieldThe ID of the product that the line item belongs to. It cannot be changed after creating in AfterShip.

<= 32 characters
source_variant_id
string

Snapshot fieldThe ID of the product variant. Cannot be changed after creating in AfterShip.

<= 32 characters
title
string
required

The title of the product variant.

<= 1024 characters
hs_code
string

Harmonized System (HS) Codes.

<= 256 characters
origin_country_region
string

The origin country of this product.

<= 3 characters
image_urls
array[string]

Snapshot fieldImage urls of this variant. Cannot be changed after creating in AfterShip.

<= 100 items
shipments
array[Shipment]

order shipments.

<= 100 items
tracking_number
string
required

Tracking number.

<= 256 characters
slug
string

Unique code of the courier. Get couriers here: https://www.aftership.com/couriers.

<= 256 characters
additional_fields
object
items
array[object]

A list of line item objects, each containing information about an item in the shipment.

<= 100 items
source_id
string

The ID of shipment.

<= 32 characters
note
string

An optional note that a shop owner can attach to the order.

<= 5000 characters
source_created_at
string

The date and time (ISO 8601 format) when an order was created.

source_updated_at
string

The date and time (ISO 8601 format) when an order was updated.

created_at
string

The date and time (ISO 8601 format) when an order was created in AfterShip.

updated_at
string

The date and time (ISO 8601 format) when an order was updated in AfterShip.

customer
Customer
Example:
{"source_id":"5127837778090","first_name":"teddy","last_name":"chan","emails":["[email protected]"],"locale":"en-US","phones":["+8613265883816"]}
source_id
string

A unique identifier for the customer.

<= 32 characters
first_name
string
required

The customer's first name.

<= 256 characters
last_name
string

The customer's last name.

<= 256 characters
emails
array[string]
required

The customer's email.

<= 100 items
phones
array[string]

The customer's phone number.

<= 100 items
locale
string

The language code of the customer, eg: en-US.

<= 128 characters
shipping_address
Address
Example:
{"source_id":"1","description":"My Home Address","company":"aftership","first_name":"teddy","last_name":"chan","email":"[email protected]","address_line_1":"address2","address_line_2":"1233","address_line_3":null,"city":"HongKong","state":"","country_region":"HKG","postal_code":"12323","phone":{"country_code":"86","number":"13265883816"},"type":null,"tax_number":null}
description
string

The name or description of this address.

<= 256 characters
company
string

The company of the person associated with this address.

<= 256 characters
first_name
string
required

The customer’s first name.

<= 256 characters
last_name
string

The customer’s last name.

<= 256 characters
email
string

The unique email address of the customer.

<= 254 characters
address_line_1
string
required

The customer's mailing address.

<= 256 characters
address_line_2
string

An additional field for the customer's mailing address.

<= 256 characters
address_line_3
string

An additional field for the customer's mailing address.

<= 256 characters
city
string
required

The customer’s city, town, or village.

<= 256 characters
state
string
required

The customer’s region name. Typically a province, a state, or a prefecture.

<= 256 characters
country_region
string
required

The customer's country.

<= 3 characters
postal_code
string

The customer’s postal code, also known as zip, postcode, Eircode, etc.

<= 256 characters
phone
string

The customer’s phone number at this address.

<= 256 characters
type
string

The type of address (Eg: My home address, My office address).

Allowed values:
bussinessresidential
tax_number
string

Tax number for the address.

<= 256 characters
source_id
string

A unique identifier for the address.

<= 32 characters
billing_address
Address
Example:
{"source_id":"1","description":"My Home Address","company":"aftership","first_name":"teddy","last_name":"chan","email":"[email protected]","address_line_1":"address2","address_line_2":"1233","address_line_3":null,"city":"HongKong","state":"","country_region":"HKG","postal_code":"12323","phone":{"country_code":"86","number":"13265883816"},"type":null,"tax_number":null}
tags
array[string]

Tags attached to the order, formatted as a string of comma-separated values.

<= 100 items
shipping_method
string

The name of the shipping method.

<= 256 characters
Example
preparing...