Skip to main content
GET
Retrieve a discount
Click the base URL in the API playground and select the Sandbox host for test data or the Production host for live data. Use credentials from the same environment.

Authorizations

Authorization
string
header
required

The Server API Key obtained from the kelviq application. Pass as a Bearer token in the Authorization header. Example: 'Authorization: Bearer YOUR_API_KEY'

Path Parameters

pk
string<uuid>
required

Discount UUID.

Response

Discount details.

id
string<uuid>
Example:

"b3f1a2c4-5d6e-4f7a-8b9c-0d1e2f3a4b5c"

discountType
enum<string>

PERCENTAGE discounts a percentage off the price. FIXED_AMOUNT discounts a flat amount off the total.

Available options:
PERCENTAGE,
FIXED_AMOUNT
amountOff
string | null

Amount to discount, in currency units (e.g. "10.00"). Set when discountType is FIXED_AMOUNT.

Example:

"10.00"

percentageOff
integer | null

Percentage to discount. Set when discountType is PERCENTAGE.

Example:

20

currency
string | null

3-letter ISO currency code. Required when discountType is FIXED_AMOUNT.

Example:

"usd"

currencySymbol
string
Example:

"$"

name
string

Displayed on the customer's invoice.

Example:

"Summer Sale"

code
string

Checkout discount code. Uppercase letters and numbers only.

Example:

"SUMMER20"

duration
enum<string>

How many billing cycles the discount applies for.

Available options:
ONCE,
REPEATING,
FOREVER
durationInMonths
integer | null

Number of billing periods the discount applies for. Despite the field name, this counts billing cycles, not calendar months — e.g. 3 on a yearly plan means 3 years. Set when duration is REPEATING.

redeemBy
string<date-time> | null

UTC time after which this discount can no longer be redeemed.

maxRedemptions
integer | null

Total number of times this code can be redeemed across all customers.

timesRedeemed
integer

Number of times this code has been redeemed so far.

appliesTo
object[]

Products/plans this discount is restricted to. Empty means the discount applies to all products.

isActive
boolean