invantive documentationpart of invantive cloud
Invantive Support ForumsLog In / Sign Up

SalesRules: Magento Cart Price Rules

insert update delete REST

  • Catalog: Magento
  • Schema: Marketing
  • Primary Keys: rule_id
  • Label: Cart Price Rules

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://developer.adobe.com/commerce/webapi/rest/attributes#RuleRepositoryInterface to determine which call to use to get detailed information about all attributes for an object.

Can retrieve data and change data using insert, update and delete.

Summary

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://developer.adobe.com/commerce/webapi/rest/attributes#RuleRepositoryInterface to determine which call to use to get detailed information about all attributes for an object.

API Source

  • Endpoint: /V1/salesRules/search
  • Operation: get /V1/salesRules/search

Performance Characteristics

Characteristic Value
Average access latency (ms) 48
Full scan rows per minute 114,833
Point query rows per minute 1,188
Write rows per minute 599

The result can be cached on the client.

Parameters

Name Data Type Required Default Documentation
searchCriteria[currentPage] `` Current page.
searchCriteria[filterGroups][0][filters][0][conditionType] `` Condition type
searchCriteria[filterGroups][0][filters][0][field] `` Field
searchCriteria[filterGroups][0][filters][0][value] `` Value
searchCriteria[pageSize] `` Page size.
searchCriteria[sortOrders][0][direction] `` Sorting direction.
searchCriteria[sortOrders][0][field] `` Sorting field.

Table Columns

The columns of the table SalesRules are shown below. Each column has an SQL data type. A new non-null value must be provided for every required column at all times during insert and update.

Name Data Type Label Required Marks Documentation
action_condition_aggregator_type varchar2 Action Condition Aggregator Type filters on the platform, writable, action_condition.aggregator_type The aggregator type
action_condition_attribute_name varchar2 Action Condition Attribute Name filters on the platform, writable, action_condition.attribute_name The attribute name of the condition
action_condition_condition_type varchar2 Action Condition Condition Type filters on the platform, writable, action_condition.condition_type Condition type
action_condition_extension_attributes varchar2 Action Condition Extension Attributes writable The JSON text of the nested object.
action_condition_operator varchar2 Action Condition Operator filters on the platform, writable, action_condition.operator The operator of the condition
action_condition_value varchar2 Action Condition Value filters on the platform, writable, action_condition.value The value of the condition
apply_to_shipping char Apply to Shipping filters on the platform, writable, apply_to_shipping The rule applies to shipping
condition_aggregator_type varchar2 Condition Aggregator Type filters on the platform, writable, condition.aggregator_type The aggregator type
condition_attribute_name varchar2 Condition Attribute Name filters on the platform, writable, condition.attribute_name The attribute name of the condition
condition_condition_type varchar2 Condition Condition Type filters on the platform, writable, condition.condition_type Condition type
condition_extension_attributes varchar2 Condition Extension Attributes writable The JSON text of the nested object.
condition_operator varchar2 Condition Operator filters on the platform, writable, condition.operator The operator of the condition
condition_value varchar2 Condition Value filters on the platform, writable, condition.value The value of the condition
coupon_type varchar2 Coupon Type filters on the platform, writable, coupon_type Coupon type
customer_group_ids varchar2 Customer Group IDs filters on the platform, writable, customer_group_ids Ids of customer groups that the rule applies to The identifiers, separated by commas.
description varchar2 Description filters on the platform, writable, description Description
discount_amount decimal Discount Amount filters on the platform, writable, discount_amount Discount amount
discount_qty decimal Discount Quantity filters on the platform, writable, discount_qty Maximum qty discount is applied
discount_step int64 Discount Step filters on the platform, writable, discount_step Discount step
extension_attributes varchar2 Extension Attributes writable The JSON text of the nested object.
from_date varchar2 From Date filters on the platform, writable, from_date The start date when the coupon is active
is_active char Is Active filters on the platform, writable, is_active The coupon is active
is_advanced char Is Advanced filters on the platform, writable, is_advanced Is this field needed
is_rss char Is RSS filters on the platform, writable, is_rss Whether the rule is in RSS
name varchar2 Name filters on the platform, writable, name Rule name
product_ids varchar2 Product IDs filters on the platform, writable, product_ids Product ids The identifiers, separated by commas.
rule_id int64 Rule ID filters on the platform, writable, rule_id Rule id
simple_action varchar2 Simple Action filters on the platform, writable, simple_action Simple action of the rule
simple_free_shipping varchar2 Simple Free Shipping filters on the platform, writable, simple_free_shipping To grant free shipping
sort_order int64 Sort Order filters on the platform, writable, sort_order Sort order
stop_rules_processing char Stop Rules Processing filters on the platform, writable, stop_rules_processing To stop rule processing
times_used int64 Times Used filters on the platform, writable, times_used How many times the rule has been used
to_date varchar2 To Date filters on the platform, writable, to_date The end date when the coupon is active
use_auto_generation char Use Auto Generation filters on the platform, writable, use_auto_generation To auto generate coupon
uses_per_coupon int64 Uses per Coupon filters on the platform, writable, uses_per_coupon Limit of uses per coupon
uses_per_customer int64 Uses per Customer filters on the platform, writable, uses_per_customer Number of uses per customer
website_ids varchar2 Website IDs filters on the platform, writable, website_ids A list of websites the rule applies to The identifiers, separated by commas.