Skip to main content
PUT
/
api
/
partners
/
v2.0
/
org
/
{org_id}
/
users
/
{user_id}
/
energy-contracts
/
{energy_contract_id}
Update details of a user's energy contract
curl --request PUT \
  --url https://api.example.com/api/partners/v2.0/org/{org_id}/users/{user_id}/energy-contracts/{energy_contract_id} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "energy_contract_type": "spot_hourly",
  "energy_prices": [],
  "building_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "meter_id": "<string>",
  "supplier": "<string>",
  "currency_energy_price": "<string>",
  "energy_price_includes_external_components": true
}
'
{
  "energy_contract_type": "spot_hourly",
  "energy_prices": [],
  "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "building": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "meter_id": "<string>",
  "supplier": "<string>",
  "currency_energy_price": "<string>",
  "energy_price_includes_external_components": true
}

Authorizations

Authorization
string
header
required

The access token received from the authorization server in the OAuth 2.0 flow.

Path Parameters

org_id
string<uuid>
required

The organization ID of the user's organization

user_id
string<uuid>
required

The user ID of the user whom the energy contract belongs to

energy_contract_id
string<uuid>
required

The ID of the modified energy contract

Body

application/json
energy_contract_type
enum<string> | null
Available options:
spot_hourly,
monthly,
yearly
energy_prices
Price · object[]
building_id
string<uuid> | null
meter_id
string | null
Maximum string length: 19
supplier
string | null
Maximum string length: 100
currency_energy_price
string | null
energy_price_includes_external_components
boolean | null

Response

200 - application/json

OK

energy_contract_type
enum<string> | null
Available options:
spot_hourly,
monthly,
yearly
energy_prices
Price · object[]
id
string<uuid> | null
building
string<uuid> | null
meter_id
string | null
Maximum string length: 19
supplier
string | null
Maximum string length: 100
currency_energy_price
string | null
energy_price_includes_external_components
boolean | null