curl --request GET \
--url https://api.engrate.io/market-access/v1alpha1/timeseries/series/allocations \
--header 'Authorization: <api-key>'import requests
url = "https://api.engrate.io/market-access/v1alpha1/timeseries/series/allocations"
headers = {"Authorization": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: '<api-key>'}};
fetch('https://api.engrate.io/market-access/v1alpha1/timeseries/series/allocations', 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.engrate.io/market-access/v1alpha1/timeseries/series/allocations",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: <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.engrate.io/market-access/v1alpha1/timeseries/series/allocations"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "<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.engrate.io/market-access/v1alpha1/timeseries/series/allocations")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.engrate.io/market-access/v1alpha1/timeseries/series/allocations")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"items": [
{
"accounting_point_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"flow_direction": "consumption",
"market_identifier": "871687123456789011"
}
],
"limit": 123,
"offset": 123,
"total": 123
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"ctx": {},
"input": "<unknown>"
}
]
}List Allocation Series
Show the allocation series that agree with the filters.
Each series holds the allocations of one flow direction at one accounting point. Use its accounting_point_id to read its values in List Allocations. Use the market_identifier filter to find the accounting point that the market identifies by an EAN code or another identifier.
The list shows the series in the sequence of accounting_point_id, then flow_direction. To read the full list, use offset and limit to get one page at a time. total is the number of series that agree with the filters, on all pages.
The API gives the status code 422 in these conditions:
-
An
accounting_point_idfilter is not a UUID. -
A
flow_directionfilter has an unknown value. -
An
accounting_point_idormarket_identifierfilter has more values than its maximum. -
offsetis less than 0 or more than its maximum, orlimitis less than 1 or more than its maximum.
curl --request GET \
--url https://api.engrate.io/market-access/v1alpha1/timeseries/series/allocations \
--header 'Authorization: <api-key>'import requests
url = "https://api.engrate.io/market-access/v1alpha1/timeseries/series/allocations"
headers = {"Authorization": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: '<api-key>'}};
fetch('https://api.engrate.io/market-access/v1alpha1/timeseries/series/allocations', 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.engrate.io/market-access/v1alpha1/timeseries/series/allocations",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: <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.engrate.io/market-access/v1alpha1/timeseries/series/allocations"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "<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.engrate.io/market-access/v1alpha1/timeseries/series/allocations")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.engrate.io/market-access/v1alpha1/timeseries/series/allocations")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"items": [
{
"accounting_point_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"flow_direction": "consumption",
"market_identifier": "871687123456789011"
}
],
"limit": 123,
"offset": 123,
"total": 123
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"ctx": {},
"input": "<unknown>"
}
]
}Authorizations
Query Parameters
Accounting points to read. Omit to read every point.
500Market identifiers of the accounting points to read, for example EAN codes. A series matches when its identifier has one of the values, whatever its kind. Omit to read every identifier.
500Flow directions to read. Omit to read both.
consumption, production The position of the first series of the page in the list. The first series in the list has the position 0.
0 <= x <= 9223372036854776000The maximum number of series on the page.
1 <= x <= 1000Was this page helpful?