ProductBookingCredits
Update ProductBookingCredit
Update an existing ProductBookingCredit record.
PUT
Update ProductBookingCredit
Updates an existing ProductBookingCredit 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 ProductBookingCredit-Edit role.Enums
eRecurrentChargePattern
eRecurrentChargePattern
Request Body
Required Fields
integer
required
The Id of the ProductBookingCredit record to update.
string
required
Credit name.
integer
required
ID of the product linked to this record.
number
required
Credit amount that will be released to the customer’s account as a CoworkerBookingCredit. Release timing depends on purchase method: admin sales can release before payment (ActivateNow), member purchases release immediately (unless Store.AlwaysInvoice is set), and contact purchases release after payment.
Optional Fields
integer[]
List of eligible resource types this credit can be used for. If empty, the credit is valid for all resource types.
integer[]
IDs added to the ElegibleResourceTypes relationship..
integer[]
IDs removed from the ElegibleResourceTypes relationship..
integer[]
List of eligible products this universal credit can be used to purchase. If empty and IsUniversalCredit is true, the credit applies to all products.
integer[]
IDs added to the ElegibleProducts relationship..
integer[]
IDs removed from the ElegibleProducts relationship..
integer[]
List of eligible tariffs (plans) this credit is valid for.
integer[]
IDs added to the ElegibleTariffs relationship..
integer[]
IDs removed from the ElegibleTariffs relationship..
integer
Expiration period in months (legacy field, use ExpiresIn with ExpirationType instead).
integer
Expiration period in weeks (legacy field, use ExpiresIn with ExpirationType instead).
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[]
List of event categories this credit is valid for. If empty and CaneBeUsedForEvents is true, the credit is valid for all events.
integer[]
IDs added to the EventCategories relationship..
integer[]
IDs removed from the EventCategories relationship..
integer
Expiration type: PricePlan (expires at end of billing period of the main contract - customer must have a main contract), Day, Week, Month, Year, or LastDayOfMonth. See
eRecurrentChargePattern? enum above.integer
Number of periods (of ExpirationType) until the released credit expires.
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.
integer[]
List of eligible time passes this universal credit can be used to purchase. If empty and IsUniversalCredit is true, the credit applies to all passes.
integer[]
IDs added to the ElegiblePasses relationship..
integer[]
IDs removed from the ElegiblePasses relationship..
boolean
Whether this universal credit applies to other charges beyond products 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 productbookingcredit 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