Discount Codes

Stop a discount code

The code stops working immediately. Subscribers who already redeemed it keep the discount they were given.

post/gateway/discount-codes/{id}/archive

Request

  • Base URL: https://api.agentaos.ai/api/v1
  • URL: https://api.agentaos.ai/api/v1/gateway/discount-codes/{id}/archive
  • Auth: API key in header x-api-key

Path parameters

idstring uuid required

Discount code UUID (the id field from create or list).

Response

The archived discount code.

idstring uuid required
codestring required

As you typed it. Buyers may type it in any case.

kind'discount' | 'tracking' required

discount changes the price. tracking changes nothing and only records who used it.

planLinkIdstring uuid nullable required

The one plan this code works on; null means every subscription plan you own.

planNamestring nullable required
archivedAtstring date-time nullable required
createdAtstring date-time required
activeboolean required

Usable as far as this list can tell: not archived, and fully created. Whether the code has since been used up is answered by the single-code route.

Changes

No recorded changes to this operation across all 1 revision of this API.