Discount Codes

Get one discount code

The only route that reports what a code takes off and how many subscribers used it.

get/gateway/discount-codes/{id}

Request

  • Base URL: https://api.agentaos.ai/api/v1
  • URL: https://api.agentaos.ai/api/v1/gateway/discount-codes/{id}
  • 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 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.

termsLabelstring required

What the code takes off, ready to print: "20% off", "€5.00 off", or "No discount — tracking only".

timesRedeemedinteger required

How many subscribers redeemed this code.

maxRedemptionsinteger nullable required

The cap you set, or null for none.

Changes

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