Skip to main content
PUT
Update CoworkerBookingCredit
Updates an existing CoworkerBookingCredit record. You must include the Id of the record to update along with all required fields.

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-Edit role.

Request Body

Required Fields

integer
required
The Id of the CoworkerBookingCredit record to update.
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[]
IDs added to the ElegibleResourceTypes relationship..
integer[]
IDs removed from the ElegibleResourceTypes relationship..
integer[]
List of product IDs this universal credit can pay for; when IsUniversalCredit is true, an empty list allows every product.
integer[]
IDs added to the ElegibleProducts relationship..
integer[]
IDs removed from the ElegibleProducts relationship..
integer[]
List of plan IDs this universal credit can pay for; when IsUniversalCredit is true, an empty list allows every plan.
integer[]
IDs added to the ElegibleTariffs relationship..
integer[]
IDs removed from the ElegibleTariffs relationship..
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.
integer[]
IDs added to the EventCategories relationship..
integer[]
IDs removed from the EventCategories relationship..
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.
integer[]
IDs added to the ElegiblePasses relationship..
integer[]
IDs removed from the ElegiblePasses relationship..
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 update.
object
Contains the Id of the updated record.
boolean
true if the coworkerbookingcredit was updated 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