v1

latestOpenAPI 3.0.02026-07-1498163181.9 KB
Coupons

Enable a coupon

Enable a coupon

post/api/v1/coupons/{id}/enable

Path parameters

idstring required

Response

idstring required

Coupon id

organizationIdstring required

Organization id

namestring required

Name of the coupon displayed to customers on for instance invoices or receipts.

percentOffnumber

Percent that will be taken off the subtotal of any invoices for this customer for the duration of the coupon.

amountOffinteger

Fixed amount that will be taken off the subtotal of any invoices for this customer for the duration of the coupon.

currencystring

Name of the currency displayed to customers on for instance invoices or receipts.

maxRedemptionsnumber

Maximum number of times this coupon can be redeemed, in total, across all customers, before it is no longer valid.

redeemBystring date-time

Date after which the coupon can no longer be redeemed

isEnableboolean required

Taking account of the above properties, whether this coupon can still be applied to a customer.

createdAtstring date-time

Time at which this coupon was created.

metadataobject

A set of key-value pairs that you can attach to an object. It can be useful for storing additional information about the object in a structured format.

isArchivedboolean required

Whether the coupon is archived.

archivedAtstring date-time

Date at which the coupon was archived

status'active' | 'expired' | 'disabled' | 'limit_reached' required
timesRedeemednumber

Number of times this coupon has been applied.

Example response

{
  "percentOff": 1,
  "maxRedemptions": 1,
  "promotionCodes": [
    {
      "maxRedemptions": 1
    }
  ],
  "timesRedeemed": 1
}