Create Construction
curl --request POST \
--url https://api.realtimelca.com/epd/api/Material/construction \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data @- <<EOF
{
"name": "Thomas' Construction",
"description": "Dette er en beskivelse af Thomas' helt utrolige og fantastiske konstruktion der ikke er set magen til før - wauw siger jeg bare.",
"isPublic": false,
"isCustom": false,
"tags": [
"Beton",
"Mineraluld"
],
"declaredUnit": {
"declaredUnit": 4,
"declaredValue": 1,
"mass": null,
"massUnit": 1
},
"expectedLifespan": null,
"constructionEpds": [
{
"epdId": "9ab63b3a-1ef2-40fa-a3cb-2769980ed9b3",
"expectedLifespan": 100,
"constructionUnit": {
"unit": 4,
"amount": 1,
"percentage": 50,
"length": 1,
"height": 1,
"width": 1,
"shownUnit": 4
}
},
{
"epdId": "4acbc0ad-7ca3-4b11-b488-a61ed915ec1d",
"expectedLifespan": 120,
"constructionUnit": {
"unit": 4,
"amount": 1,
"percentage": 50,
"length": 1,
"height": 1,
"width": 1,
"shownUnit": 4
}
}
]
}
EOFimport requests
url = "https://api.realtimelca.com/epd/api/Material/construction"
payload = {
"name": "Thomas' Construction",
"description": "Dette er en beskivelse af Thomas' helt utrolige og fantastiske konstruktion der ikke er set magen til før - wauw siger jeg bare.",
"isPublic": False,
"isCustom": False,
"tags": ["Beton", "Mineraluld"],
"declaredUnit": {
"declaredUnit": 4,
"declaredValue": 1,
"mass": None,
"massUnit": 1
},
"expectedLifespan": None,
"constructionEpds": [
{
"epdId": "9ab63b3a-1ef2-40fa-a3cb-2769980ed9b3",
"expectedLifespan": 100,
"constructionUnit": {
"unit": 4,
"amount": 1,
"percentage": 50,
"length": 1,
"height": 1,
"width": 1,
"shownUnit": 4
}
},
{
"epdId": "4acbc0ad-7ca3-4b11-b488-a61ed915ec1d",
"expectedLifespan": 120,
"constructionUnit": {
"unit": 4,
"amount": 1,
"percentage": 50,
"length": 1,
"height": 1,
"width": 1,
"shownUnit": 4
}
}
]
}
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({
name: 'Thomas\' Construction',
description: 'Dette er en beskivelse af Thomas\' helt utrolige og fantastiske konstruktion der ikke er set magen til før - wauw siger jeg bare.',
isPublic: false,
isCustom: false,
tags: ['Beton', 'Mineraluld'],
declaredUnit: {declaredUnit: 4, declaredValue: 1, mass: null, massUnit: 1},
expectedLifespan: null,
constructionEpds: [
{
epdId: '9ab63b3a-1ef2-40fa-a3cb-2769980ed9b3',
expectedLifespan: 100,
constructionUnit: {
unit: 4,
amount: 1,
percentage: 50,
length: 1,
height: 1,
width: 1,
shownUnit: 4
}
},
{
epdId: '4acbc0ad-7ca3-4b11-b488-a61ed915ec1d',
expectedLifespan: 120,
constructionUnit: {
unit: 4,
amount: 1,
percentage: 50,
length: 1,
height: 1,
width: 1,
shownUnit: 4
}
}
]
})
};
fetch('https://api.realtimelca.com/epd/api/Material/construction', 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.realtimelca.com/epd/api/Material/construction",
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([
'name' => 'Thomas\' Construction',
'description' => 'Dette er en beskivelse af Thomas\' helt utrolige og fantastiske konstruktion der ikke er set magen til før - wauw siger jeg bare.',
'isPublic' => false,
'isCustom' => false,
'tags' => [
'Beton',
'Mineraluld'
],
'declaredUnit' => [
'declaredUnit' => 4,
'declaredValue' => 1,
'mass' => null,
'massUnit' => 1
],
'expectedLifespan' => null,
'constructionEpds' => [
[
'epdId' => '9ab63b3a-1ef2-40fa-a3cb-2769980ed9b3',
'expectedLifespan' => 100,
'constructionUnit' => [
'unit' => 4,
'amount' => 1,
'percentage' => 50,
'length' => 1,
'height' => 1,
'width' => 1,
'shownUnit' => 4
]
],
[
'epdId' => '4acbc0ad-7ca3-4b11-b488-a61ed915ec1d',
'expectedLifespan' => 120,
'constructionUnit' => [
'unit' => 4,
'amount' => 1,
'percentage' => 50,
'length' => 1,
'height' => 1,
'width' => 1,
'shownUnit' => 4
]
]
]
]),
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://api.realtimelca.com/epd/api/Material/construction"
payload := strings.NewReader("{\n \"name\": \"Thomas' Construction\",\n \"description\": \"Dette er en beskivelse af Thomas' helt utrolige og fantastiske konstruktion der ikke er set magen til før - wauw siger jeg bare.\",\n \"isPublic\": false,\n \"isCustom\": false,\n \"tags\": [\n \"Beton\",\n \"Mineraluld\"\n ],\n \"declaredUnit\": {\n \"declaredUnit\": 4,\n \"declaredValue\": 1,\n \"mass\": null,\n \"massUnit\": 1\n },\n \"expectedLifespan\": null,\n \"constructionEpds\": [\n {\n \"epdId\": \"9ab63b3a-1ef2-40fa-a3cb-2769980ed9b3\",\n \"expectedLifespan\": 100,\n \"constructionUnit\": {\n \"unit\": 4,\n \"amount\": 1,\n \"percentage\": 50,\n \"length\": 1,\n \"height\": 1,\n \"width\": 1,\n \"shownUnit\": 4\n }\n },\n {\n \"epdId\": \"4acbc0ad-7ca3-4b11-b488-a61ed915ec1d\",\n \"expectedLifespan\": 120,\n \"constructionUnit\": {\n \"unit\": 4,\n \"amount\": 1,\n \"percentage\": 50,\n \"length\": 1,\n \"height\": 1,\n \"width\": 1,\n \"shownUnit\": 4\n }\n }\n ]\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://api.realtimelca.com/epd/api/Material/construction")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Thomas' Construction\",\n \"description\": \"Dette er en beskivelse af Thomas' helt utrolige og fantastiske konstruktion der ikke er set magen til før - wauw siger jeg bare.\",\n \"isPublic\": false,\n \"isCustom\": false,\n \"tags\": [\n \"Beton\",\n \"Mineraluld\"\n ],\n \"declaredUnit\": {\n \"declaredUnit\": 4,\n \"declaredValue\": 1,\n \"mass\": null,\n \"massUnit\": 1\n },\n \"expectedLifespan\": null,\n \"constructionEpds\": [\n {\n \"epdId\": \"9ab63b3a-1ef2-40fa-a3cb-2769980ed9b3\",\n \"expectedLifespan\": 100,\n \"constructionUnit\": {\n \"unit\": 4,\n \"amount\": 1,\n \"percentage\": 50,\n \"length\": 1,\n \"height\": 1,\n \"width\": 1,\n \"shownUnit\": 4\n }\n },\n {\n \"epdId\": \"4acbc0ad-7ca3-4b11-b488-a61ed915ec1d\",\n \"expectedLifespan\": 120,\n \"constructionUnit\": {\n \"unit\": 4,\n \"amount\": 1,\n \"percentage\": 50,\n \"length\": 1,\n \"height\": 1,\n \"width\": 1,\n \"shownUnit\": 4\n }\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.realtimelca.com/epd/api/Material/construction")
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 \"name\": \"Thomas' Construction\",\n \"description\": \"Dette er en beskivelse af Thomas' helt utrolige og fantastiske konstruktion der ikke er set magen til før - wauw siger jeg bare.\",\n \"isPublic\": false,\n \"isCustom\": false,\n \"tags\": [\n \"Beton\",\n \"Mineraluld\"\n ],\n \"declaredUnit\": {\n \"declaredUnit\": 4,\n \"declaredValue\": 1,\n \"mass\": null,\n \"massUnit\": 1\n },\n \"expectedLifespan\": null,\n \"constructionEpds\": [\n {\n \"epdId\": \"9ab63b3a-1ef2-40fa-a3cb-2769980ed9b3\",\n \"expectedLifespan\": 100,\n \"constructionUnit\": {\n \"unit\": 4,\n \"amount\": 1,\n \"percentage\": 50,\n \"length\": 1,\n \"height\": 1,\n \"width\": 1,\n \"shownUnit\": 4\n }\n },\n {\n \"epdId\": \"4acbc0ad-7ca3-4b11-b488-a61ed915ec1d\",\n \"expectedLifespan\": 120,\n \"constructionUnit\": {\n \"unit\": 4,\n \"amount\": 1,\n \"percentage\": 50,\n \"length\": 1,\n \"height\": 1,\n \"width\": 1,\n \"shownUnit\": 4\n }\n }\n ]\n}"
response = http.request(request)
puts response.read_bodyLibrary
Create Construction
Creates a new construction material in the system. A construction is a composite material made up of one or more EPD (Environmental Product Declaration) references, each with its own lifespan and unit configuration.
Endpoint: POST {{epdbaseUrl}}/Material/construction
Authentication: Bearer token required — set {{BearerToken}} in your environment.
POST
/
Material
/
construction
Create Construction
curl --request POST \
--url https://api.realtimelca.com/epd/api/Material/construction \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data @- <<EOF
{
"name": "Thomas' Construction",
"description": "Dette er en beskivelse af Thomas' helt utrolige og fantastiske konstruktion der ikke er set magen til før - wauw siger jeg bare.",
"isPublic": false,
"isCustom": false,
"tags": [
"Beton",
"Mineraluld"
],
"declaredUnit": {
"declaredUnit": 4,
"declaredValue": 1,
"mass": null,
"massUnit": 1
},
"expectedLifespan": null,
"constructionEpds": [
{
"epdId": "9ab63b3a-1ef2-40fa-a3cb-2769980ed9b3",
"expectedLifespan": 100,
"constructionUnit": {
"unit": 4,
"amount": 1,
"percentage": 50,
"length": 1,
"height": 1,
"width": 1,
"shownUnit": 4
}
},
{
"epdId": "4acbc0ad-7ca3-4b11-b488-a61ed915ec1d",
"expectedLifespan": 120,
"constructionUnit": {
"unit": 4,
"amount": 1,
"percentage": 50,
"length": 1,
"height": 1,
"width": 1,
"shownUnit": 4
}
}
]
}
EOFimport requests
url = "https://api.realtimelca.com/epd/api/Material/construction"
payload = {
"name": "Thomas' Construction",
"description": "Dette er en beskivelse af Thomas' helt utrolige og fantastiske konstruktion der ikke er set magen til før - wauw siger jeg bare.",
"isPublic": False,
"isCustom": False,
"tags": ["Beton", "Mineraluld"],
"declaredUnit": {
"declaredUnit": 4,
"declaredValue": 1,
"mass": None,
"massUnit": 1
},
"expectedLifespan": None,
"constructionEpds": [
{
"epdId": "9ab63b3a-1ef2-40fa-a3cb-2769980ed9b3",
"expectedLifespan": 100,
"constructionUnit": {
"unit": 4,
"amount": 1,
"percentage": 50,
"length": 1,
"height": 1,
"width": 1,
"shownUnit": 4
}
},
{
"epdId": "4acbc0ad-7ca3-4b11-b488-a61ed915ec1d",
"expectedLifespan": 120,
"constructionUnit": {
"unit": 4,
"amount": 1,
"percentage": 50,
"length": 1,
"height": 1,
"width": 1,
"shownUnit": 4
}
}
]
}
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({
name: 'Thomas\' Construction',
description: 'Dette er en beskivelse af Thomas\' helt utrolige og fantastiske konstruktion der ikke er set magen til før - wauw siger jeg bare.',
isPublic: false,
isCustom: false,
tags: ['Beton', 'Mineraluld'],
declaredUnit: {declaredUnit: 4, declaredValue: 1, mass: null, massUnit: 1},
expectedLifespan: null,
constructionEpds: [
{
epdId: '9ab63b3a-1ef2-40fa-a3cb-2769980ed9b3',
expectedLifespan: 100,
constructionUnit: {
unit: 4,
amount: 1,
percentage: 50,
length: 1,
height: 1,
width: 1,
shownUnit: 4
}
},
{
epdId: '4acbc0ad-7ca3-4b11-b488-a61ed915ec1d',
expectedLifespan: 120,
constructionUnit: {
unit: 4,
amount: 1,
percentage: 50,
length: 1,
height: 1,
width: 1,
shownUnit: 4
}
}
]
})
};
fetch('https://api.realtimelca.com/epd/api/Material/construction', 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.realtimelca.com/epd/api/Material/construction",
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([
'name' => 'Thomas\' Construction',
'description' => 'Dette er en beskivelse af Thomas\' helt utrolige og fantastiske konstruktion der ikke er set magen til før - wauw siger jeg bare.',
'isPublic' => false,
'isCustom' => false,
'tags' => [
'Beton',
'Mineraluld'
],
'declaredUnit' => [
'declaredUnit' => 4,
'declaredValue' => 1,
'mass' => null,
'massUnit' => 1
],
'expectedLifespan' => null,
'constructionEpds' => [
[
'epdId' => '9ab63b3a-1ef2-40fa-a3cb-2769980ed9b3',
'expectedLifespan' => 100,
'constructionUnit' => [
'unit' => 4,
'amount' => 1,
'percentage' => 50,
'length' => 1,
'height' => 1,
'width' => 1,
'shownUnit' => 4
]
],
[
'epdId' => '4acbc0ad-7ca3-4b11-b488-a61ed915ec1d',
'expectedLifespan' => 120,
'constructionUnit' => [
'unit' => 4,
'amount' => 1,
'percentage' => 50,
'length' => 1,
'height' => 1,
'width' => 1,
'shownUnit' => 4
]
]
]
]),
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://api.realtimelca.com/epd/api/Material/construction"
payload := strings.NewReader("{\n \"name\": \"Thomas' Construction\",\n \"description\": \"Dette er en beskivelse af Thomas' helt utrolige og fantastiske konstruktion der ikke er set magen til før - wauw siger jeg bare.\",\n \"isPublic\": false,\n \"isCustom\": false,\n \"tags\": [\n \"Beton\",\n \"Mineraluld\"\n ],\n \"declaredUnit\": {\n \"declaredUnit\": 4,\n \"declaredValue\": 1,\n \"mass\": null,\n \"massUnit\": 1\n },\n \"expectedLifespan\": null,\n \"constructionEpds\": [\n {\n \"epdId\": \"9ab63b3a-1ef2-40fa-a3cb-2769980ed9b3\",\n \"expectedLifespan\": 100,\n \"constructionUnit\": {\n \"unit\": 4,\n \"amount\": 1,\n \"percentage\": 50,\n \"length\": 1,\n \"height\": 1,\n \"width\": 1,\n \"shownUnit\": 4\n }\n },\n {\n \"epdId\": \"4acbc0ad-7ca3-4b11-b488-a61ed915ec1d\",\n \"expectedLifespan\": 120,\n \"constructionUnit\": {\n \"unit\": 4,\n \"amount\": 1,\n \"percentage\": 50,\n \"length\": 1,\n \"height\": 1,\n \"width\": 1,\n \"shownUnit\": 4\n }\n }\n ]\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://api.realtimelca.com/epd/api/Material/construction")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Thomas' Construction\",\n \"description\": \"Dette er en beskivelse af Thomas' helt utrolige og fantastiske konstruktion der ikke er set magen til før - wauw siger jeg bare.\",\n \"isPublic\": false,\n \"isCustom\": false,\n \"tags\": [\n \"Beton\",\n \"Mineraluld\"\n ],\n \"declaredUnit\": {\n \"declaredUnit\": 4,\n \"declaredValue\": 1,\n \"mass\": null,\n \"massUnit\": 1\n },\n \"expectedLifespan\": null,\n \"constructionEpds\": [\n {\n \"epdId\": \"9ab63b3a-1ef2-40fa-a3cb-2769980ed9b3\",\n \"expectedLifespan\": 100,\n \"constructionUnit\": {\n \"unit\": 4,\n \"amount\": 1,\n \"percentage\": 50,\n \"length\": 1,\n \"height\": 1,\n \"width\": 1,\n \"shownUnit\": 4\n }\n },\n {\n \"epdId\": \"4acbc0ad-7ca3-4b11-b488-a61ed915ec1d\",\n \"expectedLifespan\": 120,\n \"constructionUnit\": {\n \"unit\": 4,\n \"amount\": 1,\n \"percentage\": 50,\n \"length\": 1,\n \"height\": 1,\n \"width\": 1,\n \"shownUnit\": 4\n }\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.realtimelca.com/epd/api/Material/construction")
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 \"name\": \"Thomas' Construction\",\n \"description\": \"Dette er en beskivelse af Thomas' helt utrolige og fantastiske konstruktion der ikke er set magen til før - wauw siger jeg bare.\",\n \"isPublic\": false,\n \"isCustom\": false,\n \"tags\": [\n \"Beton\",\n \"Mineraluld\"\n ],\n \"declaredUnit\": {\n \"declaredUnit\": 4,\n \"declaredValue\": 1,\n \"mass\": null,\n \"massUnit\": 1\n },\n \"expectedLifespan\": null,\n \"constructionEpds\": [\n {\n \"epdId\": \"9ab63b3a-1ef2-40fa-a3cb-2769980ed9b3\",\n \"expectedLifespan\": 100,\n \"constructionUnit\": {\n \"unit\": 4,\n \"amount\": 1,\n \"percentage\": 50,\n \"length\": 1,\n \"height\": 1,\n \"width\": 1,\n \"shownUnit\": 4\n }\n },\n {\n \"epdId\": \"4acbc0ad-7ca3-4b11-b488-a61ed915ec1d\",\n \"expectedLifespan\": 120,\n \"constructionUnit\": {\n \"unit\": 4,\n \"amount\": 1,\n \"percentage\": 50,\n \"length\": 1,\n \"height\": 1,\n \"width\": 1,\n \"shownUnit\": 4\n }\n }\n ]\n}"
response = http.request(request)
puts response.read_bodyAuthorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
application/json
Response
default
Response schema not yet documented in the upstream Postman spec.
⌘I

