Search
Retrieve sales rules that match te specified criteria. This call returns an array of objects, but detailed information about each object’s attributes might not be included. See https://devdocs.magento.com/codelinks/attributes.html#RuleRepositoryInterface to determine which call to use to get detailed information about all attributes for an object.
Query parameters
searchCriteria[filterGroups][0][filters][0][field]stringOptionalExample:
Field
<string>
searchCriteria[filterGroups][0][filters][0][value]stringOptionalExample:
Value
<string>
searchCriteria[filterGroups][0][filters][0][conditionType]stringOptionalExample:
Condition type
<string>
searchCriteria[sortOrders][0][field]stringOptionalExample:
Sorting field.
<string>
searchCriteria[sortOrders][0][direction]stringOptionalExample:
Sorting direction.
<string>
searchCriteria[pageSize]stringOptionalExample:
Page size.
<integer>
searchCriteria[currentPage]stringOptionalExample:
Current page.
<integer>
Responses
200
OK
application/json
Responseobject
401
Unauthorized
application/json
500
Internal Server Error
application/json
get
GET /V1/salesRules/search HTTP/1.1
Host: {{baseurl}}
Accept: */*
{
"items": [
{
"website_ids": [
"<integer>",
"<integer>"
],
"customer_group_ids": [
"<integer>",
"<integer>"
],
"uses_per_customer": "<integer>",
"is_active": "<boolean>",
"stop_rules_processing": "<boolean>",
"is_advanced": "<boolean>",
"sort_order": "<integer>",
"discount_amount": "<number>",
"discount_step": "<integer>",
"apply_to_shipping": "<boolean>",
"times_used": "<integer>",
"is_rss": "<boolean>",
"coupon_type": "<string>",
"use_auto_generation": "<boolean>",
"uses_per_coupon": "<integer>",
"rule_id": "<integer>",
"name": "<string>",
"store_labels": [
{
"store_id": "<integer>",
"store_label": "<string>",
"extension_attributes": "<object>"
},
{
"store_id": "<integer>",
"store_label": "<string>",
"extension_attributes": "<object>"
}
],
"description": "<string>",
"from_date": "<string>",
"to_date": "<string>",
"condition": {
"condition_type": "<string>",
"operator": "<string>",
"value": "<string>",
"conditions": [
{
"value": "<Circular reference to #/components/schemas/sales-rule-data-condition-interface detected>"
},
{
"value": "<Circular reference to #/components/schemas/sales-rule-data-condition-interface detected>"
}
],
"aggregator_type": "<string>",
"attribute_name": "<string>",
"extension_attributes": "<object>"
},
"action_condition": {
"condition_type": "<string>",
"operator": "<string>",
"value": "<string>",
"conditions": [
{
"value": "<Circular reference to #/components/schemas/sales-rule-data-condition-interface detected>"
},
{
"value": "<Circular reference to #/components/schemas/sales-rule-data-condition-interface detected>"
}
],
"aggregator_type": "<string>",
"attribute_name": "<string>",
"extension_attributes": "<object>"
},
"product_ids": [
"<integer>",
"<integer>"
],
"simple_action": "<string>",
"discount_qty": "<number>",
"simple_free_shipping": "<string>",
"extension_attributes": "<object>"
},
{
"website_ids": [
"<integer>",
"<integer>"
],
"customer_group_ids": [
"<integer>",
"<integer>"
],
"uses_per_customer": "<integer>",
"is_active": "<boolean>",
"stop_rules_processing": "<boolean>",
"is_advanced": "<boolean>",
"sort_order": "<integer>",
"discount_amount": "<number>",
"discount_step": "<integer>",
"apply_to_shipping": "<boolean>",
"times_used": "<integer>",
"is_rss": "<boolean>",
"coupon_type": "<string>",
"use_auto_generation": "<boolean>",
"uses_per_coupon": "<integer>",
"rule_id": "<integer>",
"name": "<string>",
"store_labels": [
{
"store_id": "<integer>",
"store_label": "<string>",
"extension_attributes": "<object>"
},
{
"store_id": "<integer>",
"store_label": "<string>",
"extension_attributes": "<object>"
}
],
"description": "<string>",
"from_date": "<string>",
"to_date": "<string>",
"condition": {
"condition_type": "<string>",
"operator": "<string>",
"value": "<string>",
"conditions": [
{
"value": "<Circular reference to #/components/schemas/sales-rule-data-condition-interface detected>"
},
{
"value": "<Circular reference to #/components/schemas/sales-rule-data-condition-interface detected>"
}
],
"aggregator_type": "<string>",
"attribute_name": "<string>",
"extension_attributes": "<object>"
},
"action_condition": {
"condition_type": "<string>",
"operator": "<string>",
"value": "<string>",
"conditions": [
{
"value": "<Circular reference to #/components/schemas/sales-rule-data-condition-interface detected>"
},
{
"value": "<Circular reference to #/components/schemas/sales-rule-data-condition-interface detected>"
}
],
"aggregator_type": "<string>",
"attribute_name": "<string>",
"extension_attributes": "<object>"
},
"product_ids": [
"<integer>",
"<integer>"
],
"simple_action": "<string>",
"discount_qty": "<number>",
"simple_free_shipping": "<string>",
"extension_attributes": "<object>"
}
],
"search_criteria": {
"filter_groups": [
{
"filters": [
{
"field": "ut enim amet sed",
"value": "deserunt dolor irure nulla",
"condition_type": "consectetur cupidatat"
},
{
"field": "dolor culpa in deserunt",
"value": "cillum dolor in id velit",
"condition_type": "dolore do"
}
]
},
{
"filters": [
{
"field": "labore consectetur laboris",
"value": "elit magn",
"condition_type": "id cupidatat labore occaecat qui"
},
{
"field": "dolor consectetur ullamco ",
"value": "tempor et nostrud",
"condition_type": "commodo fugiat Lorem consequat exercitation"
}
]
}
],
"sort_orders": [
{
"field": "et adipisicing culpa aliqui",
"direction": "ut est id"
},
{
"field": "velit cillum",
"direction": "laboris anim"
}
],
"page_size": 66562575,
"current_page": 43605805
},
"total_count": -50009073
}