Skip to content

Cart Rule Detail

Returns a single cart rule with its full field set — the data behind the admin Marketing → Promotions → Cart Rules view screen.

TIP

New here? Read the Cart Rules overview for what a cart rule does and how its fields behave.

Operation

OperationTypePurpose
adminMarketingCartRuleQueryFetch one cart rule by id

Details

  • Requires an admin Bearer token in the Authorization header.
  • Pass the rule's IRI (e.g. /api/admin/marketing/cart-rules/47) as the id argument; _id in the response is the numeric id.
  • Unlike list rows, the detail query resolves conditions, channels, and customerGroups — the per-rule targeting and condition data.

Fields

FieldTypeNotes
idIDThe rule's IRI
_idIntNumeric id
nameStringRule name
descriptionStringFree-text description
startsFromStringStart date (ISO 8601) or null
endsTillStringEnd date (ISO 8601) or null
statusInt0 inactive / 1 active
couponTypeInt0 no coupon (auto-applies) / 1 specific coupon code
useAutoGenerationInt1 when coupon codes are auto-generated
usagePerCustomerIntPer-customer usage limit (0 = unlimited)
usesPerCouponIntPer-coupon usage limit (0 = unlimited)
timesUsedIntRead-only usage count
conditionTypeInt1 match all conditions / 0 match any
conditionsArrayCart / product condition filters
actionTypeStringby_percent, by_fixed, cart_fixed, buy_x_get_y
discountAmountFloatDiscount value (capped at 100 for by_percent)
discountQuantityIntQuantity for buy_x_get_y
discountStepStringBuy-step for buy_x_get_y
applyToShippingInt1 applies the discount to shipping too
freeShippingInt1 grants free shipping
endOtherRulesInt1 stops lower-priority rules from also applying
usesAttributeConditionsInt1 when conditions use product attributes
sortOrderIntPriority — lower runs first
couponCodeStringThe rule's primary coupon code, or null
channelsArrayChannel ids the rule applies to
customerGroupsArrayCustomer-group ids the rule applies to
createdAtStringCreation timestamp
updatedAtStringLast-update timestamp

Released under the MIT License.