Submit portfolio forecast
curl --request POST \
--url https://api.engrate.io/portfolio-forecasts/v1alpha1/submissions \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"delivery_day": "2023-12-25",
"series": [
{
"values": [
123
],
"malo": "<string>"
}
],
"unit": "MW",
"malo_mapping": {}
}
'import requests
url = "https://api.engrate.io/portfolio-forecasts/v1alpha1/submissions"
payload = {
"delivery_day": "2023-12-25",
"series": [
{
"values": [123],
"malo": "<string>"
}
],
"unit": "MW",
"malo_mapping": {}
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
delivery_day: '2023-12-25',
series: [{values: [123], malo: '<string>'}],
unit: 'MW',
malo_mapping: {}
})
};
fetch('https://api.engrate.io/portfolio-forecasts/v1alpha1/submissions', 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/portfolio-forecasts/v1alpha1/submissions",
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([
'delivery_day' => '2023-12-25',
'series' => [
[
'values' => [
123
],
'malo' => '<string>'
]
],
'unit' => 'MW',
'malo_mapping' => [
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"Content-Type: application/json"
],
]);
$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.engrate.io/portfolio-forecasts/v1alpha1/submissions"
payload := strings.NewReader("{\n \"delivery_day\": \"2023-12-25\",\n \"series\": [\n {\n \"values\": [\n 123\n ],\n \"malo\": \"<string>\"\n }\n ],\n \"unit\": \"MW\",\n \"malo_mapping\": {}\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<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.engrate.io/portfolio-forecasts/v1alpha1/submissions")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"delivery_day\": \"2023-12-25\",\n \"series\": [\n {\n \"values\": [\n 123\n ],\n \"malo\": \"<string>\"\n }\n ],\n \"unit\": \"MW\",\n \"malo_mapping\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.engrate.io/portfolio-forecasts/v1alpha1/submissions")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"delivery_day\": \"2023-12-25\",\n \"series\": [\n {\n \"values\": [\n 123\n ],\n \"malo\": \"<string>\"\n }\n ],\n \"unit\": \"MW\",\n \"malo_mapping\": {}\n}"
response = http.request(request)
puts response.read_body{
"delivery_day": "2023-12-25",
"interval_count": 123,
"series_received": 123,
"total_production_mwh": 123,
"total_consumption_mwh": 123,
"input_hash": "<string>",
"status": "received"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}{
"detail": "<unknown>"
}{
"detail": "<unknown>"
}Portfolio Forecasts
Submit portfolio forecast
Submit a portfolio forecast for one delivery day. Re-submitting for the same delivery day replaces the previous submission.
POST
/
portfolio-forecasts
/
v1alpha1
/
submissions
Submit portfolio forecast
curl --request POST \
--url https://api.engrate.io/portfolio-forecasts/v1alpha1/submissions \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"delivery_day": "2023-12-25",
"series": [
{
"values": [
123
],
"malo": "<string>"
}
],
"unit": "MW",
"malo_mapping": {}
}
'import requests
url = "https://api.engrate.io/portfolio-forecasts/v1alpha1/submissions"
payload = {
"delivery_day": "2023-12-25",
"series": [
{
"values": [123],
"malo": "<string>"
}
],
"unit": "MW",
"malo_mapping": {}
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
delivery_day: '2023-12-25',
series: [{values: [123], malo: '<string>'}],
unit: 'MW',
malo_mapping: {}
})
};
fetch('https://api.engrate.io/portfolio-forecasts/v1alpha1/submissions', 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/portfolio-forecasts/v1alpha1/submissions",
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([
'delivery_day' => '2023-12-25',
'series' => [
[
'values' => [
123
],
'malo' => '<string>'
]
],
'unit' => 'MW',
'malo_mapping' => [
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"Content-Type: application/json"
],
]);
$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.engrate.io/portfolio-forecasts/v1alpha1/submissions"
payload := strings.NewReader("{\n \"delivery_day\": \"2023-12-25\",\n \"series\": [\n {\n \"values\": [\n 123\n ],\n \"malo\": \"<string>\"\n }\n ],\n \"unit\": \"MW\",\n \"malo_mapping\": {}\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<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.engrate.io/portfolio-forecasts/v1alpha1/submissions")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"delivery_day\": \"2023-12-25\",\n \"series\": [\n {\n \"values\": [\n 123\n ],\n \"malo\": \"<string>\"\n }\n ],\n \"unit\": \"MW\",\n \"malo_mapping\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.engrate.io/portfolio-forecasts/v1alpha1/submissions")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"delivery_day\": \"2023-12-25\",\n \"series\": [\n {\n \"values\": [\n 123\n ],\n \"malo\": \"<string>\"\n }\n ],\n \"unit\": \"MW\",\n \"malo_mapping\": {}\n}"
response = http.request(request)
puts response.read_body{
"delivery_day": "2023-12-25",
"interval_count": 123,
"series_received": 123,
"total_production_mwh": 123,
"total_consumption_mwh": 123,
"input_hash": "<string>",
"status": "received"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}{
"detail": "<unknown>"
}{
"detail": "<unknown>"
}Authorizations
Body
application/json
Portfolio production and consumption forecasts for one delivery day.
Response
Forecast accepted
Acknowledgment of an accepted forecast submission.
Total production energy received for the delivery day, in MWh.
Total consumption energy received for the delivery day, in MWh.
Content hash for change detection.
Allowed value:
"received"Was this page helpful?
⌘I