Skip to main content

Contracts

The platform allows managing energy contracts associated with a client through the Connect API. These contracts are visible to the client under their house contracts.

There are two types of contracts supported:

  • Electricity contracts
  • Gas contracts

Contract status​

A contract can be either:

  • Active: the contract is currently in force. Data source connectors linked to it keep syncing new energy data. Distributor (FTP) energy for the CUPS is shown from the start date of the user's first electricity contract on that CUPS.
  • Inactive: the contract is no longer in force. Invoices remain available. What happens to its data source connectors depends on why it was deactivated:
    • Cancellation or change of holder: its data source connectors are automatically unlinked. Distributor (FTP) energy for the CUPS is no longer shown, and connections set up personally by the client (such as Datadis) are deleted together with their data.
    • Renewal (a new contract for the same user): the connectors stay with the new contract and the earlier distributor data is kept.
note

startDate sets from when distributor data is shown to the client, so send the real start date of the contract. Changing it later recalculates the client's energy history. endDate does not limit the data shown; only the contract status does.

info

The same CUPS can be linked to more than one user, but only one of them can have an active contract associated at the same time. When a new contract is created for a CUPS that already has an active one, the new contract becomes active and the previous one is automatically deactivated.

Provided information to calculate costs in euros​

For electricity contracts, the pricing information provided is used by the platform to calculate the energy costs in euros (€) displayed to the client in the application based on their consumption data. See Costs in euros for how the calculation works and which microfrontends show it.

info

Costs calculation (€) is only available for electricity contracts with tariff access 2.0TD.

Electricity contracts​

The information displayed in the app and used for price calculations comes directly from the contract endpoint.

For power prices, you can provide a list with either 2 or 6 values, depending on the tariffAccess (2.0TD or 3.0TD / 6.1TD).

The tariff type is also critical because it determines how prices should be filled. for both energyPrices and surplusPrices.

TypeDescriptionHow to Fill
FIXEDPrices are constant 24h everydayList with one value: [0.12]
PERIODPrices differ by consumption periodList with three/six values: [0.18,0.12,0.09]
PVPCPrices are automatically calculated based on the market PVPCNo need to fill (retrieved automatically)
INDEXEDPrices depend on utility parameters and OMIENo need to fill (retrieved automatically)
CUSTOMPrices must be added separately to the contractNo need to fill (see below)

Adding custom energy prices to a contract​

If your contract has custom pricing (e.g., hourly prices or any structure other than fixed or period), you can attach a pricing table via a secondary request using the contractId returned after contract creation. Each entry should include:

  • date: start of the pricing interval (format: YYYY-MM-DDTHH:mm:ss)
  • price: energy price for that interval, in euros per kWh (decimal format)
  • surplusPrice: surplus price for that interval, in euros per kWh (decimal format)

Gas contracts​

The information displayed in the app comes directly from the contract endpoint.

How to upload the contract PDF for the client​

After creating a contract, the response will include a fileUrl. This is a signed URL to upload the contract file.

warning

The upload link is temporary, so make sure to upload the PDF file immediately after receiving it. Only PDF files are allowed.

Once the file is uploaded, the client can download the PDF directly from the app.

Endpoints needed​

createElectricityContract

addContractEnergyPrices

createGasContract