Skip to main content
GET
Search DiscountCodes
A DiscountCode is a code operators share with customers to take a percentage or a fixed amount off a price. Each code belongs to a location, and a code owned by a network parent location can also be redeemed at every location in that network. Set either DiscountPercentage or DiscountAmount, not both; if both are set the fixed amount is used and it is capped at the item price. The DiscountPricePlans, DiscountBookings, DiscountProducts and DiscountEvents flags choose which kinds of purchase the code pays for, and the matching Tariffs, ResourceTypes, Products and EventCategories lists narrow each one to specific items, where an empty list means every item of that kind is allowed. On update each list replaces the whole collection, so send the complete intended set of IDs. Availability is further limited by Active, the validity window (ValidFrom/ValidTo), the portal publish window (PublishFrom/PublishTo), usage caps (MaxUses, MaxUsesPerUser) and audience (OnlyForContacts, OnlyForMembers). ExpirationType and ExpiresIn set how long a customer keeps the discount once they claim it. Claiming a code creates a CoworkerDiscountCode linking it to that customer; set ReferralDiscount when the discount should reward the referring customer instead of the person redeeming it.

Authentication

This endpoint requires OAuth2 authentication. Include a valid bearer token in the Authorization header. The authenticated user must be a full unrestricted administrator or have the DiscountCode-List role.

Enums

Query Parameters

Pagination & Sorting

integer
default:"1"
The page number to retrieve.
integer
default:"25"
The number of records per page.
string
The property name to sort results by (e.g. Name, CreatedOn).
integer
Sort direction. 0 for ascending, 1 for descending.

Filters

integer
Filter by iD of the location this discount code is available at. If the location is a network parent, the code can also be redeemed at every location in that network.
string
Filter by display value for Business.Name..
string
Filter by display value for Business.Currency.Code..
string
Filter by the code customers type to claim the discount; must be unique within the location. Typically a short alphanumeric string such as SUMMER25.
string
Filter by short text shown to the customer when they enter a valid code, for example 20% off your first month. Required, and translatable per language.
boolean
Filter by whether the code can be redeemed at all. When false the code is ignored everywhere, regardless of its validity or publish dates.
string
Filter by uTC date and time from which the code can be redeemed on the members portal, website and app. Leave empty to publish immediately.
string
Filter by uTC date and time after which the code can no longer be redeemed on the members portal, website and app. Leave empty for no publish end date.
number
Filter by percentage taken off the price, entered as a whole number so 10 means 10% off. Set either this or DiscountAmount, not both; when both are set DiscountAmount wins.
number
Filter by fixed amount taken off the price, in the location currency. Capped at the item price so the result is never negative. Set either this or DiscountPercentage, not both; when both are set this one wins.
boolean
Filter by whether the discount is granted to the referring customer instead of the person redeeming it. When true, sign-up fails unless the new customer arrived through a referral link, and the discount stops applying if the referrer becomes inactive. To reward both sides, add a second non-referral code using the same Code value.
boolean
Filter by whether the code can be used to pay for plans. When false the code never applies to a plan, whatever Tariffs contains.
boolean
Filter by whether the code can be used to pay for bookings. When false the code never applies to a booking, whatever ResourceTypes contains.
boolean
Filter by whether the code can be used to pay for products. When false the code never applies to a product, whatever Products contains.
boolean
Filter by whether the code can be used to pay for event tickets. When false the code never applies to an event, whatever EventCategories contains.
integer
Filter by maximum number of times one customer may redeem this code. Leave empty for no per-customer limit.
integer
Filter by maximum number of redemptions across all customers, after which the code stops working. Leave empty for no overall limit.
boolean
Filter by whether the code is restricted to contacts, meaning customers with no active contract. Mutually exclusive with OnlyForMembers; leave both false to allow every customer.
boolean
Filter by whether the code is restricted to members, meaning customers with at least one active contract. Mutually exclusive with OnlyForContacts; leave both false to allow every customer.
string
Filter by uTC date and time from which the discount applies. Leave empty for no start date. For bookings this is compared against the booking start time rather than the moment of redemption.
string
Filter by uTC date and time after which the discount no longer applies. Leave empty for no end date. For bookings this is compared against the booking end time rather than the moment of redemption.
integer
Filter by unit used together with ExpiresIn to work out when a claimed code stops working for that customer: Day, Week, Month or Year.
integer
Filter by how many ExpirationType periods a customer keeps the discount for after claiming it, so 3 with ExpirationType Month expires it three months after the customer claims the code. Leave empty so the discount never expires on its own.

Range Filters

