Skip to content

Apply a Coupon

GraphQL counterpart of POST /api/admin/carts/{id}/coupon. Mutation field is applyCouponAdminCart.

Prerequisites

The example uses an illustrative cart id. Admin cart endpoints only operate on draft carts (is_active=0) — storefront carts are rejected by the admin cart guard. Create a draft cart first with the createAdminDraftCart mutation and use the returned cartId.

Operation

OperationType
applyCouponAdminCart(input: applyCouponAdminCartInput!)Mutation

Released under the MIT License.