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.

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. You should pass it when create order. Please note:

  1. This is NOT the product.source_id of products API.
  2. This source_id should be the same as order.shipments.items.source_order_item_id.
<= 32 characters
Example:
13097711141107
sku
string

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

<= 256 characters
Example:
yellow
quantity
integer
required

The number of items that have been purchased.

unit_weight
Weight

Snapshot fieldThe item's weight. Cannot be changed after creating in AfterShip.

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
Example:
8
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
Example:
1
tax
string

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

<= 100 characters
Example:
1
fulfillable_quantity
integer

Deprecated, do not use. This field is no longer supported and should not be included in API requests. 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. Please note:

  1. It should be the same as the product.source_id of products API.
<= 32 characters
Example:
8021450916083
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. Please note:

  1. It should be the same as the product.variants.source_id of products API.
<= 32 characters
Example:
43768285298931
title
string
required

The title of the product variant.

<= 1024 characters
Example:
good hair
hs_code
string

Harmonized System (HS) Codes.

<= 256 characters
Example:
sw343
origin_country_region
string

The origin country of this product.

<= 3 characters
Example:
UK
image_urls
array[string]

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

<= 100 items
product_tags
array[string]

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

product_categories
array[string]

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

returnable_quantity
integer
Example:
3
Example
preparing...