---
title: "line_item"

doc_type: static
doc_category: static
doc_version: v20270301
source_url:
  html: 'https://developer.shopline.com/docs/sline/object/line-item'
  md: 'https://developer.shopline.com/docs/sline/object/line-item.md'
---

# line_item


    A line in a cart, checkout page, or order, representing the details of a product variant.

    



## Properties

    <div>
    

        
<ObjectProperty 
    name="discount_allocations"
    types={[<Mdx>array of [discount_allocation](https://developer.shopline.com/docs/sline/object/discount-allocation.md)</Mdx>]}
>
<ObjectSummary>
The discount allocations that apply to the line item.


> **TIP**
>
> The discount allocations include all order-level discounts that apply to the line item.
</ObjectSummary>
</ObjectProperty>
        
<ObjectProperty 
    name="final_line_price"
    types={[<Mdx>integer</Mdx>]}
>
<ObjectSummary>
The total price of the line item after all discounts are applied.

The value is equal to `line_item.final_price` multiplied by `line_item.quantity`.

:::tip{title="TIP"} 
Format the amount using the [money](https://developer.shopline.com/docs/sline/filter/money.md), [money_with_currency](https://developer.shopline.com/docs/sline/filter/money-with-currency.md), or [money_without_currency](https://developer.shopline.com/docs/sline/filter/money-with-currency.md) filter.
:::


</ObjectSummary>
</ObjectProperty>
        
<ObjectProperty 
    name="final_price"
    types={[<Mdx>integer</Mdx>]}
>
<ObjectSummary>
The unit price of the line item after all discounts are applied.

:::tip{title="TIP"} 
Format the amount using the [money](https://developer.shopline.com/docs/sline/filter/money.md), [money_with_currency](https://developer.shopline.com/docs/sline/filter/money-with-currency.md), or [money_without_currency](https://developer.shopline.com/docs/sline/filter/money-with-currency.md) filter.
:::

</ObjectSummary>
</ObjectProperty>
        
<ObjectProperty 
    name="fulfillments"
    types={[<Mdx>array of [fulfillment](https://developer.shopline.com/docs/sline/object/fulfillment.md)</Mdx>]}
>
<ObjectSummary>
The fulfillments of the line item.


</ObjectSummary>
</ObjectProperty>
        
<ObjectProperty 
    name="gift_card"
    types={[<Mdx>boolean</Mdx>]}
>
<ObjectSummary>
Whether the variant associated with the line item supports a gift card.
- `true`：Supports
- `false`：Does not support


</ObjectSummary>
</ObjectProperty>
        
<ObjectProperty 
    name="image"
    types={[<Mdx>[image](https://developer.shopline.com/docs/sline/object/image.md)</Mdx>]}
>
<ObjectSummary>
The image of the line item.

The image can come from one of the following sources:
- The image of the variant associated with the line item.
- The featured image of the product associated with the line item, if there's no variant image.
</ObjectSummary>
</ObjectProperty>
        
<ObjectProperty 
    name="key"
    types={[<Mdx>string</Mdx>]}
>
<ObjectSummary>
The key of the line item.

The key of a line item is its unique identifier consisting of the following two components, separated by a colon:
- The ID of the variant associated with the line item.
- The ID of the line item.
</ObjectSummary>
</ObjectProperty>
        
<ObjectProperty 
    name="line_level_discount_allocations"
    types={[<Mdx>array of [discount_allocation](https://developer.shopline.com/docs/sline/object/discount-allocation.md)</Mdx>]}
>
<ObjectSummary>
The discount allocations that apply directly to the line item.


</ObjectSummary>
</ObjectProperty>
        
<ObjectProperty 
    name="line_level_total_discount"
    types={[<Mdx>integer</Mdx>]}
>
<ObjectSummary>
The total amount of all discounts applied to the line item.

:::tip{title="TIP"} 
You can format the amount using the [money](https://developer.shopline.com/docs/sline/filter/money.md), [money_with_currency](https://developer.shopline.com/docs/sline/filter/money-with-currency.md), or [money_without_currency](https://developer.shopline.com/docs/sline/filter/money-with-currency.md) filter.
:::
</ObjectSummary>
</ObjectProperty>
        
<ObjectProperty 
    name="options_with_values"
    types={[<Mdx>array of [options_with_values](https://developer.shopline.com/docs/sline/object/options-with-values.md)</Mdx>]}
>
<ObjectSummary>
The name-value pairs for each option of the variant associated with the line item.


</ObjectSummary>
</ObjectProperty>
        
<ObjectProperty 
    name="original_line_price"
    types={[<Mdx>string</Mdx>]}
>
<ObjectSummary>
The combined price of all of the items in a line item, before any discounts have been applied.

The value is equal to `line_item.original_price` multiplied by `line_item.quantity`.

:::tip{title="TIP"} 
You can format the amount using the [money](https://developer.shopline.com/docs/sline/filter/money.md), [money_with_currency](https://developer.shopline.com/docs/sline/filter/money-with-currency.md), or [money_without_currency](https://developer.shopline.com/docs/sline/filter/money-with-currency.md) filter.
:::
</ObjectSummary>
</ObjectProperty>
        
<ObjectProperty 
    name="original_price"
    types={[<Mdx>string</Mdx>]}
>
<ObjectSummary>
The unit price of the line item, before discounts have been applied.

:::tip{title="TIP"} 
You can format the amount using the [money](https://developer.shopline.com/docs/sline/filter/money.md), [money_with_currency](https://developer.shopline.com/docs/sline/filter/money-with-currency.md), or [money_without_currency](https://developer.shopline.com/docs/sline/filter/money-with-currency.md) filter.
:::
</ObjectSummary>
</ObjectProperty>
        
<ObjectProperty 
    name="product_id"
    types={[<Mdx>string</Mdx>]}
>
<ObjectSummary>

The ID of the line item's product.


</ObjectSummary>
</ObjectProperty>
        
<ObjectProperty 
    name="properties"
    types={[<Mdx>array of [line_item_property](https://developer.shopline.com/docs/sline/object/line-item-property.md)</Mdx>]}
>
<ObjectSummary>
The custom properties of the line item. 


A custom property consists of a key-value pair. Customer inputs can be captured via the following methods and used as values of custom properties:
- A custom `input` element inside a product form
- The Ajax Cart API
</ObjectSummary>
</ObjectProperty>
        
<ObjectProperty 
    name="quantity"
    types={[<Mdx>integer</Mdx>]}
>
<ObjectSummary>
The product quantity of the line item.


</ObjectSummary>
</ObjectProperty>
        
<ObjectProperty 
    name="requires_shipping"
    types={[<Mdx>boolean</Mdx>]}
>
<ObjectSummary>
Whether the variant associated with the line item requires shipping.
- `true`: Requires
- `false`: Does not require


</ObjectSummary>
</ObjectProperty>
        
<ObjectProperty 
    name="selling_plan_allocation"
    types={[<Mdx>array of [selling_plan_allocation](https://developer.shopline.com/docs/sline/object/selling-plan-allocation.md)</Mdx>]}
>
<ObjectSummary>
The selling plan allocation of the line item. If the line item doesn't have a selling plan allocation, `nil` is returned.


</ObjectSummary>
</ObjectProperty>
        
<ObjectProperty 
    name="sku"
    types={[<Mdx>string</Mdx>]}
>
<ObjectSummary>
The SKU of the variant associated with the line item.


</ObjectSummary>
</ObjectProperty>
        
<ObjectProperty 
    name="successfully_fulfilled_quantity"
    types={[<Mdx>integer</Mdx>]}
>
<ObjectSummary>
The number of items from the line item that have been successfully fulfilled.


</ObjectSummary>
</ObjectProperty>
        
<ObjectProperty 
    name="taxable"
    types={[<Mdx>boolean</Mdx>]}
>
<ObjectSummary>
Whether the product is taxable.
- `true`: Taxable
- `false`: Not taxable


</ObjectSummary>
</ObjectProperty>
        
<ObjectProperty 
    name="url"
    types={[<Mdx>string</Mdx>]}
>
<ObjectSummary>
The relative URL of the variant associated with the line item.


</ObjectSummary>
</ObjectProperty>
        
<ObjectProperty 
    name="url_to_remove"
    types={[<Mdx>string</Mdx>]}
>
<ObjectSummary>
A URL, which is used to remove the line item from the cart.


</ObjectSummary>
</ObjectProperty>
        
<ObjectProperty 
    name="variant_id"
    types={[<Mdx>string</Mdx>]}
>
<ObjectSummary>
The ID of the variant associated with the line item.


</ObjectSummary>
</ObjectProperty>
        
<ObjectProperty 
    name="vendor"
    types={[<Mdx>string</Mdx>]}
>
<ObjectSummary>
The vendor of the product associated with the line item.


</ObjectSummary>
</ObjectProperty>
        
<ObjectProperty 
    name="item_components"
    types={[<Mdx>array of [item_component](https://developer.shopline.com/docs/sline/object/item-component.md)</Mdx>]}
>
<ObjectSummary>
The information of a sub-item line in a product bundle.


</ObjectSummary>
</ObjectProperty>
        
    
    </div>


