Lieferkomponenten abrufen
curl --request GET \
--url https://api.comstruct.com/v1/deliveries/{id}/components \
--header 'X-API-Key: <api-key>'import requests
url = "https://api.comstruct.com/v1/deliveries/{id}/components"
headers = {"X-API-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-API-Key': '<api-key>'}};
fetch('https://api.comstruct.com/v1/deliveries/{id}/components', 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.comstruct.com/v1/deliveries/{id}/components",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"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"
"net/http"
"io"
)
func main() {
url := "https://api.comstruct.com/v1/deliveries/{id}/components"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-API-Key", "<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.comstruct.com/v1/deliveries/{id}/components")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.comstruct.com/v1/deliveries/{id}/components")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-API-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"groups": [
{
"group_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"distribution": {
"Beton C30/37": 5.5
},
"components": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"component_id": 123,
"component_title": "<string>",
"component_type_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"component_type_title": "<string>"
}
]
}
]
}Deliveries
Get delivery components
Erforderliche Berechtigungen: deliveries:read
Gibt die einer Lieferung zugeordneten Projektkomponenten zurück, gruppiert nach group_id.
Jede Gruppe enthält eine gemeinsame Mengenverteilung auf die Positionsbezeichnungen der Lieferung
sowie die zugehörigen Komponenten (typischerweise eine pro Komponententyp).
GET
/
deliveries
/
{id}
/
components
Lieferkomponenten abrufen
curl --request GET \
--url https://api.comstruct.com/v1/deliveries/{id}/components \
--header 'X-API-Key: <api-key>'import requests
url = "https://api.comstruct.com/v1/deliveries/{id}/components"
headers = {"X-API-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-API-Key': '<api-key>'}};
fetch('https://api.comstruct.com/v1/deliveries/{id}/components', 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.comstruct.com/v1/deliveries/{id}/components",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"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"
"net/http"
"io"
)
func main() {
url := "https://api.comstruct.com/v1/deliveries/{id}/components"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-API-Key", "<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.comstruct.com/v1/deliveries/{id}/components")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.comstruct.com/v1/deliveries/{id}/components")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-API-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"groups": [
{
"group_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"distribution": {
"Beton C30/37": 5.5
},
"components": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"component_id": 123,
"component_title": "<string>",
"component_type_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"component_type_title": "<string>"
}
]
}
]
}Overview
Returns project components linked to a delivery, grouped bygroup_id. Each group shares one distribution of quantities across delivery line item titles — the same model as the comstruct web app for mass balance and component overview.
Permissions
| Scope | Description |
|---|---|
deliveries:read | Read delivery data |
Response shape
The payload has agroups array. Each group includes:
| Field | Description |
|---|---|
group_id | UUID for the group |
distribution | Map from delivery line item title to quantity, e.g. { "Concrete C30/37": 5.5 }, or null |
components | Assigned project components with id, component_id, component_title, component_type_id, component_type_title |
Response codes
| Code | Description |
|---|---|
200 | Success |
403 | Forbidden — delivery belongs to another customer |
404 | Delivery not found |
Authorizations
API-Schlüssel zur Authentifizierung. Kontaktieren Sie Ihren Customer Success Manager, um einen API-Schlüssel zu erhalten.
Jeder Endpunkt erfordert spezifische Berechtigungen (Scopes); die erforderlichen Scopes werden pro Endpunkt angezeigt.
Path Parameters
Lieferungs-ID (UUID)
Response
Komponentengruppen der Lieferung
Show child attributes
Show child attributes