ReDoc documentation

coupons/{couponId}

coupons/{couponId}

Get coupon by coupon id.

Request
path Parameters
couponId
required
integer
Responses
200

200 Success.

400

400 Bad Request

401

401 Unauthorized

500

Internal Server error

default

Unexpected error

get/V1/coupons/{couponId}
Response samples
{
  • "coupon_id": 0,
  • "rule_id": 0,
  • "code": "string",
  • "usage_limit": 0,
  • "usage_per_customer": 0,
  • "times_used": 0,
  • "expiration_date": "string",
  • "is_primary": true,
  • "created_at": "string",
  • "type": 0,
  • "extension_attributes": { }
}

coupons/{couponId}

Save a coupon.

Request
path Parameters
couponId
required
string
Request Body schema:
required
object (sales-rule-data-coupon-interface)

Interface CouponInterface

Responses
200

200 Success.

400

400 Bad Request

401

401 Unauthorized

500

Internal Server error

default

Unexpected error

put/V1/coupons/{couponId}
Request samples
{
  • "coupon": {
    }
}
Response samples
{
  • "coupon_id": 0,
  • "rule_id": 0,
  • "code": "string",
  • "usage_limit": 0,
  • "usage_per_customer": 0,
  • "times_used": 0,
  • "expiration_date": "string",
  • "is_primary": true,
  • "created_at": "string",
  • "type": 0,
  • "extension_attributes": { }
}

coupons/{couponId}

Delete coupon by coupon id.

Request
path Parameters
couponId
required
integer
Responses
200

200 Success.

400

400 Bad Request

401

401 Unauthorized

500

Internal Server error

default

Unexpected error

delete/V1/coupons/{couponId}
Response samples
true