Skip to main content
POST
Create TariffBookingCredit
Plan booking credit (internally TariffBookingCredit) represents an amount of monetary credit linked to a plan (internally Tariff). The Credit value specifies how much credit is included. The renewal time controls how often the credit expires and the allowance resets.

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 plan linked to this record.
number
required
Credit amount.
integer
required
How often will this credit amount will expire and be issued again. Most common option is TariffMonth, which follows the plan renewal cycle..

Optional Fields

integer[]
List of the IDs of the resource types this booking credit can be used for.
integer[]
List of the IDs of the products this booking credit can be used for. Applies only when IsUniversalCredit is true..
integer[]
List of the IDs of the plans this booking credit can be used for. Applies only when IsUniversalCredit is true..
boolean
Whether this credit can be used to pay for bookings. Restrict to specific resource types using elegible-resource-types.
boolean
Whether this credit can be used to pay for event sign-ups. Restrict to specific categories with ElegibleResourceTypes.
integer[]
List of the IDs of the event categories this booking credit can be used for. Applies only when IsUniversalCredit is true..
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 the IDs of the passes this booking credit can be used for. Applies only when IsUniversalCredit is true..
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