跳到主要内容

line_item

购物车或订单中的一行,每个行项目代表一个商品 variant。

Properties

Type

Description

allocation_method

string,取自一组固定值,参见 allocation_method 可选值

购买限制规则。

allow_oversold

string,取自一组固定值,参见 allow_oversold 可选值

超卖后是否以销售价格购买。

can_buy

boolean

若行项目的 variant 可销售,则返回 true;否则返回 false

cart_id

string

行项目所属购物车的 cart id。

compare_at_price

string

行项目的对比价格

customary_off_ratio

number

订单行项目的惯常折扣比率。

customary_saved_price

string

订单行项目的惯常节省价格。

barcode

string

订单行项目 variant 的条形码。

discount_applications

an array of discount_application

行项目的折扣应用。

discount_id

string

订单行项目折扣应用的 id。

discount_off_ratio

string

行项目的折扣比率。

discount_price

string

订单行项目的折扣价格。

discount_sales

number

订单行项目 variant 折扣的销量。

discount_saved_price

number

订单行项目的折扣节省价格。

discount_stock

number

订单行项目 variant 折扣的库存。

discount_total

string

订单行项目的折扣总额。

ends_at

number

折扣结束的时间戳。

final_line_price

string

该订单行项目中所有商品的合计价格(以店铺货币的主单位表示,而非最小单位)。该价格已包含任何订单行级别的折扣。

该值等于 line_item.final_price 乘以 line_item.quantity,以客户当地(展示)货币输出。

final_price

string

该订单行项目的价格(以店铺货币的主单位表示,而非最小单位)。该价格已包含任何订单行级别的折扣。

该值以客户当地(展示)货币输出。

id

string

订单行项目的 ID。

image

image

订单行项目 variant 的图片。

inventory_quantity

number

订单行项目 variant 的库存数量。

line_price

string

订单行项目的合计价格。

mixed_wholesale

boolean

若订单行项目的商品支持混合批发,则返回 true;否则返回 false

note

string

行项目的备注。

options

an array of variant_option

订单行项目 variant 对应的商品选项值。

original_line_price

number

订单行项目的原始价格。

price

string

订单行项目的价格。

product_handle

string

订单行项目商品的 handle。

product_id

string

订单行项目商品的 ID

product_tags

an array of string

订单行项目商品的标签。

product_title

string

订单行项目商品的标题。

product_url

string

订单行项目商品的 URL。

properties

行项目的属性。

您可以通过 Product options 应用为订单行项目添加自定义信息,或允许客户添加。

published

boolean

若订单行项目的商品已发布,则返回 true;否则返回 false

quantity

string

行项目的数量。

requires_shipping

boolean

若订单行项目的商品需要配送,则返回 true;否则返回 false

retail_price

string

订单行项目 variant 的零售价(以店铺货币的主单位表示,而非最小单位)。

saved_price

number

订单行项目的节省价格。

sku

string

订单行项目 variant 的 SKU。

starts_at

number

折扣开始的时间戳。

store_id

string

店铺 id。

taxable

boolean

若订单行项目的商品应收税,则返回 true;否则返回 false

use_before_price

number

若不使用订单行项目的前置价格,则返回 false

variant_id

string

订单行项目 variant 的 ID

variant_title

string

订单行项目 variant 的标题。

vendor

string

订单行项目商品的供应商。

vendor_url

string

订单行项目商品供应商的 URL。

weight

string

订单行项目 variant 的重量。

weight_unit

string

订单行项目 variant 的重量单位。

wholesale_price

array

订单行项目 variant 的批发价。

allow_oversold 可选值

Possible valuesDescription
check超卖后以销售价格购买
uncheck不超卖

allocation_method 可选值

Possible valuesDescription
all每人每场活动限购指定数量。
each每人每件商品限购指定数量。
none不限购。
{
"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"
}