ReDoc documentation

coupons/{couponId}

coupons/{couponId}

get/V1/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

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}

put/V1/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

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/V1/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

Response samples
true