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 credit is assigned to.
integer
required
ID of the location issuing the credit.
number
required
Total credit amount originally assigned.

Optional Fields

string
Optional description or label for this credit.
integer[]
Resource types this credit can be used for. If empty, the credit is valid for all resource types.
integer[]
Resource type IDs to add to ElegibleResourceTypes.
integer[]
Resource type IDs to remove from ElegibleResourceTypes.
integer[]
Products this credit can be used for. If empty, applies to all products.
integer[]
Product IDs to add to ElegibleProducts.
integer[]
Product IDs to remove from ElegibleProducts.
integer[]
Plans (tariffs) this credit is restricted to. If empty, applies to customers on any plan.
integer[]
Plan IDs to add to ElegibleTariffs.
integer[]
Plan IDs to remove from ElegibleTariffs.
string
Date from which this credit is valid.
string
Date on which this credit expires.
boolean
Whether this credit can be used to pay for bookings. Restrict to specific resource types with ElegibleResourceTypes.
boolean
Whether this credit can be used to pay for event sign-ups. Restrict to specific categories with EventCategories.
integer[]
Event categories this credit can be used for. If empty, applies to all event categories.
integer[]
Event category IDs to add to EventCategories.
integer[]
Event category IDs to remove from EventCategories.
boolean
Whether this is a universal credit applicable to products, time passes and other charges. Restrict with ElegibleProducts, ElegiblePasses and AppliesToCharges; if all are empty the credit applies to all products, passes and charges.
boolean
Whether to use the credit price instead of the standard booking price when this credit is applied.
string
Unique ID of the contract that originated this credit.
integer[]
Time passes this credit can be used for. If empty, applies to all passes.
integer[]
Pass IDs to add to ElegiblePasses.
integer[]
Pass IDs to remove from ElegiblePasses.
boolean
Whether this universal credit applies to other charges.

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