Coupons

Use when creating a discount (e.g. promo code or referral). Ideal for percent or fixed value, with optional validity and usage limits.

post/coupons

Request

  • Base URL
    https://us.api.flexprice.io/v1
  • URL
    https://us.api.flexprice.io/v1/coupons
  • Auth
    • API key in header x-api-key
    • or API key in header x-api-key

Request body

amount_offstring
cadence'once' | 'repeated' | 'forever' required
coupon_codestring
currencystring
duration_in_periodsinteger
max_redemptionsinteger
metadataobject
namestring required
percentage_offstring
redeem_afterstring
redeem_beforestring
rulesobject
type'fixed' | 'percentage' required

Response

Created

amount_offstring
cadence'once' | 'repeated' | 'forever'
coupon_codestring
created_atstring date-time
created_bystring
currencystring
duration_in_periodsinteger
environment_idstring
idstring
max_redemptionsinteger
metadataobject
namestring
percentage_offstring
redeem_afterstring
redeem_beforestring
rulesobject
status'published' | 'deleted' | 'archived'
tenant_idstring
total_redemptionsinteger
type'fixed' | 'percentage'
updated_atstring date-time
updated_bystring

Changes

    • warning

      added the new not_implemented enum value to the response property for the response status

    • warning

      added the new not_implemented enum value to the response property for the response status

    • warning

      added the new not_implemented enum value to the response property for the response status

    • warning

      added the new not_implemented enum value to the response property for the response status

    • warning

      added the new not_implemented enum value to the response property for the response status

    • breaking

      the response's property type changed from no type to string for status

    • warning

      added the new archived enum value to the response property for the response status

    • warning

      added the new deleted enum value to the response property for the response status

    • warning

      added the new published enum value to the response property for the response status