# Get rule by ID **GET /V1/salesRules/{ruleId}** Get rule by ID. ## Servers - https://magento2.winkelstraat.mac/rest/all: https://magento2.winkelstraat.mac/rest/all () ## Parameters #### Path parameters - **ruleId** (integer) ## Responses ### 200: 200 Success. #### Body Parameters: (object) - **rule_id** (integer) Rule id - **name** (string) Rule name - **store_labels** (array[object]) Interface RuleLabelInterface - **description** (string) Description - **website_ids** (array[integer]) A list of websites the rule applies to - **customer_group_ids** (array[integer]) Ids of customer groups that the rule applies to - **from_date** (string) The start date when the coupon is active - **to_date** (string) The end date when the coupon is active - **uses_per_customer** (integer) Number of uses per customer - **is_active** (boolean) The coupon is active - **condition** (object) Interface ConditionInterface - **action_condition** (object) Interface ConditionInterface - **stop_rules_processing** (boolean) To stop rule processing - **is_advanced** (boolean) Is this field needed - **product_ids** (array[integer]) Product ids - **sort_order** (integer) Sort order - **simple_action** (string) Simple action of the rule - **discount_amount** (number) Discount amount - **discount_qty** (number) Maximum qty discount is applied - **discount_step** (integer) Discount step - **apply_to_shipping** (boolean) The rule applies to shipping - **times_used** (integer) How many times the rule has been used - **is_rss** (boolean) Whether the rule is in RSS - **coupon_type** (string) Coupon type - **use_auto_generation** (boolean) To auto generate coupon - **uses_per_coupon** (integer) Limit of uses per coupon - **simple_free_shipping** (string) To grant free shipping - **extension_attributes** (object) ExtensionInterface class for @see \Magento\SalesRule\Api\Data\RuleInterface ### 401: 401 Unauthorized #### Body Parameters: (object) - **message** (string) Error message - **errors** (array[object]) Error details - **code** (integer) Error code - **parameters** (array[object]) Error parameters item - **trace** (string) Stack trace ### 400: 400 Bad Request #### Body Parameters: (object) - **message** (string) Error message - **errors** (array[object]) Error details - **code** (integer) Error code - **parameters** (array[object]) Error parameters item - **trace** (string) Stack trace ### 500: Internal Server error #### Body Parameters: (object) - **message** (string) Error message - **errors** (array[object]) Error details - **code** (integer) Error code - **parameters** (array[object]) Error parameters item - **trace** (string) Stack trace ### default: Unexpected error #### Body Parameters: (object) - **message** (string) Error message - **errors** (array[object]) Error details - **code** (integer) Error code - **parameters** (array[object]) Error parameters item - **trace** (string) Stack trace [Powered by Bump.sh](https://bump.sh)