MageSmith
PUTSalesRule · Magento 2.4.9 Admin · Magento_SalesRule::quote

PUT /V1/coupons/:couponId

PUT /V1/coupons/:couponId is a Magento 2 REST endpoint in the SalesRule module. Save a coupon. Requires an admin Bearer token with ACL Magento_SalesRule::quote.

Last verified: against Magento 2.4.9.

Returns

Magento\SalesRule\Api\Data\CouponInterface

Service contract

Magento\SalesRule\Api\CouponRepositoryInterface::save

Authorization

Admin Bearer token with ACL:

  • Magento_SalesRule::quote

Body parameters

coupon Magento\SalesRule\Api\Data\CouponInterface Required

Example request

Auto-generated from the service contract — paste-ready against your store's /rest/default base. Replace the host, store code, ACL token, and any required values before running.

Headers

Accept
application/json
Content-Type
application/json
Authorization
Bearer <ACCESS_TOKEN> admin token with ACL: Magento_SalesRule::quote

Path

/V1/coupons/:couponId

Body

{
  "coupon": {
    "code": "",
    "coupon_id": 0,
    "created_at": "",
    "expiration_date": "",
    "extension_attributes": {},
    "is_primary": false,
    "rule_id": 0,
    "times_used": 0,
    "type": 0,
    "usage_limit": 0,
    "usage_per_customer": 0
  }
}

Every Magento dev tool, in one hosted workspace.

Free to sign up. Nothing to install. Drafts, audits, and projects saved across every tool.