版本:202201
查询价格规则列表
GET/openapi/2022-01/price_rules
返回可应用于客户订单的价格规则列表。
请求
Query参数
limit int32
Result per page, max: 250
默认值:
50starts_at_min int32
过滤此时间之后开始的价格规则(Unix 时间)。
starts_at_max int32
过滤此时间之前开始的价格规则(Unix 时间)。
ends_at_min int32
过滤此时间之后结束的价格规则(Unix 时间)。
ends_at_max int32
过滤此时间之前结束的价格规则(Unix 时间)。
times_used int32
按使用次数过滤价格规则。
响应
- 200
200
- application/json
- 数据结构
- 示例
- Result
数据结构
- Array [
- Array [
- ]
- ]
price_rules object[]
idstring
示例:
91f9a466-7c8c-46e7-9774-64874a641534titlestring
示例:
Buy $180 get $20 off,once for one customervalueinteger
默认值:
0示例:
20value_typestring
示例:
fixed_amountusage_limitstring
示例:
-1times_usedstring
示例:
0allocation_methodstring
示例:
allocation_limitstring
示例:
0once_per_customerstring
示例:
1prerequisitestring
示例:
1customer_selectionstring
示例:
alltarget_selectionstring
示例:
alltarget_typestring
示例:
created_atstring
示例:
2022-06-17 15:00:03updated_atstring
示例:
2022-06-17 15:00:03starts_atstring
示例:
1655431200ends_atstring
示例:
-1entitled_product_idsarray
entitled_filter_idsarray
entitled_filter_listarray
variant_product_idsarray
prerequisite_subtotal_range object[]
greater_than_or_equal_tostring
示例:
180valuestring
示例:
20value_conditionstring
示例:
less_than_or_equal_totarget_typestring
示例:
target_dataarray
target_data_variantarray
target_data_collectionarray
prerequisite_quantity_range
{
"price_rules": [
{
"id": "91f9a466-7c8c-46e7-9774-64874a641534",
"title": "Buy $180 get $20 off,once for one customer",
"value": 20,
"value_type": "fixed_amount",
"usage_limit": "-1",
"times_used": "0",
"allocation_method": "",
"allocation_limit": "0",
"once_per_customer": "1",
"prerequisite": "1",
"customer_selection": "all",
"target_selection": "all",
"target_type": "",
"created_at": "2022-06-17 15:00:03",
"updated_at": "2022-06-17 15:00:03",
"starts_at": "1655431200",
"ends_at": "-1",
"entitled_product_ids": [
null
],
"entitled_filter_ids": [
null
],
"entitled_filter_list": [
null
],
"variant_product_ids": [
null
],
"prerequisite_subtotal_range": [
{
"greater_than_or_equal_to": "180",
"value": "20",
"value_condition": "less_than_or_equal_to",
"target_type": "",
"target_data": [
null
],
"target_data_variant": [
null
],
"target_data_collection": [
null
]
}
],
"prerequisite_quantity_range": {}
}
]
}
{
"price_rules": [
{
"id": "91f9a466-7c8c-46e7-9774-64874a641534",
"title": "Buy $180 get $20 off,once for one customer",
"value": 20,
"value_type": "fixed_amount",
"usage_limit": "-1",
"times_used": "0",
"allocation_method": "",
"allocation_limit": "0",
"once_per_customer": "1",
"prerequisite": "1",
"customer_selection": "all",
"target_selection": "all",
"target_type": "",
"created_at": "2022-06-17 15:00:03",
"updated_at": "2022-06-17 15:00:03",
"starts_at": "1655431200",
"ends_at": "-1",
"entitled_product_ids": [],
"entitled_filter_ids": [],
"entitled_filter_list": [],
"variant_product_ids": [],
"prerequisite_subtotal_range": [
{
"greater_than_or_equal_to": "180",
"value": "20",
"value_condition": "less_than_or_equal_to",
"target_type": "",
"target_data": [],
"target_data_variant": [],
"target_data_collection": []
}
],
"prerequisite_quantity_range": null
},
{
"id": "b2bc789e-4f27-4dac-8a9e-7eab140a7281",
"title": "$20 off for all products, no conditions, used up to 100 times",
"value": 20,
"value_type": "fixed_amount",
"usage_limit": "100",
"times_used": "0",
"allocation_method": "",
"allocation_limit": "0",
"once_per_customer": "0",
"prerequisite": "0",
"customer_selection": "all",
"target_selection": "all",
"target_type": "",
"created_at": "2022-06-17 15:00:02",
"updated_at": "2022-06-17 15:00:02",
"starts_at": "1655431200",
"ends_at": "-1",
"entitled_product_ids": [],
"entitled_filter_ids": [],
"entitled_filter_list": [],
"variant_product_ids": []
}
]
}