CoworkerBookingCredits
Create CoworkerBookingCredit
Create a new CoworkerBookingCredit record.
POST
Create CoworkerBookingCredit
A booking credit (internally CoworkerBookingCredit) is a monetary balance assigned to a customer that can pay for bookings, event sign-ups, or, when universal credit is enabled, products, plans, passes, and selected one-off charges. It can be created manually or released from a plan or product benefit, and its availability can be limited by eligibility and a validity period.
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 CoworkerBookingCredit-Create role.Request Body
Required Fields
integer
required
ID of the customer this booking credit belongs to.
integer
required
ID of the location that issued and owns this booking credit.
number
required
Total monetary amount assigned when this credit is created; it sets the initial RemainingCredit.
Optional Fields
string
Optional operator-facing label or description for this booking credit.
integer[]
List of resource-type IDs this credit can pay for when CaneBeUsedForBookings is true; an empty list allows every resource type.
integer[]
List of product IDs this universal credit can pay for; when IsUniversalCredit is true, an empty list allows every product.
integer[]
List of plan IDs this universal credit can pay for; when IsUniversalCredit is true, an empty list allows every plan.
string
Optional UTC date and time when this credit becomes usable; blank means it is usable immediately.
string
Optional UTC date and time when this credit stops being usable; blank means no expiry, and when set it must be later than ValidFrom.
boolean
Whether this credit can pay for bookings; use ElegibleResourceTypes to limit eligible resource types.
boolean
Whether this credit can pay for event sign-ups; use EventCategories to limit eligible event categories.
integer[]
List of event-category IDs this credit can pay for when CaneBeUsedForEvents is true; an empty list allows every event category.
boolean
Whether this credit can pay for products, plans, passes, and eligible charges; use the eligibility lists and AppliesToCharges to restrict those uses.
string
Internal unique ID linking this credit to the contract that originated it.
integer[]
List of pass IDs this universal credit can pay for; when IsUniversalCredit is true, an empty list allows every pass.
boolean
Whether this universal credit can pay for one-off charges in addition to products, plans, and passes.
Code Examples
Response
200
integer
HTTP status code.
200 on success.string
A human-readable message confirming the creation.
object
Contains the
Id of the newly created record.boolean
true if the coworkerbookingcredit was created successfully.array
null on success.Example Response
400
string
A summary of the validation error(s), in the format
PropertyName: error message.any
null on validation failure.object[]
Array of validation errors.
boolean
false when the request fails validation.Example Response