Skip to main content

Contract Schema

Schemas

Contract

Supplier-side contract record.

PropertyTypeDescription
idintegerUnique contract ID.
refstringContract reference number.
contract_descriptionstringDescription of the contract.
supplier_idintegerID of the associated supplier.
supplier_namestringName of the supplier.
contact_1stringPrimary contact name.
contact_2stringSecondary contact name.
contact_3stringTertiary contact name.
sla_idintegerAssociated SLA ID.
sla_namestringAssociated SLA name.
notestringContract notes.
start_datedatetimeContract start date.
end_datedatetimeContract end date.
startedbooleanWhether the contract has started.
expiredbooleanWhether the contract has expired.
is_defaultbooleanWhether this is the default contract.
activebooleanWhether the contract is active.
dontsendalarmbooleanSuppress expiry alarm notifications.
costing_informationstringAdditional costing details.
assetsarrayList of associated assets/devices.
customfieldsarrayCustom field values.
renewedfrom_idintegerID of the contract this was renewed from.
renewedby_idintegerID of the contract that renewed this one.
audit_logarrayAudit trail entries.

Contract_View

Paginated list wrapper for Contract results.

PropertyTypeDescription
page_nointegerCurrent page number.
page_sizeintegerPage size.
record_countintegerTotal matching records.
contractsarrayArray of Contract objects.
columnsarrayView column configuration.

ContractHeader

Client-facing contract record (billing contract).

PropertyTypeDescription
idintegerUnique contract header ID.
client_idintegerAssociated client ID.
client_namestringClient name.
refstringContract reference.
start_datedatetimeContract start date.
end_datedatetimeContract end date.
startedbooleanWhether the contract has started.
expiredbooleanWhether the contract has expired.
activebooleanWhether the contract is active.
statusintegerContract status code.
contract_statusstringContract status label.
contracttypeintegerContract type ID.
contracttype_namestringContract type name.
subtypeintegerContract sub-type ID.
site_idintegerPrimary site ID.
site_namestringPrimary site name.
sla_idintegerAssociated SLA ID.
sla_namestringAssociated SLA name.
billingperiodintegerBilling period code.
billing_period_stringstringBilling period label.
billingdescriptionintegerBilling description code.
billing_description_stringstringBilling description label.
periodchargeamountnumberCharge amount per billing period.
next_invoice_datedatetimeDate of the next invoice.
periodicinvoicenextdatedatetimeNext periodic invoice date.
termmonthsintegerContract term in months.
rollingcontractbooleanWhether the contract rolls over automatically.
allowprepaybooleanWhether pre-pay is allowed.
allowfixedpricebooleanWhether fixed price is allowed.
allowpygbooleanWhether Pay-as-you-go is allowed.
prepayrecurringchargenumberRecurring pre-pay charge amount.
prepayrecurringhoursnumberRecurring pre-pay hours.
contract_prepaytotalnumberTotal pre-pay balance purchased.
contract_prepayusednumberPre-pay hours/amount consumed.
contract_prepaybalancenumberRemaining pre-pay balance.
chargehoursperperiodnumberHours charged per billing period.
chargerolloverbooleanWhether unused hours roll over.
chargeperdevicebooleanWhether billing is per device.
notestringContract notes.
invoicedescriptionstringDescription shown on invoices.
paymentmethodintegerPayment method code.
paymentschemeintegerPayment scheme code.
user_idintegerAssigned agent/user ID.
user_namestringAssigned agent/user name.
assetsarrayAssociated devices/assets.
usersarrayAssociated users.
periodsarrayContract periods.
billingplansarrayBilling plan detail items.
schedulearrayPayment schedule entries.
scheduleplanarrayPlanned appointment schedule.
customfieldsarrayCustom field values.
approvernamestringName of the contract approver.
approveremailaddressstringEmail of the contract approver.
approverdatedatetimeDate contract was approved.
signaturestringApproval signature data.
can_approvebooleanWhether the current user can approve.
audit_logarrayAudit trail entries.
last_modifieddatetimeLast modified timestamp.
createdby_idintegerID of the user who created the contract.
createdby_namestringName of the user who created the contract.

ContractHeader_View

Paginated list wrapper for ContractHeader results.

PropertyTypeDescription
page_nointegerCurrent page number.
page_sizeintegerPage size.
record_countintegerTotal matching records.
contractsarrayArray of ContractHeader_List objects.
columnsarrayView column configuration.

