line_item

A line in a cart, or order. Each line item represents a product variant.

Properties

Type

Description

allocation_method

string from a set of values, refer to allocation_method values

Purchase limit rules.

allow_oversold

string from a set of values, refer to allow_oversold values

Whether to buy at the selling price after the sale exceeds.

can_buy

boolean

Returns true if the line item's variant can be sold. Returns false if not.

cart_id

string

The cart id of the parent cart of the line item.

compare_at_price

string

The compare at price of the line item.

customary_off_ratio

number

The customary discount ratio of the line item.

customary_saved_price

string

The customary saved price of the line item.

barcode

string

The barcode of the line item's variant.

discount_applications

an array of discount_application

The discount applications for the line item.

discount_id

string

The id of the discount application of the line item.

discount_off_ratio

string

The discount ratio of the line item.

discount_price

string

The discount price of the line item.

discount_sales

number

The sales of the discount of the line item's variant.

discount_saved_price

number

The discount saved price of the line item.

discount_stock

number

The stock of the discount of the line item's variant.

discount_total

string

The discount total of the line item.

ends_at

number

A timestamp of the end of the discount.

final_line_price

string

The combined price, in the currency's subunit, of all of the items in the line item. This includes any line-level discounts.

The value is equal to line_item.final_price multiplied by line_item.quantity. It's output in the customer's local (presentment) currency.

final_price

string

The price of the line item in the currency's subunit. This includes any line-level discounts.

The value is output in the customer's local (presentment) currency.

id

string

The ID of the line item.

image

image

The image of the line item's variant.

inventory_quantity

number

The inventory quantity of the line item's variant.

line_price

string

The combined price of the line item.

mixed_wholesale

boolean

Returns true if the line item's product supports mixed wholesale. Returns false if not.

note

string

The note of the line item.

options

an array of variant_option

The values of the line item's variant of the product option.

original_line_price

number

The original price of the line item.

price

string

The price of the line item.

product_handle

string

The handle of the line item's product.

product_id

string

The ID of the line item's product.

product_tags

an array of string

The tags of the line item's product.

product_title

string

The title of the line item's product.

product_url

string

The URL of the line item's product.

properties

The properties of the line item.

You can add, or allow customers to add, custom information to a line item by the Product options app.

published

boolean

Returns true if the line item's product was published. Returns false if not.

quantity

string

The quantity of the line item.

requires_shipping

boolean

Returns true if the line item's product needs shipping. Returns false if not

retail_price

string

The retail price of the line item's variant in the currency's subunit..

saved_price

number

The saved price of the line item.

sku

string

The SKU of the line item's variant.

starts_at

number

A timestamp of the start of the discount.

store_id

string

The store id.

taxable

boolean

Returns true if taxes should be charged on the line item's product. Returns false if not.

use_before_price

number

Returns false if the price before the line item isn't used.

variant_id

string

The ID of the line item's variant.

variant_title

string

The title of the line item's variant.

vendor

string

The vendor of the line item's product.

vendor_url

string

The vendor URL of the line item's product.

weight

string

The weight of the line item's variant.

weight_unit

string

The weight unit of the line item's variant.

wholesale_price

array

The wholesale price of the line item's variant.

allow_oversold values

Possible valuesDescription
checkBuy at selling price after oversold
unchecknot oversell

allocation_method values

