Contract Schema
Schemas
Contract
Supplier-side contract record.
| Property | Type | Description |
|---|---|---|
id | integer | Unique contract ID. |
ref | string | Contract reference number. |
contract_description | string | Description of the contract. |
supplier_id | integer | ID of the associated supplier. |
supplier_name | string | Name of the supplier. |
contact_1 | string | Primary contact name. |
contact_2 | string | Secondary contact name. |
contact_3 | string | Tertiary contact name. |
sla_id | integer | Associated SLA ID. |
sla_name | string | Associated SLA name. |
note | string | Contract notes. |
start_date | datetime | Contract start date. |
end_date | datetime | Contract end date. |
started | boolean | Whether the contract has started. |
expired | boolean | Whether the contract has expired. |
is_default | boolean | Whether this is the default contract. |
active | boolean | Whether the contract is active. |
dontsendalarm | boolean | Suppress expiry alarm notifications. |
costing_information | string | Additional costing details. |
assets | array | List of associated assets/devices. |
customfields | array | Custom field values. |
renewedfrom_id | integer | ID of the contract this was renewed from. |
renewedby_id | integer | ID of the contract that renewed this one. |
audit_log | array | Audit trail entries. |
Contract_View
Paginated list wrapper for Contract results.
| Property | Type | Description |
|---|---|---|
page_no | integer | Current page number. |
page_size | integer | Page size. |
record_count | integer | Total matching records. |
contracts | array | Array of Contract objects. |
columns | array | View column configuration. |
ContractHeader
Client-facing contract record (billing contract).
| Property | Type | Description |
|---|---|---|
id | integer | Unique contract header ID. |
client_id | integer | Associated client ID. |
client_name | string | Client name. |
ref | string | Contract reference. |
start_date | datetime | Contract start date. |
end_date | datetime | Contract end date. |
started | boolean | Whether the contract has started. |
expired | boolean | Whether the contract has expired. |
active | boolean | Whether the contract is active. |
status | integer | Contract status code. |
contract_status | string | Contract status label. |
contracttype | integer | Contract type ID. |
contracttype_name | string | Contract type name. |
subtype | integer | Contract sub-type ID. |
site_id | integer | Primary site ID. |
site_name | string | Primary site name. |
sla_id | integer | Associated SLA ID. |
sla_name | string | Associated SLA name. |
billingperiod | integer | Billing period code. |
billing_period_string | string | Billing period label. |
billingdescription | integer | Billing description code. |
billing_description_string | string | Billing description label. |
periodchargeamount | number | Charge amount per billing period. |
next_invoice_date | datetime | Date of the next invoice. |
periodicinvoicenextdate | datetime | Next periodic invoice date. |
termmonths | integer | Contract term in months. |
rollingcontract | boolean | Whether the contract rolls over automatically. |
allowprepay | boolean | Whether pre-pay is allowed. |
allowfixedprice | boolean | Whether fixed price is allowed. |
allowpyg | boolean | Whether Pay-as-you-go is allowed. |
prepayrecurringcharge | number | Recurring pre-pay charge amount. |
prepayrecurringhours | number | Recurring pre-pay hours. |
contract_prepaytotal | number | Total pre-pay balance purchased. |
contract_prepayused | number | Pre-pay hours/amount consumed. |
contract_prepaybalance | number | Remaining pre-pay balance. |
chargehoursperperiod | number | Hours charged per billing period. |
chargerollover | boolean | Whether unused hours roll over. |
chargeperdevice | boolean | Whether billing is per device. |
note | string | Contract notes. |
invoicedescription | string | Description shown on invoices. |
paymentmethod | integer | Payment method code. |
paymentscheme | integer | Payment scheme code. |
user_id | integer | Assigned agent/user ID. |
user_name | string | Assigned agent/user name. |
assets | array | Associated devices/assets. |
users | array | Associated users. |
periods | array | Contract periods. |
billingplans | array | Billing plan detail items. |
schedule | array | Payment schedule entries. |
scheduleplan | array | Planned appointment schedule. |
customfields | array | Custom field values. |
approvername | string | Name of the contract approver. |
approveremailaddress | string | Email of the contract approver. |
approverdate | datetime | Date contract was approved. |
signature | string | Approval signature data. |
can_approve | boolean | Whether the current user can approve. |
audit_log | array | Audit trail entries. |
last_modified | datetime | Last modified timestamp. |
createdby_id | integer | ID of the user who created the contract. |
createdby_name | string | Name of the user who created the contract. |
ContractHeader_View
Paginated list wrapper for ContractHeader results.
| Property | Type | Description |
|---|---|---|
page_no | integer | Current page number. |
page_size | integer | Page size. |
record_count | integer | Total matching records. |
contracts | array | Array of ContractHeader_List objects. |
columns | array | View column configuration. |
ContractApproval
Payload for submitting a contract approval via the portal.
| Property | Type | Description |
|---|---|---|
id | integer | Contract header ID to approve. |
token | string | Approval token (from the approval email link). |
result | boolean | true = approved, false = rejected. |
approvername | string | Name of the approver. |
approveremailaddress | string | Email of the approver. |
signature | string | Digital signature data. |
ContractRule
Automated rule for assigning contracts to tickets.
| Property | Type | Description |
|---|---|---|
id | integer | Rule ID. |
name | string | Rule name. |
sequence | integer | Evaluation order. |
enabled | boolean | Whether the rule is active. |
user_under_client | boolean | Match users under the client. |
outcome_contract_type | integer | Contract type to assign. |
outcome_contract_subtype | integer | Contract sub-type to assign. |
outcome_covered | boolean | Whether the ticket is covered under contract. |
outcome_value | integer | Outcome value code. |
outcome_end_date | datetime | Outcome end date. |
rule_criteria | array | Array of AutoassignCriteria conditions. |
is_matched | boolean | Whether the rule matched (read-only). |
outcome_contract_type_display | string | Display label for the contract type outcome. |
outcome_contract_subtype_display | string | Display label for the contract sub-type outcome. |
ContractSchedule
A single scheduled billing entry tied to a contract.
| Property | Type | Description |
|---|---|---|
id | string (uuid) | Schedule entry UUID. |
chid | integer | Contract header ID. |
seq | integer | Sequence number. |
amount | number | Scheduled charge amount. |
date | datetime | Scheduled billing date. |
agent_id | integer | Agent responsible. |
note | string | Notes for this entry. |
ContractSchedulePlan
A planned appointment/visit entry linked to a contract.
| Property | Type | Description |
|---|---|---|
id | integer | Plan entry ID. |
contract_id | integer | Parent contract header ID. |
date | datetime | Planned date. |
requesttype | integer | Ticket request type ID. |
requesttype_name | string | Ticket request type name. |
site_id | integer | Site for the visit. |
site_name | string | Site name. |
agent_id | integer | Assigned agent ID. |
agent_name | string | Assigned agent name. |
hours_allocated | number | Hours allocated for the visit. |
hours | number | Actual hours logged. |
ticket_id | integer | Linked ticket ID (if generated). |
subject | string | Ticket subject. |
appointment_type_id | integer | Appointment type ID. |
event | object | Associated Appointment object. |
ContractTemplateHeader
Billing template used to generate client contracts.
| Property | Type | Description |
|---|---|---|
id | integer | Template ID. |
name | string | Template name. |
active | boolean | Whether the template is active. |
subtype | integer | Contract sub-type. |
billingperiod | integer | Billing period code. |
billingdescription | integer | Billing description code. |
prepayrecurringcharge | number | Recurring pre-pay charge. |
prepayrecurringhours | number | Recurring pre-pay hours. |
prepayrecurringchargenextdate | datetime | Next recurring pre-pay charge date. |
billforrecurringprepayamount | boolean | Bill for recurring pre-pay as an amount. |
autotopupthreshhold | number | Auto top-up trigger threshold. |
autotopuptoamount | number | Amount to top up to. |
autotopupcostperhour | number | Cost per hour for auto top-up. |
autotopupbyamount | number | Fixed amount to add on auto top-up. |
numberofunitsfree | number | Free units included in the template. |
prepayrecurringminimumdeduction | number | Minimum recurring deduction. |
prepayrecurringautomaticdeduction | number | Automatic recurring deduction amount. |
billingplans | array | Array of ContractTemplateDetail billing plan items. |
clients | array | Client IDs associated with this template. |
create_contract | boolean | Whether to auto-create contracts from this template. |
seq | integer | Display sequence. |
PrepayHistory
A single pre-pay purchase or adjustment record for a client.
| Property | Type | Description |
|---|---|---|
id | integer | Record ID. |
client_id | integer | Client ID. |
client_name | string | Client name. |
date | datetime | Date of the pre-pay transaction. |
hours | number | Hours purchased or adjusted. |
amount | number | Monetary amount purchased or adjusted. |
description | string | Transaction description. |
invoicedate | datetime | Date of the associated invoice. |
invoice_id | string | Associated invoice ID. |
invoice_number | string | Associated invoice number. |
invoice_line | integer | Invoice line number. |
invoice_line_name | string | Invoice line description. |
expirydate | datetime | Pre-pay expiry date. |
expirychecked | boolean | Whether expiry has been processed. |
client_to_invoice_to_id | integer | Client to invoice (if different). |
recalc_expiry_records | boolean | Trigger recalculation of expiry records. |