Skip to main content
POST
/
v1
/
calculation-jobs
/
suggested-renovation-trajectory-calculation
/
batch
cURL
curl --request POST \
  --url https://public-api.setle.app/v1/calculation-jobs/suggested-renovation-trajectory-calculation/batch \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '[
  "<string>"
]'
import requests

url = "https://public-api.setle.app/v1/calculation-jobs/suggested-renovation-trajectory-calculation/batch"

payload = ["<string>"]
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.text)
const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify(['<string>'])
};

fetch('https://public-api.setle.app/v1/calculation-jobs/suggested-renovation-trajectory-calculation/batch', 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://public-api.setle.app/v1/calculation-jobs/suggested-renovation-trajectory-calculation/batch",
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([
'<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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://public-api.setle.app/v1/calculation-jobs/suggested-renovation-trajectory-calculation/batch"

payload := strings.NewReader("[\n \"<string>\"\n]")

req, _ := http.NewRequest("POST", url, payload)

req.Header.Add("Authorization", "Bearer <token>")
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://public-api.setle.app/v1/calculation-jobs/suggested-renovation-trajectory-calculation/batch")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("[\n \"<string>\"\n]")
.asString();
require 'uri'
require 'net/http'

url = URI("https://public-api.setle.app/v1/calculation-jobs/suggested-renovation-trajectory-calculation/batch")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "[\n \"<string>\"\n]"

response = http.request(request)
puts response.read_body
{
  "id": "<string>",
  "created_at": "2023-11-07T05:31:56Z",
  "updated_at": "2023-11-07T05:31:56Z",
  "external_id": "<string>",
  "deactivated_at": "2023-11-07T05:31:56Z",
  "metadata": {},
  "estate_id": "<string>",
  "name": "<string>",
  "description": "<string>",
  "expires_at": "2023-11-07T05:31:56Z",
  "published_at": "2023-11-07T05:31:56Z"
}
{
"statusCode": 401,
"error": "Unauthorized"
}
{
"statusCode": 403,
"error": "Forbidden"
}
{
"statusCode": 406,
"message": [
"Name should not be empty.",
"Password must contain at least 1 uppercase character."
],
"error": "Not Acceptable"
}
{
"statusCode": 500,
"error": "Internal Server Error"
}
See the single-item endpoint documentation for more information about this API and its intended usage.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json

Body with required input data.

Response

Successfully processed request.

id
string
required
created_at
string<date-time>
required
updated_at
string<date-time>
required
external_id
string
required
deactivated_at
string<date-time>
required
calculation_job_type
enum<string>
required
Available options:
EPC_DOCUMENT_PROCESSING,
ENERGY_EFFICIENCY_INDICATION,
SUGGESTED_RENOVATION_TRAJECTORY_CALCULATION
calculation_job_status
enum<string>
required
Available options:
NOT_STARTED,
RUNNING,
FINISHED,
FAILED,
STOPPED
metadata
object
required
estate_id
string
required
name
string
required
description
string
required
expires_at
string<date-time>
required
published_at
string<date-time>
required