Extrahierte Dokumente eines Typs auflisten
curl --request GET \
--url https://api.comstruct.com/v1/documents/{typeKey} \
--header 'X-API-Key: <api-key>'import requests
url = "https://api.comstruct.com/v1/documents/{typeKey}"
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}', 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}",
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}"
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}")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.comstruct.com/v1/documents/{typeKey}")
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{
"data": [
{
"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"
}
}
}
],
"total": 42,
"offset": 0,
"hasNext": true,
"hasPrevious": false,
"totalPages": 2,
"currentPage": 0,
"limit": 25
}Documents
List documents by type
Erforderliche Berechtigungen: documents:read
Gibt eine paginierte Liste extrahierter benutzerdefinierter Dokumente eines Typs zurück,
sortiert nach created_at absteigend. Es werden nur Dokumente mit Status EXTRACTED eines
für den Mandanten aktivierten Typs geliefert. Ein projektgebundener API-Schlüssel sieht nur
Dokumente, deren Projekt-Feld auf dieses Projekt verweist.
Authentifizierung per API-Schlüssel (x-api-key) oder JWT (mit gleicher Berechtigung).
Unbekannter typeKey, ein für den Mandanten deaktivierter Typ oder keine passenden Dokumente
führen zu 404.
GET
/
documents
/
{typeKey}
Extrahierte Dokumente eines Typs auflisten
curl --request GET \
--url https://api.comstruct.com/v1/documents/{typeKey} \
--header 'X-API-Key: <api-key>'import requests
url = "https://api.comstruct.com/v1/documents/{typeKey}"
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}', 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}",
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}"
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}")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.comstruct.com/v1/documents/{typeKey}")
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{
"data": [
{
"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"
}
}
}
],
"total": 42,
"offset": 0,
"hasNext": true,
"hasPrevious": false,
"totalPages": 2,
"currentPage": 0,
"limit": 25
}Returns extracted custom documents of one type (newest first), paginated with
limit and offset. Only EXTRACTED status and types enabled for the tenant (e.g. GUARANTEE). Project-scoped API keys only see documents whose project field matches that project. Single document: GET /documents/{typeKey}/{id}.