Skip to main content
POST
Create TariffBookingCredit
A TariffBookingCredit represents an amount of credit linked to a plan (Tariff). When a customer’s contract on that plan renews, the credit is automatically released as a CoworkerBookingCredit on the customer’s account. Credit can be configured for two primary uses:
  • Bookings — set CaneBeUsedForBookings to allow the credit to pay for bookings. Use ElegibleResourceTypes to restrict the credit to specific resource types; if left empty the credit is valid for all resource types.
  • Events — set CaneBeUsedForEvents to allow the credit to pay for event sign-ups. Use EventCategories to restrict to specific event categories; if left empty the credit is valid for all events.
Setting 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 ServiceRenewalTime to control how often the credit is renewed (e.g. weekly, monthly).

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 TariffBookingCredit-Create role.

Enums

Request Body

Required Fields

string
required
Credit name.
integer
required
ID of the tariff linked to this record.
number
required
Credit amount.
integer
required
Service renewal time period.

Optional Fields

integer[]
List of elegible resource types linked to this record.
integer[]
List of elegible products linked to this record.
integer[]
List of elegible tariffs linked to this record.
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 linked to this record.
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 elegible passes linked to this record.
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 creation.
object
Contains the Id of the newly created record.
boolean
true if the tariffbookingcredit 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