curl --request GET \
--url https://api.otark.energy/v1/contracts/{contract_id} \
--header 'X-Api-Key: <api-key>'import requests
url = "https://api.otark.energy/v1/contracts/{contract_id}"
headers = {"X-Api-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-Api-Key': '<api-key>'}};
fetch('https://api.otark.energy/v1/contracts/{contract_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.otark.energy/v1/contracts/{contract_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-Api-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.otark.energy/v1/contracts/{contract_id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-Api-Key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.otark.energy/v1/contracts/{contract_id}")
.header("X-Api-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.otark.energy/v1/contracts/{contract_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-Api-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"id": "con_a1b2c3d4",
"external_id": "PPA-2025-0042",
"type": "ppa",
"status": "in_progress",
"delivery_start": "2026-01-01T00:00:00Z",
"delivery_end": "2026-03-31T23:45:00Z",
"seller": {
"name": "GreenCo Energy BV",
"eic": "11YGREENENERGY-Z",
"tso": "DE_TENNET"
},
"buyer": {
"name": "GreenCo Energy BV",
"eic": "11YGREENENERGY-Z",
"tso": "DE_TENNET"
},
"created_at": "2024-11-20T10:00:00Z",
"ppa_type": "indexed",
"period": "Q1-2026",
"delivery_profile": "ENWEX Solar 2026",
"asset": {
"id": "ast_w1x2y3z4",
"name": "Zonnepark De Wilgen",
"nominal_power": 25,
"technology": "solar",
"tso": "DE_TENNET"
}
}{
"type": "https://brp.otark.team/errors/invalid_api_key",
"title": "Invalid API Key",
"status": 401
}{
"type": "https://brp.otark.team/errors/insufficient_scopes",
"title": "Insufficient API Key Scopes",
"status": 403,
"detail": "Missing scope: customers:write. Please create a new API key with the required scopes."
}{
"type": "https://brp.otark.team/errors/customer_not_found",
"title": "Customer Not Found",
"status": 404,
"instance": "/v1/customers/cust_r8s9t0u1"
}Get contract
Retrieve a single contract by ID.
Required scope: contracts:read
curl --request GET \
--url https://api.otark.energy/v1/contracts/{contract_id} \
--header 'X-Api-Key: <api-key>'import requests
url = "https://api.otark.energy/v1/contracts/{contract_id}"
headers = {"X-Api-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-Api-Key': '<api-key>'}};
fetch('https://api.otark.energy/v1/contracts/{contract_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.otark.energy/v1/contracts/{contract_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-Api-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.otark.energy/v1/contracts/{contract_id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-Api-Key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.otark.energy/v1/contracts/{contract_id}")
.header("X-Api-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.otark.energy/v1/contracts/{contract_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-Api-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"id": "con_a1b2c3d4",
"external_id": "PPA-2025-0042",
"type": "ppa",
"status": "in_progress",
"delivery_start": "2026-01-01T00:00:00Z",
"delivery_end": "2026-03-31T23:45:00Z",
"seller": {
"name": "GreenCo Energy BV",
"eic": "11YGREENENERGY-Z",
"tso": "DE_TENNET"
},
"buyer": {
"name": "GreenCo Energy BV",
"eic": "11YGREENENERGY-Z",
"tso": "DE_TENNET"
},
"created_at": "2024-11-20T10:00:00Z",
"ppa_type": "indexed",
"period": "Q1-2026",
"delivery_profile": "ENWEX Solar 2026",
"asset": {
"id": "ast_w1x2y3z4",
"name": "Zonnepark De Wilgen",
"nominal_power": 25,
"technology": "solar",
"tso": "DE_TENNET"
}
}{
"type": "https://brp.otark.team/errors/invalid_api_key",
"title": "Invalid API Key",
"status": 401
}{
"type": "https://brp.otark.team/errors/insufficient_scopes",
"title": "Insufficient API Key Scopes",
"status": 403,
"detail": "Missing scope: customers:write. Please create a new API key with the required scopes."
}{
"type": "https://brp.otark.team/errors/customer_not_found",
"title": "Customer Not Found",
"status": 404,
"instance": "/v1/customers/cust_r8s9t0u1"
}Autorisierungen
Pfadparameter
Contract identifier
"con_a1b2c3d4"
Antwort
Contract details
An energy contract. Contracts are polymorphic — the schema varies by type.
Internal unique contract identifier
"con_a1b2c3d4"
External reference identifier
"PPA-2025-0042"
Contract type
ppa, day_ahead, intraday "ppa"
Contract status
pending, in_progress, completed "in_progress"
ISO 8601 delivery start (UTC)
"2026-01-01T00:00:00Z"
ISO 8601 delivery end (UTC)
"2026-03-31T23:45:00Z"
A counterparty identified by EIC code
Show child attributes
Show child attributes
A counterparty identified by EIC code
Show child attributes
Show child attributes
ISO 8601 creation timestamp
"2024-11-20T10:00:00Z"
PPA pricing/delivery type (only present when type is ppa)
forecasted, produced, consumed, baseload, shaped, peakload, indexed "indexed"
Contract period display name (only present when type is ppa)
"Q1-2026"
Delivery profile name (only present when type is ppa)
"ENWEX Solar 2026"
The generating asset (only present when type is ppa and an asset is assigned)
Show child attributes
Show child attributes
War diese Seite hilfreich?