Skip to main content

Contract Model

The Contract model represents the snapshot data sent as a contract webhook. It includes all relevant contract information, including user, duration, type, financials, and lifecycle metadata.

Fields

FieldTypeDescription
iduuidUnique identifier of the contract.
collective_iduuid (nullable)Collective identifier associated with the contract.
energy_contract_typeEnergyContractTypeType of energy contract.
is_companybooleanIndicates if the contract belongs to a company.
contract_durationContractDurationDuration of the contract.
contract_variablesContractPayloadPayload for contract variables.
has_tax_credit_rightbooleanIndicates if the contract has tax credit rights.
contract_phaseContractPhasePhase of the contract.
transfer_typeTransferTypeType of transfer.
user_iduuidIdentifier of the user associated with the contract.
numberintegerContract number.
monthly_depositMonthlyDepositMonthly deposit amount and breakdown.
contract_labelsContractLabels[]Labels associated with the contract.
accepted_atdatetime (nullable)Date when the contract was accepted.
created_atdatetimeDate when the contract was created.
updated_atdatetimeDate when the contract was last updated.
deleted_atdatetime (nullable)Date when the contract was deleted, if applicable.

MonthlyDeposit

Represents the monthly deposit amount associated with a contract.

FieldTypeDescription
total_excldecimal (nullable)Total amount excluding VAT.
total_incldecimal (nullable)Total amount including VAT.
vatdecimal (nullable)Value-added tax.
productsProduct[]List of products associated with the deposit.

Product

Represents a product or service associated with a contract.

FieldTypeDescription
namestring (nullable)Name of the product.
monthly_pricePriceMonthly price of the product.
price_linesPriceLine[]List of price lines for the product.

PriceLine

Represents a price line associated with a product.

FieldTypeDescription
descriptionstring (nullable)Description of the price line.
unit_pricePriceUnit price of the price line.
quantitydecimal (nullable)Quantity of the unit.
intervalinteger (nullable)Interval of the price line.
pricePriceTotal price of the price line.

ContractPayload

Payload data for a contract, including yearly estimates and period dates.

FieldTypeDescription
yearly_estimate_electricityinteger (nullable)Yearly estimate for electricity usage.
yearly_estimate_productioninteger (nullable)Yearly estimate for electricity production.
yearly_estimate_gasinteger (nullable)Yearly estimate for gas usage.
electricity_distributioninteger (nullable)Electricity distribution value.
start_datedatetime (nullable)Start date of the contract.
end_datedatetime (nullable)End date of the contract.
stopped_datedatetime (nullable)Stopped date of the contract.
current_period_start_datedatetime (nullable)Start date of the current period.

ContractLabels

Represents a label associated with a contract.

FieldTypeDescription
namestringName of the label.
valuestringValue of the label.

Enums

EnergyContractType

Type of energy contract:

  • Fixed
  • Variable
  • Dynamic

ContractDuration

Duration of the contract:

  • Month
  • HalfYear
  • Year
  • TwoYears
  • ThreeYears
  • FiveYears

ContractPhase

Phase of the contract (selected values):

  • UserInput
  • UserAgreement
  • MeteringPointsChecked
  • RetrievedVerification
  • DateChecked
  • SmartMeterChecked
  • UsageChecked
  • SmartMeterFound
  • FirstInvoiceSend
  • FirstPaymentDone
  • DeliveryPlanned
  • DeliveryStarted
  • DeliveryFailed
  • DeliveryStopped
  • NeverDelivered
  • MeterUnderConstruction
  • DemoContractCreated
  • InsightContractActive
  • InsightNeverActive
  • InsightContractStopped
  • SmartChargingContractCreated
  • SmartChargingCarAttached
  • SmartChargingActive
  • SmartChargingStopped

TransferType

Type of transfer:

  • Switch
  • Rehousing

Example Contract JSON

{  
"id": "f47ac10b-58cc-4372-a567-0e02b2c3d479",
"collective_id": null,
"energy_contract_type": "Fixed",
"is_company": false,
"contract_duration": "Year",
"contract_variables": {
"yearly_estimate_electricity": 3500,
"yearly_estimate_production": 0,
"yearly_estimate_gas": 1200,
"electricity_distribution": 1,
"start_date": "2024-01-01T00:00:00Z",
"end_date": "2025-01-01T00:00:00Z",
"stopped_date": null,
"current_period_start_date": "2024-01-01T00:00:00Z"
},
"has_tax_credit_right": true,
"contract_phase": "UserAgreement",
"transfer_type": "Switch",
"user_id": "c9bf9e57-1685-4c89-bafb-ff5af830be8a",
"number": 12345,
"monthly_deposit": {
"total_excl": "100.00",
"total_incl": "121.00",
"vat": "21.00",
"products": [
{
"name": "Electricity",
"monthly_price": "80.00",
"price_lines": [
{
"description": "Base fee",
"unit_price": "40.00",
"quantity": "2",
"interval": 1,
"price": "80.00"
}
]
}
]
},
"contract_labels": [
{ "name": "Green", "value": "Yes" }
],
"accepted_at": "2024-01-02T12:00:00Z",
"created_at": "2024-01-01T09:00:00Z",
"updated_at": "2024-01-02T12:00:00Z",
"deleted_at": null
}

See Also

  • Price (referenced in Product and PriceLine)
  • API endpoints that use the Contract model