🔒
The Price Rule Detail API retrieves detailed information about a specific price rule based on its ID.
This API is especially useful for:
- Fetching detailed information about a price rule for analysis or modification.
- Verifying the attributes of a specific discount rule applied to products.
- Retrieving prerequisite or entitlement conditions for a price rule.
📘
| Field | Type | Required | Description | Example |
|---|
price_rule_id | string | Yes | Price rule ID. | 91f9a466-7c8c-46e7-9774-64874a641534 |
📘
| Parameter | Type | Example | Description |
|---|
code | string | 200 | Error code (200 indicates success) |
message | string | Success | Error message |
data | object | {...} | Contains the price rules data |
data.price_rule | object | {...} | price rule object |
| Parameter | Type | Example | Description |
|---|
id | string | pr_123456 | Unique identifier of the price rule |
title | string | Summer Sale | Name of the price rule |
value | float | 10.0 | Discount value amount |
value_type | string | fixed_amount | Type of discount value (fixed_amount, percentage) |
usage_limit | int32 | 100 | Maximum number of times the rule can be used |
times_used | int32 | 45 | Number of times the rule has been used |
allocation_method | string | each | How the discount is allocated (each, across) |
allocation_limit | int32 | 1 | Limit of discount allocation |
allocation_limit_amount | float | 5.0 | Maximum amount for allocation limit |
once_per_customer | int32 | 1 | Whether the rule applies once per customer (1=yes, 0=no) |
prerequisite | int32 | 0 | Prerequisite condition flag |
customer_selection | string | all | Customer selection method (all, prism, explicit) |
target_selection | string | all | Target selection method (all, prism, explicit) |
target_type | string | line_item | Type of target (line_item, shipping_line) |
target_price_type | string | original | Price type target (original, current) |
created_at | string | 2023-06-20T15:30:00Z | Timestamp when the price rule was created |
updated_at | string | 2023-06-21T09:15:00Z | Timestamp when the price rule was last updated |
starts_at | string | 2023-06-01T00:00:00Z | Start date of the price rule |
ends_at | string | 2023-06-30T23:59:59Z | End date of the price rule |
prerequisite_customer_ids | array of strings | ["cust_123", "cust_456"] | List of prerequisite customer IDs |
prerequisite_customer_segment_ids | array of strings | ["seg_123", "seg_456"] | List of prerequisite customer segment IDs |
entitled_product_ids | array of strings | ["prod_123", "prod_456"] | List of entitled product IDs |
entitled_variant_ids | array of strings | ["var_123", "var_456"] | List of entitled variant IDs |
entitled_filter_ids | array of strings | ["flt_123", "flt_456"] | List of entitled filter IDs |
entitled_filter_list | array of strings | ["filter1", "filter2"] | List of entitled filter list items |
variant_product_ids | array of strings | ["prod_123", "prod_456"] | List of variant product IDs |
entitled_collection_ids | array of strings | ["coll_123", "coll_456"] | List of entitled collection IDs |
entitled_area_list | array of strings | ["area1", "area2"] | List of entitled area list items |
prerequisite_subtotal_range | array of objects | [ {...} ] | Prerequisite subtotal range conditions |
prerequisite_quantity_range | array of objects | [ {...} ] | Prerequisite quantity range conditions |
| Parameter | Type | Example | Description |
|---|
greater_than_or_equal_to | string | 100.0 | Minimum subtotal amount |
value | string | 100.0 | Subtotal value |
value_percentage | string | 10.0 | Subtotal percentage value |
value_event_type | string | purchase | Event type for value calculation |
value_condition | string | greater_than | Condition for value comparison |
target_type | string | line_item | Target type for value |
target_data | array of strings | ["prod_123"] | Target data for value |
| Parameter | Type | Example | Description |
|---|
greater_than_or_equal_to | string | 5 | Minimum quantity |
value | string | 5 | Quantity value |
value_percentage | string | 10.0 | Quantity percentage value |
value_event_type | string | purchase | Event type for quantity |
value_condition | string | greater_than | Condition for quantity comparison |
target_type | string | line_item | Target type for quantity |
target_data | array of strings | ["prod_123"] | Target data for quantity |
| Field | Type | Example | Description |
|---|
code | string | InvalidParameter | Error http message |
message | string | `` | Error message |