curl --request GET \
--url https://api.comstruct.com/v1/documents/{typeKey}/{id} \
--header 'X-API-Key: <api-key>'import requests
url = "https://api.comstruct.com/v1/documents/{typeKey}/{id}"
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/documents/{typeKey}/{id}', 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/documents/{typeKey}/{id}",
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/documents/{typeKey}/{id}"
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/documents/{typeKey}/{id}")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.comstruct.com/v1/documents/{typeKey}/{id}")
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{
"id": "22222222-3333-4444-8555-666666666666",
"type": "GUARANTEE",
"title": "guarantee-0001.pdf",
"status": "EXTRACTED",
"created_at": "2026-01-15T10:00:00.000Z",
"fields": {
"guarantee_type": "GW",
"order_number": "PO-0001",
"issuer": "Acme Insurance AG",
"amount": 1500,
"date": "2026-01-15",
"supplier": {
"id": "33333333-4444-4555-8666-777777777777",
"title": "Acme Construction GmbH",
"external_id": "SUP-0001"
},
"project": {
"id": "44444444-5555-4666-8777-888888888888",
"title": "Nordbau",
"project_number": "P-0001",
"external_id": "PRJ-0001"
}
}
}Dokument abrufen
Erforderliche Berechtigungen: documents:read
Gibt ein einzelnes extrahiertes Dokument des angegebenen Typs zurück. Die Antwort entspricht
einem Eintrag aus GET /documents/{typeKey}. Bei projektgebundenem API-Schlüssel gilt dieselbe
Projekteinschränkung wie bei der Liste.
404, wenn der Typ unbekannt oder deaktiviert ist oder kein extrahiertes Dokument dieser
ID existiert.
curl --request GET \
--url https://api.comstruct.com/v1/documents/{typeKey}/{id} \
--header 'X-API-Key: <api-key>'import requests
url = "https://api.comstruct.com/v1/documents/{typeKey}/{id}"
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/documents/{typeKey}/{id}', 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/documents/{typeKey}/{id}",
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/documents/{typeKey}/{id}"
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/documents/{typeKey}/{id}")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.comstruct.com/v1/documents/{typeKey}/{id}")
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{
"id": "22222222-3333-4444-8555-666666666666",
"type": "GUARANTEE",
"title": "guarantee-0001.pdf",
"status": "EXTRACTED",
"created_at": "2026-01-15T10:00:00.000Z",
"fields": {
"guarantee_type": "GW",
"order_number": "PO-0001",
"issuer": "Acme Insurance AG",
"amount": 1500,
"date": "2026-01-15",
"supplier": {
"id": "33333333-4444-4555-8666-777777777777",
"title": "Acme Construction GmbH",
"external_id": "SUP-0001"
},
"project": {
"id": "44444444-5555-4666-8777-888888888888",
"title": "Nordbau",
"project_number": "P-0001",
"external_id": "PRJ-0001"
}
}
}GET /documents/{typeKey} inklusive aller Feldwerte unter fields.Autorisierungen
Pfadparameter
Antwort
Erfolgreich
Extrahiertes benutzerdefiniertes Dokument (z. B. Bürgschaft). Das Objekt fields enthält jedes Feld des Dokumententyps unter seinem key; fehlende Werte sind null.
Feldwerte nach Feld-Schlüssel. Typen: Text/Auswahl string, Zahl number, Währung
{ amount, currency_code }, Datum YYYY-MM-DD, Boolean, Lieferant
{ id, title, external_id }, Projekt { id, title, project_number, external_id };
null, wenn nicht gelesen oder nicht gematcht.
{
"guarantee_type": "GW",
"order_number": "PO-0001",
"issuer": "Acme Insurance AG",
"amount": 1500,
"date": "2026-01-15",
"supplier": {
"id": "33333333-4444-4555-8666-777777777777",
"title": "Acme Construction GmbH",
"external_id": "SUP-0001"
},
"project": {
"id": "44444444-5555-4666-8777-888888888888",
"title": "Nordbau",
"project_number": "P-0001",
"external_id": "PRJ-0001"
}
}