DiscountCodes
Search DiscountCodes
Search and list DiscountCode records with filtering, sorting, and pagination.
GET
Search DiscountCodes
A DiscountCode represents a discount registered in the system. Each discount code belongs to a
Business (location) and defines a percentage or fixed-amount discount that can be applied to different item types: price plans (tariffs), bookings, products, and/or events.
Use the boolean flags (DiscountPricePlans, DiscountBookings, DiscountProducts, DiscountEvents) to control which item categories the discount applies to. For each enabled category, associate the specific eligible items via the corresponding ID list (e.g. Tariffs, ResourceTypes, Products, EventCategories). Use the Added* and Removed* list variants for incremental updates without replacing the full list.
A discount can specify either DiscountPercentage (e.g. 10 for 10% off) or DiscountAmount (a fixed monetary amount off), but not both.
Discount codes can be assigned to individual customers via CoworkerDiscountCode. Availability can be further restricted by validity dates (ValidFrom/ValidTo), publish window (PublishFrom/PublishTo), usage caps (MaxUses, MaxUsesPerUser), audience (OnlyForContacts, OnlyForMembers), and expiration rules (ExpirationType, ExpiresIn).
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
eDiscountExpirePeriod
eDiscountExpirePeriod
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 business linked to this record.
string
Filter by name of the business (location) this discount code belongs to.
string
Filter by currency code of the business (e.g. USD, EUR).
string
Filter by the unique alphanumeric code customers enter to apply the discount.
string
Filter by human-readable description of what this discount code is for.
boolean
Filter by whether this discount code is currently active and can be redeemed.
string
Filter by date from which this discount code is visible/published to customers.
string
Filter by date until which this discount code is visible/published to customers.
number
Filter by percentage discount to apply (e.g. 10 for 10% off). Mutually exclusive with DiscountAmount.
number
Filter by fixed monetary amount to discount. Mutually exclusive with DiscountPercentage.
boolean
Filter by whether this discount code is used as part of the referral program.
boolean
Filter by whether this discount can be applied to price plans (tariffs). When true, use Tariffs to restrict to specific plans.
boolean
Filter by whether this discount can be applied to resource bookings. When true, use ResourceTypes to restrict to specific resource types.
boolean
Filter by whether this discount can be applied to products. When true, use Products to restrict to specific products.
boolean
Filter by whether this discount can be applied to events. When true, use EventCategories to restrict to specific event categories.
integer
Filter by maximum number of times a single customer can redeem this discount code.
integer
Filter by maximum total number of times this discount code can be redeemed across all customers.
boolean
Filter by when true, only contacts (non-member customers) can use this discount code.
boolean
Filter by when true, only members (customers with an active plan) can use this discount code.
string
Filter by start date from which this discount code can be redeemed.
string
Filter by end date after which this discount code can no longer be redeemed.
integer
Filter by unit of the expiration period (Day, Week, Month, Year). Used with ExpiresIn to determine when the discount expires after being assigned to a customer.
integer
Filter by number of ExpirationType periods after assignment until the discount expires for a customer.
Range Filters
string
Filter by date from which this discount code is visible/published to customers greater than or equal to this value. Format:
YYYY-MM-DDTHH:mm.string
Filter by date from which this discount code is visible/published to customers less than or equal to this value. Format:
YYYY-MM-DDTHH:mm.string
Filter by date until which this discount code is visible/published to customers greater than or equal to this value. Format:
YYYY-MM-DDTHH:mm.string
Filter by date until which this discount code is visible/published to customers less than or equal to this value. Format:
YYYY-MM-DDTHH:mm.number
Filter by percentage discount to apply (e.g. 10 for 10% off). Mutually exclusive with DiscountAmount greater than or equal to this value.
number
Filter by percentage discount to apply (e.g. 10 for 10% off). Mutually exclusive with DiscountAmount less than or equal to this value.
number
Filter by fixed monetary amount to discount. Mutually exclusive with DiscountPercentage greater than or equal to this value.
number
Filter by fixed monetary amount to discount. Mutually exclusive with DiscountPercentage less than or equal to this value.
integer
Filter by maximum number of times a single customer can redeem this discount code greater than or equal to this value.
integer
Filter by maximum number of times a single customer can redeem this discount code less than or equal to this value.
integer
Filter by maximum total number of times this discount code can be redeemed across all customers greater than or equal to this value.
integer
Filter by maximum total number of times this discount code can be redeemed across all customers less than or equal to this value.
string
Filter by start date from which this discount code can be redeemed greater than or equal to this value. Format:
YYYY-MM-DDTHH:mm.string
Filter by start date from which this discount code can be redeemed less than or equal to this value. Format:
YYYY-MM-DDTHH:mm.string
Filter by end date after which this discount code can no longer be redeemed greater than or equal to this value. Format:
YYYY-MM-DDTHH:mm.string
Filter by end date after which this discount code can no longer be redeemed less than or equal to this value. Format:
YYYY-MM-DDTHH:mm.integer
Filter by number of ExpirationType periods after assignment until the discount expires for a customer greater than or equal to this value.
integer
Filter by number of ExpirationType periods after assignment until the discount expires for a customer 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.
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
Search DiscountCodes