Bulk get transactions (POST)
curl --request POST \
--url https://api.otark.energy/v1/transactions/bulk \
--header 'Content-Type: application/json' \
--header 'X-Api-Key: <api-key>' \
--data '
{
"ids": [
"txn_k8m2p4q7r1",
"txn_j5n3w8v2x6",
"txn_h2b7f9d4g3"
],
"include_assets": false
}
'import requests
url = "https://api.otark.energy/v1/transactions/bulk"
payload = {
"ids": ["txn_k8m2p4q7r1", "txn_j5n3w8v2x6", "txn_h2b7f9d4g3"],
"include_assets": False
}
headers = {
"X-Api-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-Api-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
ids: ['txn_k8m2p4q7r1', 'txn_j5n3w8v2x6', 'txn_h2b7f9d4g3'],
include_assets: false
})
};
fetch('https://api.otark.energy/v1/transactions/bulk', 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/transactions/bulk",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'ids' => [
'txn_k8m2p4q7r1',
'txn_j5n3w8v2x6',
'txn_h2b7f9d4g3'
],
'include_assets' => false
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"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"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.otark.energy/v1/transactions/bulk"
payload := strings.NewReader("{\n \"ids\": [\n \"txn_k8m2p4q7r1\",\n \"txn_j5n3w8v2x6\",\n \"txn_h2b7f9d4g3\"\n ],\n \"include_assets\": false\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-Api-Key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.otark.energy/v1/transactions/bulk")
.header("X-Api-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"ids\": [\n \"txn_k8m2p4q7r1\",\n \"txn_j5n3w8v2x6\",\n \"txn_h2b7f9d4g3\"\n ],\n \"include_assets\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.otark.energy/v1/transactions/bulk")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-Api-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"ids\": [\n \"txn_k8m2p4q7r1\",\n \"txn_j5n3w8v2x6\",\n \"txn_h2b7f9d4g3\"\n ],\n \"include_assets\": false\n}"
response = http.request(request)
puts response.read_body{
"transactions": [
{
"id": "txn_k8m2p4q7r1",
"type": "ppa",
"contract_id": "con_a1b2c3d4",
"status": "valid",
"version": 2,
"sender": {
"eic": "11YWINDPARKNO--A",
"asset_id": "ast_w1x2y3z4",
"tso": "DE_TENNET"
},
"receiver": {
"eic": "11YGREENENERGY-Z",
"tso": "DE_TENNET"
},
"delivery_start": "2026-01-15T14:00:00Z",
"delivery_end": "2026-01-15T14:15:00Z",
"slot_number": 57,
"volume": 12.5,
"created_at": "2026-01-14T18:00:00Z",
"previous_transaction_id": "txn_j5n3w8v2x6"
}
],
"assets": [
{
"id": "ast_w1x2y3z4",
"name": "Zonnepark De Wilgen",
"nominal_power": 25,
"technology": "solar",
"tso": "DE_TENNET"
}
]
}{
"type": "https://brp.otark.team/errors/validation",
"title": "Validation Failed",
"status": 400,
"instance": "/v1/customers/cust_r8s9t0u1",
"errors": [
{
"field": "balance_group.tso",
"code": "invalid_enum_value",
"message": "Invalid enum value. Expected 'DE_AMPRION' | 'DE_TENNET' | 'DE_TRANSNET_BW' | 'DE_50HERTZ', received 'INVALID'"
}
]
}{
"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."
}Transactions
Bulk get transactions (POST)
Retrieve multiple transactions by ID using a request body. Use this for large ID sets that exceed the GET query parameter limit. Non-existent or inaccessible IDs are silently omitted.
Required scope: transactions:read
POST
/
v1
/
transactions
/
bulk
Bulk get transactions (POST)
curl --request POST \
--url https://api.otark.energy/v1/transactions/bulk \
--header 'Content-Type: application/json' \
--header 'X-Api-Key: <api-key>' \
--data '
{
"ids": [
"txn_k8m2p4q7r1",
"txn_j5n3w8v2x6",
"txn_h2b7f9d4g3"
],
"include_assets": false
}
'import requests
url = "https://api.otark.energy/v1/transactions/bulk"
payload = {
"ids": ["txn_k8m2p4q7r1", "txn_j5n3w8v2x6", "txn_h2b7f9d4g3"],
"include_assets": False
}
headers = {
"X-Api-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-Api-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
ids: ['txn_k8m2p4q7r1', 'txn_j5n3w8v2x6', 'txn_h2b7f9d4g3'],
include_assets: false
})
};
fetch('https://api.otark.energy/v1/transactions/bulk', 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/transactions/bulk",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'ids' => [
'txn_k8m2p4q7r1',
'txn_j5n3w8v2x6',
'txn_h2b7f9d4g3'
],
'include_assets' => false
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"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"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.otark.energy/v1/transactions/bulk"
payload := strings.NewReader("{\n \"ids\": [\n \"txn_k8m2p4q7r1\",\n \"txn_j5n3w8v2x6\",\n \"txn_h2b7f9d4g3\"\n ],\n \"include_assets\": false\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-Api-Key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.otark.energy/v1/transactions/bulk")
.header("X-Api-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"ids\": [\n \"txn_k8m2p4q7r1\",\n \"txn_j5n3w8v2x6\",\n \"txn_h2b7f9d4g3\"\n ],\n \"include_assets\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.otark.energy/v1/transactions/bulk")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-Api-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"ids\": [\n \"txn_k8m2p4q7r1\",\n \"txn_j5n3w8v2x6\",\n \"txn_h2b7f9d4g3\"\n ],\n \"include_assets\": false\n}"
response = http.request(request)
puts response.read_body{
"transactions": [
{
"id": "txn_k8m2p4q7r1",
"type": "ppa",
"contract_id": "con_a1b2c3d4",
"status": "valid",
"version": 2,
"sender": {
"eic": "11YWINDPARKNO--A",
"asset_id": "ast_w1x2y3z4",
"tso": "DE_TENNET"
},
"receiver": {
"eic": "11YGREENENERGY-Z",
"tso": "DE_TENNET"
},
"delivery_start": "2026-01-15T14:00:00Z",
"delivery_end": "2026-01-15T14:15:00Z",
"slot_number": 57,
"volume": 12.5,
"created_at": "2026-01-14T18:00:00Z",
"previous_transaction_id": "txn_j5n3w8v2x6"
}
],
"assets": [
{
"id": "ast_w1x2y3z4",
"name": "Zonnepark De Wilgen",
"nominal_power": 25,
"technology": "solar",
"tso": "DE_TENNET"
}
]
}{
"type": "https://brp.otark.team/errors/validation",
"title": "Validation Failed",
"status": 400,
"instance": "/v1/customers/cust_r8s9t0u1",
"errors": [
{
"field": "balance_group.tso",
"code": "invalid_enum_value",
"message": "Invalid enum value. Expected 'DE_AMPRION' | 'DE_TENNET' | 'DE_TRANSNET_BW' | 'DE_50HERTZ', received 'INVALID'"
}
]
}{
"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."
}Autorisierungen
Body
application/json
War diese Seite hilfreich?
⌘I