Skip to main content
Skip to main content

LineItem

Line Items are created when a product is added to a Cart. When Line Items are purchased they will get copied to the resulting order, swap, or claim, and can eventually be referenced in Fulfillments and Returns. Line items may also be used for order edits.

Properties

adjustmentsLineItemAdjustment[]Required
The details of the item's adjustments, which are available when a discount is applied on the item.
allow_discountsbooleanRequired
Flag to indicate if the Line Item should be included when doing discount calculations.

Default: true

cartCartRequired
The details of the cart that the line item may belongs to.
cart_idstringRequired
The ID of the cart that the line item may belongs to.
claim_orderClaimOrderRequired
The details of the claim that the line item may belong to.
claim_order_idstringRequired
The ID of the claim that the line item may belong to.
created_atDateRequired
The date with timezone at which the resource was created.
descriptionnull | stringRequired
A more detailed description of the contents of the Line Item.
discount_totalnull | number
The total of discount of the line item rounded
fulfilled_quantitynull | numberRequired
The quantity of the Line Item that has been fulfilled.
gift_card_totalnull | number
The total of the gift card of the line item
has_shippingnull | booleanRequired
Flag to indicate if the Line Item has fulfillment associated with it.
idstringRequired
The line item's ID
includes_taxbooleanRequired
Indicates if the line item unit_price include tax

Default: false

is_giftcardbooleanRequired
Flag to indicate if the Line Item is a Gift Card.

Default: false

is_returnbooleanRequired
Is the item being returned

Default: false

metadataRecord<string, unknown>Required
An optional key-value map with additional details
orderOrderRequired
The details of the order that the line item may belongs to.
order_editnull | OrderEdit
The details of the order edit.
order_edit_idnull | string
The ID of the order edit that the item may belong to.
order_idnull | stringRequired
The ID of the order that the line item may belongs to.
original_item_idnull | string
The ID of the original line item. This is useful if the line item belongs to a resource that references an order, such as a return or an order edit.
original_tax_totalnull | number
The original tax total amount of the line item
original_totalnull | number
The original total amount of the line item
product_idnull | stringRequired
quantitynumberRequired
The quantity of the content in the Line Item.
raw_discount_totalnull | number
The total of discount of the line item
refundablenull | number
The amount that can be refunded from the given Line Item. Takes taxes and discounts into consideration.
returned_quantitynull | numberRequired
The quantity of the Line Item that has been returned.
shipped_quantitynull | numberRequired
The quantity of the Line Item that has been shipped.
should_mergebooleanRequired
Flag to indicate if new Line Items with the same variant should be merged or added as an additional Line Item.

Default: true

subtotalnull | number
The subtotal of the line item
swapSwapRequired
The details of the swap that the line item may belong to.
swap_idstringRequired
The ID of the swap that the line item may belong to.
tax_linesLineItemTaxLine[]Required
The details of the item's tax lines.
tax_totalnull | number
The total of tax of the line item
thumbnailnull | stringRequired
A URL string to a small image of the contents of the Line Item.
titlestringRequired
The title of the Line Item.
totalnull | number
The total amount of the line item
unit_pricenumberRequired
The price of one unit of the content in the Line Item. This should be in the currency defined by the Cart/Order/Swap/Claim that the Line Item belongs to.
updated_atDateRequired
The date with timezone at which the resource was updated.
variantProductVariantRequired
The details of the product variant that this item was created from.
variant_idnull | stringRequired
The id of the Product Variant contained in the Line Item.
Was this section helpful?