Skip to main content

List discount codes

Retrieve a paginated list of discount codes for a partner / a given discount / the whole program.
1 min read
get/discount-codes
Request example
Response
get/discount-codes
Tip

Filter by partnerId or discountId. If both are omitted, this returns discount codes for the whole program.

Authorization

Authorizationstringheaderrequired#
Default authentication mechanism

Query parameters

partnerIdstring#
The ID of the partner to retrieve discount codes for. If omitted, returns discount codes for the whole program.
discountIdstring#
Filter discount codes by discount ID.
pageinteger#
The page number for pagination. The first page is 1.

Range: true < x <= 9007199254740991

pageSizeinteger#
The number of items per page.

Default: 100

Range: true < x <= 100

Responses

application/json
The list of discount codes.
idstringrequired#
The unique ID of the discount code.
codestringrequired#
The alphanumeric discount code that customers can apply at checkout.
discountIdstringrequired#
The ID of the discount this code belongs to.
partnerIdstringrequired#
The ID of the partner this discount code is assigned to.
linkIdstringrequired#
The ID of the partner's referral link this discount code is associated with.
disabledAtstring#
When this discount code was disabled, which happens when a partner is banned or deactivated. We don't delete the discount code to avoid another partner claiming a banned/deactivated code (abuse vector).