Contracts|Electricity

Create a new electricity contract

Creates a new electricity contract with the provided details

:::tip Recommended guide If you are unsure which parameters to include when creating an electricity contract, refer to the complete documentation. :::

post/users/{userId}/electricity-contracts

Request

  • Base URL
    https://connect.clever.gy
  • Auth
    API key in header clevergy-api-key

Path parameters

userIdstring required

ID of user

Request body

startDatestring date required

Start date of the electricity contract

endDatestring date

End date of the electricity contract

status'ACTIVE' | 'INACTIVE' required

Status of the electricity contract

addressstring required

Address associated with the electricity contract

postalCodestring

Postal code associated with the electricity contract

cupsstring required

Universal Point of Supply Code (CUPS)

importTariffType'FIXED' | 'PVPC' | 'INDEXED' | 'PERIOD' | 'CUSTOM' required

Import tariff type

surplusTariffType'FIXED' | 'PVPC' | 'INDEXED' | 'PERIOD' | 'CUSTOM'

Surplus tariff type

tariffAccess'2.0TD' | '3.0TD' | '6.1TD' required

Tariff access code

tariffNamestring required

Name of the tariff applied to the contract

ibanstring

IBAN for billing purposes

distributorNamestring

Name of the electricity distributor company

holderNamestring

Name of the contract holder

commercialNamestring

Name of the commercial electricity company

contractPowernumber[] required

Contracted power for each period (kW). The array should contain up to 6 periods.

powerPricesnumber[]

Power prices for each period (€/kW). The array should contain up to 6 periods.

energyPricesnumber[]

Energy prices for each period (€/kWh). The array should contain up to 6 periods.

surplusPricesnumber[]

Surplus prices for each period (€/kWh). The array should contain up to 6 periods.

contractNumberstring

Contract number

Example request

{
  "startDate": "2023-02-01",
  "endDate": "2024-02-01",
  "status": "ACTIVE",
  "address": "123 Main St, Springfield",
  "postalCode": "12345",
  "cups": "ES1234567890123456AB",
  "importTariffType": "FIXED",
  "surplusTariffType": "FIXED",
  "tariffAccess": "2.0TD",
  "tariffName": "Standard Electricity Tariff",
  "iban": "ES7620770024003102575766",
  "distributorName": "Electricity Distributor S.A.",
  "holderName": "John Doe",
  "commercialName": "Electricity Commercial S.L.",
  "contractPower": [
    3.45,
    3.45
  ],
  "powerPrices": [
    0.1,
    0.05
  ],
  "energyPrices": [
    0.15
  ],
  "surplusPrices": [
    0.05
  ],
  "contractNumber": "EC-12345"
}

Response

Electricity contract created successfully

idstring required

Unique identifier of the electricity contract

startDatestring date required

Start date of the electricity contract

endDatestring date

End date of the electricity contract

status'ACTIVE' | 'INACTIVE' required

Status of the electricity contract

addressstring required

Address associated with the electricity contract

postalCodestring

Postal code associated with the electricity contract

connectionIdstring

UUID of the electricity connection

connectionContractIdstring

ID of the connection contract

cupsstring required

Universal Point of Supply Code (CUPS)

importTariffType'FIXED' | 'PVPC' | 'INDEXED' | 'PERIOD' | 'CUSTOM' required

Import tariff access code

surplusTariffType'FIXED' | 'PVPC' | 'INDEXED' | 'PERIOD' | 'CUSTOM'

Surplus tariff access code

tariffAccess'2.0TD' | '3.0TD' | '6.1TD' required

Tariff access code

tariffNamestring required

Name of the tariff applied to the contract

ibanstring

IBAN for billing purposes

distributorNamestring

Name of the electricity distributor company

holderNamestring

Name of the contract holder

commercialNamestring

Name of the commercial electricity company

contractPowernumber[] required

Contracted power for each period (kW). The array should contain up to 6 periods.

powerPricesnumber[]

Power prices for each period (€/kW). The array should contain up to 6 periods.

energyPricesnumber[]

Energy prices for each period (€/kWh). The array should contain up to 6 periods.

surplusPricesnumber[]

Surplus prices for each period (€/kWh). The array should contain up to 6 periods.

fileUrlstring required

URL to access the electricity contract file. Also used to upload a new contract file as response in POST and PUT methods.

contractNumberstring

Contract number

Example response

{
  "id": "contract-123",
  "startDate": "2023-02-01",
  "endDate": "2024-02-01",
  "status": "ACTIVE",
  "address": "123 Main St, Springfield",
  "postalCode": "12345",
  "connectionId": "conn-456",
  "connectionContractId": "contract-789",
  "cups": "ES1234567890123456AB",
  "importTariffType": "2.0TD",
  "surplusTariffType": "FIXED",
  "tariffAccess": "2.0TD",
  "tariffName": "Standard Electricity Tariff",
  "iban": "ES7620770024003102575766",
  "distributorName": "Electricity Distributor S.A.",
  "holderName": "John Doe",
  "commercialName": "Electricity Commercial S.L.",
  "contractPower": [
    3.45,
    3.45
  ],
  "powerPrices": [
    0.1,
    0.05
  ],
  "energyPrices": [
    0.15,
    0.1,
    0.05
  ],
  "surplusPrices": [
    0.05
  ],
  "fileUrl": "https://example.com/contracts/electricity/contract-123.pdf",
  "contractNumber": "EC-12345"
}

Changes

No recorded changes to this operation across all 1 revision of this API.