Possible valuesDescription
allPurchase limit specified per person per activity.
eachEach person is limited to purchasing the specified quantity of each item.
noneNo limit.
{
  "id": "298049_1825cbb82902c53fdc4e12283829e832",
  "properties": "",
  "note": "",
  "variant_id": "4a3d825c-2fac-4f72-a68b-b8604b0935c4",
  "product_id": "b1ab6324-ae4f-4cca-907e-18af16839447",
  "quantity": "1",
  "discount_id": "65c00d9b-060c-4206-a2d8-f2971cacee43",
  "limit_time": -1,
  "limit_buy": 0,
  "user_limit_buy": -1,
  "discount_sales": 1,
  "discount_sales_rate": "1",
  "discount_stock": 87,
  "ends_at": -1,
  "starts_at": 1682405275,
  "allow_oversold": "uncheck",
  "allocation_method": "none",
  "price": "205.2",
  "compare_at_price": "228",
  "discount_price": "205.2",
  "customary_saved_price": "22.8",
  "customary_off_ratio": 10,
  "discount_saved_price": "22.8",
  "discount_off_ratio": "10",
  "use_before_price": false,
  "before_price": "188",
  "title": "促销",
  "trunk_price": "0",
  "total_price": "0",
  "inventory_tracking": true,
  "inventory_policy": "deny",
  "inventory_quantity": 87,
  "cart_id": "298049",
  "store_id": "7126",
  "user_id": "",
  "user_sign": "8f7be7ef-367f-473c-91b6-b32a75971450",
  "created_at": "2023-07-06 14:09:48",
  "updated_at": "2023-07-06 14:09:48",
  "custom": false,
  "parts_price": null,
  "variant_title": "pink",
  "product_title": "Sale Squared Sunglasses ",
  "product_handle": "sale-squared-sunglasses",
  "product_tags": [
    "Color_Lightcoral",
    "Location_Alabama",
    "Price_$200-$300"
  ],
  "published": true,
  "published_at": "2022-08-11T08:15:07Z",
  "product_url": "/products/sale-squared-sunglasses",
  "available": true,
  "available_quantity": 87,
  "cost_price": "0.00",
  "weight": "0.00",
  "weight_unit": "kg",
  "sku": "",
  "spu": "",
  "vendor": "Nero Theme Fashion",
  "vendor_url": "",
  "taxable": false,
  "requires_shipping": true,
  "barcode": "",
  "mixed_wholesale": false,
  "tax_code": "",
  "retail_price": "0.00",
  "product_type": "",
  "image": {
    "src": "//cdn.shoplazza.com/d8217e1e2e216cd8b71b1035bde035ec.jpeg",
    "path": "d8217e1e2e216cd8b71b1035bde035ec.jpeg",
    "width": 1280,
    "height": 1710,
    "alt": ""
  },
  "options": [
    {
      "name": "Color",
      "value": "pink"
    }
  ],
  "wholesale_price": [
    {
      "min_quantity": 1,
      "price": "205.20"
    }
  ],
  "discount_applications": [
    {
      "type": "discount_flashsale",
      "subtype": "discount_flashsale",
      "discount_id": "65c00d9b-060c-4206-a2d8-f2971cacee43",
      "title": "促销",
      "value": "",
      "discount_type": "",
      "value_type": "",
      "allocation_method": "",
      "target_selection": "",
      "target_type": "",
      "total_discount_amount": "0",
      "discount_amount": "0",
      "is_free_gift": false,
      "icon": "//cdn.shoplazza.com/oss/operation/372e6ab307143855fbd0ad3d28568d1e.svg"
    }
  ],
  "saved_price": 22.8,
  "line_price": "205.20",
  "original_line_price": 228,
  "flashsale_tip": false,
  "discount_info": {
    "id": "298049",
    "variant_id": "4a3d825c-2fac-4f72-a68b-b8604b0935c4",
    "product_id": "b1ab6324-ae4f-4cca-907e-18af16839447",
    "quantity": 1,
    "discount_id": "65c00d9b-060c-4206-a2d8-f2971cacee43",
    "limit_time": -1,
    "limit_buy": 0,
    "user_limit_buy": -1,
    "discount_sales": 1,
    "discount_sales_rate": "1",
    "discount_stock": 87,
    "ends_at": -1,
    "starts_at": 1682405275,
    "allow_oversold": "uncheck",
    "allocation_method": "none",
    "price": "205.2",
    "compare_at_price": "228",
    "discount_price": "205.2",
    "customary_saved_price": "22.8",
    "customary_off_ratio": "10",
    "discount_saved_price": "22.8",
    "discount_off_ratio": "10",
    "use_before_price": false,
    "before_price": "188",
    "title": "促销",
    "trunk_price": "0",
    "total_price": "0",
    "inventory_tracking": true,
    "inventory_policy": "deny",
    "inventory_quantity": 87
  },
  "item_id": "298049",
  "can_buy": true,
  "discount_total": "0.00",
  "final_line_price": "205.20",
  "final_price": "205.20"
}