Get Price Rule List

Retrieves a list of price rules that can be applied to customer orders.

🔒

Requires price_rules access scope. More access scope

The Price Rule List API retrieves a list of price rules that can be applied to customer orders.

This API is especially useful for:

  1. Fetching all active and inactive price rules in your store.
  2. Filtering price rules by specific criteria such as start date, end date, or usage count.
  3. Retrieving detailed configurations of discount rules for analysis or updates.

Request Parameters

Public Request Parameters

📘

Query Parameters

ParameterTypeRequiredDescriptionExample
cursorstringNoCursor for pagination, use the cursor from the response to retrieve the next pagecursor_123456
page_sizeint32NoA limit on the number of objects to be returned. Ranges from 1 to 250. Default is 5020
starts_at_minstringNoMinimum timestamp for filtering price rules by start date. Format: YYYY-MM-DDTHH:mm:ssZ2023-01-01T00:00:00Z
starts_at_maxstringNoMaximum timestamp for filtering price rules by start date. Format: YYYY-MM-DDTHH:mm:ssZ2023-12-31T23:59:59Z
ends_at_minstringNoMinimum timestamp for filtering price rules by end date. Format: YYYY-MM-DDTHH:mm:ssZ2023-01-01T00:00:00Z
ends_at_maxstringNoMaximum timestamp for filtering price rules by end date. Format: YYYY-MM-DDTHH:mm:ssZ2023-12-31T23:59:59Z
times_usedint32NoFilter price rules by number of times used10

Response Explanation

Public Response Parameters

📘

Successful Response

ParameterTypeExampleDescription
codestring200Error code (200 indicates success)
messagestringSuccessError message
dataobject{...}Contains the price rules data
data.price_rulesarray of objects[ {...}, {...} ]List of price rule objects
data.cursorstringcursor_123456Cursor for pagination
data.has_morebooleantrueIndicates if there are more results available
Price Rule Object Structure
ParameterTypeExampleDescription
idstringpr_123456Unique identifier of the price rule
titlestringSummer SaleName of the price rule
valuefloat10.0Discount value amount
value_typestringfixed_amountType of discount value (fixed_amount, percentage)
usage_limitint32100Maximum number of times the rule can be used
times_usedint3245Number of times the rule has been used
allocation_methodstringeachHow the discount is allocated (each, across)
allocation_limitint321Limit of discount allocation
allocation_limit_amountfloat5.0Maximum amount for allocation limit
once_per_customerint321Whether the rule applies once per customer (1=yes, 0=no)
prerequisiteint320Prerequisite condition flag
customer_selectionstringallCustomer selection method (all, prism, explicit)
target_selectionstringallTarget selection method (all, prism, explicit)
target_typestringline_itemType of target (line_item, shipping_line)
target_price_typestringoriginalPrice type target (original, current)
created_atstring2023-06-20T15:30:00ZTimestamp when the price rule was created
updated_atstring2023-06-21T09:15:00ZTimestamp when the price rule was last updated
starts_atstring2023-06-01T00:00:00ZStart date of the price rule
ends_atstring2023-06-30T23:59:59ZEnd date of the price rule
prerequisite_customer_idsarray of strings["cust_123", "cust_456"]List of prerequisite customer IDs
prerequisite_customer_segment_idsarray of strings["seg_123", "seg_456"]List of prerequisite customer segment IDs
entitled_product_idsarray of strings["prod_123", "prod_456"]List of entitled product IDs
entitled_variant_idsarray of strings["var_123", "var_456"]List of entitled variant IDs
entitled_filter_idsarray of strings["flt_123", "flt_456"]List of entitled filter IDs
entitled_filter_listarray of strings["filter1", "filter2"]List of entitled filter list items
variant_product_idsarray of strings["prod_123", "prod_456"]List of variant product IDs
entitled_collection_idsarray of strings["coll_123", "coll_456"]List of entitled collection IDs
entitled_area_listarray of strings["area1", "area2"]List of entitled area list items
prerequisite_subtotal_rangearray of objects[ {...} ]Prerequisite subtotal range conditions
prerequisite_quantity_rangearray of objects[ {...} ]Prerequisite quantity range conditions

Prerequisite Subtotal Range Object Structure

ParameterTypeExampleDescription
greater_than_or_equal_tostring100.0Minimum subtotal amount
valuestring100.0Subtotal value
value_percentagestring10.0Subtotal percentage value
value_event_typestringpurchaseEvent type for value calculation
value_conditionstringgreater_thanCondition for value comparison
target_typestringline_itemTarget type for value
target_dataarray of strings["prod_123"]Target data for value

Prerequisite Quantity Range Object Structure

ParameterTypeExampleDescription
greater_than_or_equal_tostring5Minimum quantity
valuestring5Quantity value
value_percentagestring10.0Quantity percentage value
value_event_typestringpurchaseEvent type for quantity
value_conditionstringgreater_thanCondition for quantity comparison
target_typestringline_itemTarget type for quantity
target_dataarray of strings["prod_123"]Target data for quantity

Error Response

FieldTypeExampleDescription
codestringInvalidParameterError http message
messagestring``Error message

API Structure Overview

Language
Credentials
Header
URL
Click Try It! to start a request and see the response here!