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.

Endpoint

EndpointMethod
/api/admin/marketing/cart-rules/{id}GET

Details

  • Requires an admin Bearer token in the Authorization header.
  • Unlike list rows, the detail endpoint returns conditions, channels, and customerGroups — the per-rule targeting and cart-filter data.
  • An unknown id returns a 404.

Response fields

FieldTypeNotes
idintNumeric id
namestringRule name
descriptionstringFree-text description
startsFromstringStart date or null
endsTillstringEnd date or null
statusint0 inactive / 1 active
couponTypeint0 auto-apply / 1 specific code
useAutoGenerationint1 when coupon codes are auto-generated
usagePerCustomerintPer-customer usage cap (0 = unlimited)
usesPerCouponintPer-coupon usage cap (0 = unlimited)
timesUsedintTimes the rule has applied (read-only)
conditionTypeint1 match all conditions / 0 match any
conditionsarrayCart / product filters
actionTypestringby_percent, by_fixed, cart_fixed, buy_x_get_y
discountAmountnumberDiscount value (capped at 100 for by_percent)
discountQuantityintQuantity for buy_x_get_y
discountStepstringStep for buy_x_get_y
applyToShippingint1 applies the discount to shipping
freeShippingint1 grants free shipping
endOtherRulesint1 stops lower-priority rules from also applying
usesAttributeConditionsint1 when conditions use product attributes
sortOrderintPriority — lower runs first
couponCodestringPrimary coupon code (null when the rule has no coupon)
channelsint[]Channel ids the rule applies to
customerGroupsint[]Customer-group ids the rule applies to
createdAtstringCreation timestamp
updatedAtstringLast-update timestamp

Released under the MIT License.