版本:202201
查询价格规则详情
GET/openapi/2022-01/price_rules/:price_rule_id
通过价格规则 ID 获取指定规则的详细信息。
请求
Path参数
price_rule_id string必填
价格规则 ID。
响应
- 200
- 404
200
- application/json
- 数据结构
- 示例
- Result
数据结构
- Array [
- ]
price_rule object
idstring
示例:
00095d6a-419d-4499-a497-f265fb2edaa5titlestring
示例:
title-updatevalueinteger
默认值:
0示例:
0value_typestring
示例:
percentageusage_limitstring
示例:
-1times_usedstring
示例:
0allocation_methodstring
示例:
allocation_limitstring
示例:
0once_per_customerstring
示例:
1prerequisitestring
示例:
1customer_selectionstring
示例:
alltarget_selectionstring
示例:
entitledtarget_typestring
示例:
created_atstring
示例:
2020-03-06 17:00:32updated_atstring
示例:
2020-03-12 15:29:44starts_atstring
示例:
1583424000ends_atstring
示例:
1583942399entitled_product_idsstring[]
entitled_variant_idsarray
prerequisite_quantity_range object[]
greater_than_or_equal_tostring
示例:
1valuestring
示例:
5target_typestring
示例:
target_dataarray
prerequisite_subtotal_range
{
"price_rule": {
"id": "00095d6a-419d-4499-a497-f265fb2edaa5",
"title": "title-update",
"value": 0,
"value_type": "percentage",
"usage_limit": "-1",
"times_used": "0",
"allocation_method": "",
"allocation_limit": "0",
"once_per_customer": "1",
"prerequisite": "1",
"customer_selection": "all",
"target_selection": "entitled",
"target_type": "",
"created_at": "2020-03-06 17:00:32",
"updated_at": "2020-03-12 15:29:44",
"starts_at": "1583424000",
"ends_at": "1583942399",
"entitled_product_ids": [
"cea210d5-a419-4d4e-a17d-5bbd0bc4af76"
],
"entitled_variant_ids": [
null
],
"prerequisite_quantity_range": [
{
"greater_than_or_equal_to": "1",
"value": "5",
"target_type": "",
"target_data": [
null
]
}
],
"prerequisite_subtotal_range": {}
}
}
{
"price_rule": {
"id": "00095d6a-419d-4499-a497-f265fb2edaa5",
"title": "title-update",
"value": 0,
"value_type": "percentage",
"usage_limit": "-1",
"times_used": "0",
"allocation_method": "",
"allocation_limit": "0",
"once_per_customer": "1",
"prerequisite": "1",
"customer_selection": "all",
"target_selection": "entitled",
"target_type": "",
"created_at": "2020-03-06 17:00:32",
"updated_at": "2020-03-12 15:29:44",
"starts_at": "1583424000",
"ends_at": "1583942399",
"entitled_product_ids": [
"cea210d5-a419-4d4e-a17d-5bbd0bc4af76",
"de2c55f5-c3e1-45e1-92f6-e65faf816ecc",
"47734e19-1b5c-468b-8695-31159d6d4478"
],
"entitled_variant_ids": [],
"prerequisite_quantity_range": [
{
"greater_than_or_equal_to": "1",
"value": "5",
"target_type": "",
"target_data": []
}
],
"prerequisite_subtotal_range": null
}
}
404
- application/json
- 数据结构
- 示例
- Result
数据结构
errorsstring[]
{
"errors": [
"Not found"
]
}
{
"errors": [
"Not found"
]
}