ContractApproval

Payload for submitting a contract approval via the portal.

PropertyTypeDescription
idintegerContract header ID to approve.
tokenstringApproval token (from the approval email link).
resultbooleantrue = approved, false = rejected.
approvernamestringName of the approver.
approveremailaddressstringEmail of the approver.
signaturestringDigital signature data.

ContractRule

Automated rule for assigning contracts to tickets.

PropertyTypeDescription
idintegerRule ID.
namestringRule name.
sequenceintegerEvaluation order.
enabledbooleanWhether the rule is active.
user_under_clientbooleanMatch users under the client.
outcome_contract_typeintegerContract type to assign.
outcome_contract_subtypeintegerContract sub-type to assign.
outcome_coveredbooleanWhether the ticket is covered under contract.
outcome_valueintegerOutcome value code.
outcome_end_datedatetimeOutcome end date.
rule_criteriaarrayArray of AutoassignCriteria conditions.
is_matchedbooleanWhether the rule matched (read-only).
outcome_contract_type_displaystringDisplay label for the contract type outcome.
outcome_contract_subtype_displaystringDisplay label for the contract sub-type outcome.

ContractSchedule

A single scheduled billing entry tied to a contract.

PropertyTypeDescription
idstring (uuid)Schedule entry UUID.
chidintegerContract header ID.
seqintegerSequence number.
amountnumberScheduled charge amount.
datedatetimeScheduled billing date.
agent_idintegerAgent responsible.
notestringNotes for this entry.

ContractSchedulePlan

A planned appointment/visit entry linked to a contract.

PropertyTypeDescription
idintegerPlan entry ID.
contract_idintegerParent contract header ID.
datedatetimePlanned date.
requesttypeintegerTicket request type ID.
requesttype_namestringTicket request type name.
site_idintegerSite for the visit.
site_namestringSite name.
agent_idintegerAssigned agent ID.
agent_namestringAssigned agent name.
hours_allocatednumberHours allocated for the visit.
hoursnumberActual hours logged.
ticket_idintegerLinked ticket ID (if generated).
subjectstringTicket subject.
appointment_type_idintegerAppointment type ID.
eventobjectAssociated Appointment object.

ContractTemplateHeader

Billing template used to generate client contracts.

PropertyTypeDescription
idintegerTemplate ID.
namestringTemplate name.
activebooleanWhether the template is active.
subtypeintegerContract sub-type.
billingperiodintegerBilling period code.
billingdescriptionintegerBilling description code.
prepayrecurringchargenumberRecurring pre-pay charge.
prepayrecurringhoursnumberRecurring pre-pay hours.
prepayrecurringchargenextdatedatetimeNext recurring pre-pay charge date.
billforrecurringprepayamountbooleanBill for recurring pre-pay as an amount.
autotopupthreshholdnumberAuto top-up trigger threshold.
autotopuptoamountnumberAmount to top up to.
autotopupcostperhournumberCost per hour for auto top-up.
autotopupbyamountnumberFixed amount to add on auto top-up.
numberofunitsfreenumberFree units included in the template.
prepayrecurringminimumdeductionnumberMinimum recurring deduction.
prepayrecurringautomaticdeductionnumberAutomatic recurring deduction amount.
billingplansarrayArray of ContractTemplateDetail billing plan items.
clientsarrayClient IDs associated with this template.
create_contractbooleanWhether to auto-create contracts from this template.
seqintegerDisplay sequence.

PrepayHistory

A single pre-pay purchase or adjustment record for a client.

PropertyTypeDescription
idintegerRecord ID.
client_idintegerClient ID.
client_namestringClient name.
datedatetimeDate of the pre-pay transaction.
hoursnumberHours purchased or adjusted.
amountnumberMonetary amount purchased or adjusted.
descriptionstringTransaction description.
invoicedatedatetimeDate of the associated invoice.
invoice_idstringAssociated invoice ID.
invoice_numberstringAssociated invoice number.
invoice_lineintegerInvoice line number.
invoice_line_namestringInvoice line description.
expirydatedatetimePre-pay expiry date.
expirycheckedbooleanWhether expiry has been processed.
client_to_invoice_to_idintegerClient to invoice (if different).
recalc_expiry_recordsbooleanTrigger recalculation of expiry records.