Redeem a coupon

Request

Redeems a coupon.

Security
SecretApiKey or JWT or ApplicationJWT
Bodyapplication/jsonrequired

Coupon resource.

couponIdstring, <= 50 characters

ID of the coupon.

Example:"cpn_0YVCNKF81GD778N4YNVGDJK558"
customerIdstring, <= 50 characters(CustomerId)

ID of the customer resource.

Example:"cus_0YV7DDSDD1C8DA64KHH2W33CPF"
additionalRestrictionsArray of objects(RedemptionRestriction)

Additional coupon redemption restrictions.

curl -i -X POST \
  https://www.rebilly.com/_mock/catalog/all/coupons-redemptions \
  -H 'Content-Type: application/json' \
  -H 'REB-APIKEY: YOUR_API_KEY_HERE' \
  -d '{
    "couponId": "cpn_0YVCNKF81GD778N4YNVGDJK558",
    "customerId": "cus_0YV7DDSDD1C8DA64KHH2W33CPF",
    "additionalRestrictions": [
      {
        "type": "discounts-per-redemption",
        "quantity": 0
      }
    ]
  }'

Responses

Coupon redeemed.

Headers
Locationstring, (uri)

Location of the related resource.

Example:"https://api.rebilly.com/example"
X-RateLimit-Limitinteger

Total number of rate limit tokens for this request within a rate limit period. For more information, see Rate limits.

Example:3600
X-RateLimit-Remaininginteger

Remaining number of rate limit tokens for this request within the rate limit period. For example, in the sandbox environment, rate limits for non-GET endpoints are set at 3000 requests per 10 minutes.

Example:3600
Bodyapplication/json
idstring, <= 50 charactersread-only

Unique resource ID.

Example:"cpn_rdm_01HXC82EEPW6YD3MPWJY7151VR"
couponIdstring, <= 50 characters

ID of the coupon.

Example:"cpn_0YVCNKF81GD778N4YNVGDJK558"
customerIdstring, <= 50 characters(CustomerId)

ID of the customer resource.

Example:"cus_0YV7DDSDD1C8DA64KHH2W33CPF"
additionalRestrictionsArray of objects(RedemptionRestriction)

Additional coupon redemption restrictions.

createdTimestring, (date-time)(CreatedTime)read-only

Date and time when the resource is created. This value is set automatically when the resource is created.

updatedTimestring, (date-time)(UpdatedTime)read-only

Date and time when the resource is updated. This value is set automatically when the resource is updated.

canceledTimestring or null, (date-time)read-only

Date and time when the coupon is canceled.

Response
{ "id": "cpn_rdm_01HXC82EEPW6YD3MPWJY7151VR", "couponId": "cpn_0YVCNKF81GD778N4YNVGDJK558", "customerId": "cus_0YV7DDSDD1C8DA64KHH2W33CPF", "additionalRestrictions": [ {} ], "createdTime": "2019-08-24T14:15:22Z", "updatedTime": "2019-08-24T14:15:22Z", "canceledTime": "2019-08-24T14:15:22Z", "_links": [ {} ] }