Skip to main content
GET
Ruby
Filter by partnerId or discountId. If both are omitted, this returns discount codes for the whole program.

Authorizations

Authorization
string
header
required

Default authentication mechanism

Query Parameters

partnerId
string

The ID of the partner to retrieve discount codes for. If omitted, returns discount codes for the whole program.

discountId
string

Filter discount codes by discount ID.

page
integer

The page number for pagination. The first page is 1.

Required range: x <= 9007199254740991
Example:

1

pageSize
integer
default:100

The number of items per page.

Required range: x <= 100
Example:

50

Response

The list of discount codes.

id
string
required

The unique ID of the discount code.

Example:

"dcode_1JVR7XRCSR0EDBAF39FZ4PMYE"

code
string
required

The alphanumeric discount code that customers can apply at checkout.

Example:

"PARTNER10OFF"

discountId
string | null
required

The ID of the discount this code belongs to.

partnerId
string
required

The ID of the partner this discount code is assigned to.

The ID of the partner's referral link this discount code is associated with.

disabledAt
string | null

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).