ProductBookingCredits
Create ProductBookingCredit
Create a new ProductBookingCredit record.
POST
Create ProductBookingCredit
A ProductBookingCredit represents an amount of credit linked to aDocumentation Index
Fetch the complete documentation index at: https://learn.nexudus.com/llms.txt
Use this file to discover all available pages before exploring further.
Product. When a customer purchases the product, the credit is automatically released as a CoworkerBookingCredit on the customer’s account.
Credit can be configured for two primary uses:
- Bookings — set
CaneBeUsedForBookingsto allow the credit to pay for bookings. UseElegibleResourceTypesto restrict the credit to specific resource types; if left empty the credit is valid for all resource types. - Events — set
CaneBeUsedForEventsto allow the credit to pay for event sign-ups. UseEventCategoriesto restrict to specific event categories; if left empty the credit is valid for all events.
IsUniversalCredit enables the credit for products, time passes, and other charges. Use ElegibleProducts, ElegiblePasses, and AppliesToCharges to restrict which products or passes the credit is valid for. If all restriction lists are empty the universal credit applies to all products, passes and charges.
Use ExpirationType and ExpiresIn to control when the released credit expires.
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-Create role.Enums
eRecurrentChargePattern
eRecurrentChargePattern
| Value | Name |
|---|---|
| 1 | PricePlan |
| 2 | Day |
| 3 | Week |
| 4 | Month |
| 5 | Year |
| 6 | LastDayOfMonth |
Request Body
Required Fields
Credit name.
ID of the product linked to this record.
Credit amount.
Optional Fields
List of elegible resource types linked to this record.
List of elegible products linked to this record.
List of elegible tariffs linked to this record.
The expire time in months value for this product booking credit.
The expire time in weeks value for this product booking credit.
Whether this credit can be used to pay for bookings. Restrict to specific resource types with
ElegibleResourceTypes.Whether this credit can be used to pay for event sign-ups. Restrict to specific categories with
EventCategories.List of event categories linked to this record.
Expiration type. See
eRecurrentChargePattern? enum above.Number of periods (of
ExpirationType) until the released credit expires.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.List of elegible passes linked to this record.
Whether this universal credit applies to other charges.
Code Examples
Response
200
HTTP status code.
200 on success.A human-readable message confirming the creation.
Contains the
Id of the newly created record.true if the productbookingcredit was created successfully.null on success.Example Response
400
A summary of the validation error(s), in the format
PropertyName: error message.null on validation failure.Array of validation errors.
false when the request fails validation.Example Response
Create ProductBookingCredit