Updates the subcodes for a coupon, replacing all existing subcodes with the new list. Send an array of new coupon subcodes.
Note: All current subcodes for that Coupon will be deleted first, and replaced with the list of subcodes sent to this endpoint. The response will contain:
The created subcodes,
Subcodes that were not created because they already exist,
Any subcodes not created because they are invalid.
The username is a Maxio Chargify API key and the password is x. Basic authentication works only with the US and EU environments, which connect to chargify.com directly. The Maxio API Gateway environment does not accept Basic authentication.
In: header
The Advanced Billing id of the coupon
application/json
TypeScript Definitions
Use the request body type in TypeScript.
application/json
curl -X PUT \ --url 'https://subdomain.chargify.com/coupons/1/codes.json' \ -H 'Accept: application/json' \ -H 'Content-Type: application/json' \ -H 'Authorization: Bearer ACCESS_TOKEN' \ --data-raw '{ "codes": [ "AAAA", "BBBB", "CCCC" ]}'