Update price rule
PUT/openapi/2025-06/price_rules/:price_rule_id
Updates an existing price rule by ID with new parameters.
Request
Path Parameters
Price rule ID
- application/json
- Body
- Example
Bodyrequired
- Array [
- ]
- Array [
- ]
price_rule objectrequired
Price rule
Title
The value
Value type
Usage limit. -1 means unlimited
Allocation limit
Whether usable once per customer
Prerequisite condition
Target selection
Target type
Start timestamp
End timestamp
Entitled product IDs
Entitled variant IDs
Entitled collection IDs
prerequisite_subtotal_range object[]
Subtotal prerequisite range
To specify the value which the price has to greater than or equal to
The value
Percentage value
Value event type
Value condition
Target type
Target data
prerequisite_quantity_range object[]
Quantity prerequisite range
To specify the value which the price has to greater than or equal to
The value
Percentage value
Value event type
Value condition
Target type
Target data
{
"price_rule": {
"title": "string",
"value": 0,
"value_type": "string",
"usage_limit": 0,
"allocation_limit": 0,
"once_per_customer": 0,
"prerequisite": 0,
"target_selection": "string",
"target_type": "string",
"starts_at": "string",
"ends_at": "string",
"entitled_product_ids": [
"string"
],
"entitled_variant_ids": [
"string"
],
"entitled_collection_ids": [
"string"
],
"prerequisite_subtotal_range": [
{
"greater_than_or_equal_to": "string",
"value": "string",
"value_percentage": "string",
"value_event_type": "string",
"value_condition": "string",
"target_type": "string",
"target_data": [
"string"
]
}
],
"prerequisite_quantity_range": [
{
"greater_than_or_equal_to": "string",
"value": "string",
"value_percentage": "string",
"value_event_type": "string",
"value_condition": "string",
"target_type": "string",
"target_data": [
"string"
]
}
]
}
}
Responses
- 200
OK
- application/json
- Schema
- Example
Schema
- Array [
- ]
- Array [
- ]
- Array [
- ]
error code
error message
data object
price_rule object
Price rule
Price rule ID
Title
The value
Value type
Usage limit. -1 means unlimited
Number of times used
Allocation method
Allocation limit
Allocation limit amount
Whether usable once per customer
Prerequisite condition
Customer selection criteria
Target selection
Target type
Target price type
Creation timestamp, in ISO-8601 format
Last update timestamp, in ISO-8601 format
Start timestamp
End timestamp
List of prerequisite customer IDs
Customer segment prerequisite IDs
Entitled product IDs
Entitled variant IDs
Entitled filter IDs
List of entitled filters
Product IDs of variants
Entitled collection IDs
entitled_area_list object[]
List of entitled areas
Country code (e.g., CN)
List of province codes
prerequisite_subtotal_range object[]
Subtotal prerequisite range
Greater than or equal to value
The value
Percentage value
Value event type
Value condition
Target type
Target data
prerequisite_quantity_range object[]
Quantity prerequisite range
Greater than or equal to value
The value
Percentage value
Value event type
Value condition
Target type
Target data
{
"code": "string",
"message": "string",
"data": {
"price_rule": {
"id": "string",
"title": "string",
"value": 0,
"value_type": "string",
"usage_limit": 0,
"times_used": 0,
"allocation_method": "string",
"allocation_limit": 0,
"allocation_limit_amount": 0,
"once_per_customer": 0,
"prerequisite": 0,
"customer_selection": "string",
"target_selection": "string",
"target_type": "string",
"target_price_type": "string",
"created_at": "string",
"updated_at": "string",
"starts_at": "string",
"ends_at": "string",
"prerequisite_customer_ids": [
"string"
],
"prerequisite_customer_segment_ids": [
"string"
],
"entitled_product_ids": [
"string"
],
"entitled_variant_ids": [
"string"
],
"entitled_filter_ids": [
"string"
],
"entitled_filter_list": [
"string"
],
"variant_product_ids": [
"string"
],
"entitled_collection_ids": [
"string"
],
"entitled_area_list": [
{
"country_code": "string",
"province_codes": [
"string"
]
}
],
"prerequisite_subtotal_range": [
{
"greater_than_or_equal_to": "string",
"value": "string",
"value_percentage": "string",
"value_event_type": "string",
"value_condition": "string",
"target_type": "string",
"target_data": [
"string"
]
}
],
"prerequisite_quantity_range": [
{
"greater_than_or_equal_to": "string",
"value": "string",
"value_percentage": "string",
"value_event_type": "string",
"value_condition": "string",
"target_type": "string",
"target_data": [
"string"
]
}
]
}
}
}