ContractProducts
Create ContractProduct
Create a new ContractProduct record.
POST
Create ContractProduct
A contract product (internally known as ContractProduct) is a recurring product line on a customer’s contract, billed with plan invoices and optionally controlled by a price override and billing window. When the product includes passes, booking time credit, monetary credit, or printing credit, those benefits are released as each contract invoice is created; configure the product’s credit expiration separately, either aligned with or independent of the billing cycle. A negative product price creates a discount shown as a negative invoice line; use ContractSchedule for a future contract price change instead. Do not use a contract product for a deposit: use ContractDeposit so it is invoiced only at contract start and can be refunded when appropriate.
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 ContractProduct-Create role.Request Body
Required Fields
integer
required
ID of the customer’s contract; it determines the location and billing cycle that will receive this recurring product line..
integer
required
ID of the location product billed on the contract’s invoices; its current price is used when this line has no price override..
integer
required
Number of product units billed in each contract billing cycle; must be at least 1..
Optional Fields
string
Optional operator notes about this recurring product line..
number
Optional per-unit price override in the location’s currency; when null, the linked product’s price is used..
string
Optional UTC date and time for the first invoice period that includes this product line; inclusive, and null starts billing immediately..
string
Optional UTC date and time for the first invoice period that excludes this product line; exclusive, and null continues billing indefinitely..
boolean
Whether this line requests prorating when it ends during an invoice period; the product’s setting can also enable prorating, and the contract plan must have ProrateDaysBefore configured..
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 contractproduct 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