Version: 202201
Price Rule List
GET/openapi/2022-01/price_rules
Retrieves a list of price rules that can be applied to customer orders.
Request
Query Parameters
limit int32
Result per page, max: 250
Default value:
50starts_at_min int32
Filter price rule started after date, timestamp format, e.g. 1581152471
starts_at_max int32
Filter price rule started before date, timestamp format, e.g. 1581152471
ends_at_min int32
Filter price rule ended before date, timestamp format, e.g. 1581152471
ends_at_max int32
Filter price rule ended after date, timestamp format, e.g. 1581152471
times_used int32
Used count for this price rule
Responses
- 200
200
- application/json
- Schema
- Example
- Result
Schema
- Array [
- Array [
- ]
- ]
price_rules object[]
idstring
Example:
91f9a466-7c8c-46e7-9774-64874a641534titlestring
Example:
Buy $180 get $20 off,once for one customervalueinteger
Default value:
0Example:
20value_typestring
Example:
fixed_amountusage_limitstring
Example:
-1times_usedstring
Example:
0allocation_methodstring
Example:
allocation_limitstring
Example:
0once_per_customerstring
Example:
1prerequisitestring
Example:
1customer_selectionstring
Example:
alltarget_selectionstring
Example:
alltarget_typestring
Example:
created_atstring
Example:
2022-06-17 15:00:03updated_atstring
Example:
2022-06-17 15:00:03starts_atstring
Example:
1655431200ends_atstring
Example:
-1entitled_product_idsarray
entitled_filter_idsarray
entitled_filter_listarray
variant_product_idsarray
prerequisite_subtotal_range object[]
greater_than_or_equal_tostring
Example:
180valuestring
Example:
20value_conditionstring
Example:
less_than_or_equal_totarget_typestring
Example:
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": []
}
]
}