OrderItem

Some fields of order item are defined as snapshot fields. These snapshot fields are related to product and can only be specified when creating an order.

source_id
string
required

A unique identifier for the line item.

<= 32 characters
sku
string

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
Example:
{"unit":"kg","value":10}
unit
string

The weight unit eg: g or kg.

Allowed values:
kglbozg
value
number

Weight value.

unit_price
string

Snapshot fieldThe price of the item before discounts and taxes have been applied. Cannot be changed after creating in AfterShip.
Please note that the item total price needs to meet the following formula:
item total price paid = unit_price*quantity - discount + tax

<= 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. Default is the same value as source_product_id. 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
product_categories
array[string]

Snapshot fieldProduct categories of this variant. Cannot be changed after creating in AfterShip.

product_tags
array[string]

Snapshot fieldProduct tags of this variant. Cannot be changed after creating in AfterShip.

Example
preparing...