string
Filter by uTC date and time from which the code can be redeemed on the members portal, website and app. Leave empty to publish immediately greater than or equal to this value. Format: YYYY-MM-DDTHH:mm.
string
Filter by uTC date and time from which the code can be redeemed on the members portal, website and app. Leave empty to publish immediately less than or equal to this value. Format: YYYY-MM-DDTHH:mm.
string
Filter by uTC date and time after which the code can no longer be redeemed on the members portal, website and app. Leave empty for no publish end date greater than or equal to this value. Format: YYYY-MM-DDTHH:mm.
string
Filter by uTC date and time after which the code can no longer be redeemed on the members portal, website and app. Leave empty for no publish end date less than or equal to this value. Format: YYYY-MM-DDTHH:mm.
number
Filter by percentage taken off the price, entered as a whole number so 10 means 10% off. Set either this or DiscountAmount, not both; when both are set DiscountAmount wins greater than or equal to this value.
number
Filter by percentage taken off the price, entered as a whole number so 10 means 10% off. Set either this or DiscountAmount, not both; when both are set DiscountAmount wins less than or equal to this value.
number
Filter by fixed amount taken off the price, in the location currency. Capped at the item price so the result is never negative. Set either this or DiscountPercentage, not both; when both are set this one wins greater than or equal to this value.
number
Filter by fixed amount taken off the price, in the location currency. Capped at the item price so the result is never negative. Set either this or DiscountPercentage, not both; when both are set this one wins less than or equal to this value.
integer
Filter by maximum number of times one customer may redeem this code. Leave empty for no per-customer limit greater than or equal to this value.
integer
Filter by maximum number of times one customer may redeem this code. Leave empty for no per-customer limit less than or equal to this value.
integer
Filter by maximum number of redemptions across all customers, after which the code stops working. Leave empty for no overall limit greater than or equal to this value.
integer
Filter by maximum number of redemptions across all customers, after which the code stops working. Leave empty for no overall limit less than or equal to this value.
string
Filter by uTC date and time from which the discount applies. Leave empty for no start date. For bookings this is compared against the booking start time rather than the moment of redemption greater than or equal to this value. Format: YYYY-MM-DDTHH:mm.
string
Filter by uTC date and time from which the discount applies. Leave empty for no start date. For bookings this is compared against the booking start time rather than the moment of redemption less than or equal to this value. Format: YYYY-MM-DDTHH:mm.
string
Filter by uTC date and time after which the discount no longer applies. Leave empty for no end date. For bookings this is compared against the booking end time rather than the moment of redemption greater than or equal to this value. Format: YYYY-MM-DDTHH:mm.
string
Filter by uTC date and time after which the discount no longer applies. Leave empty for no end date. For bookings this is compared against the booking end time rather than the moment of redemption less than or equal to this value. Format: YYYY-MM-DDTHH:mm.
integer
Filter by how many ExpirationType periods a customer keeps the discount for after claiming it, so 3 with ExpirationType Month expires it three months after the customer claims the code. Leave empty so the discount never expires on its own greater than or equal to this value.
integer
Filter by how many ExpirationType periods a customer keeps the discount for after claiming it, so 3 with ExpirationType Month expires it three months after the customer claims the code. Leave empty so the discount never expires on its own less than or equal to this value.
string
Filter records created on or after this date. Format: YYYY-MM-DDTHH:mm.
string
Filter records created on or before this date. Format: YYYY-MM-DDTHH:mm.
string
Filter records updated on or after this date. Format: YYYY-MM-DDTHH:mm.
string
Filter records updated on or before this date. Format: YYYY-MM-DDTHH:mm.

Code Examples

Simple listing

Filtering by Code

Range filters

Response

200

DiscountCode[]
The list of DiscountCode records matching the query. See the Get one DiscountCode endpoint for the full list of properties returned for each record.
Partial records — The listing endpoint returns a summary representation of each DiscountCode. The following fields are not populated in the Records[] response: PublishFrom, PublishTo, ReferralDiscount, DiscountPricePlans, DiscountBookings, DiscountProducts, DiscountEvents, MaxUsesPerUser, MaxUses, OnlyForContacts, OnlyForMembers, ValidTo, ExpirationType, ExpiresIn.To get all fields, fetch the full record using the Get one DiscountCode endpoint.Important for updates: When updating a record via PUT, always retrieve the full record with a GET request first, apply your changes to that complete data, and then send the updated record. Do not use data from a listing response as the base for a PUT request, as missing fields may be unintentionally cleared.
integer
Current page number.
integer
Number of records per page.
string
The field used for sorting.
integer
The sort direction (0 = ascending, 1 = descending).
integer
Index of the first item on the current page.
integer
Index of the last item on the current page.
integer
Total number of matching records across all pages.
integer
Total number of pages.
boolean
Whether there is a next page of results.
boolean
Whether there is a previous page of results.
Example Response