curl --request GET \
--url https://api.comstruct.com/v1/workflows/status/{external_id} \
--header 'X-API-Key: <api-key>'import requests
url = "https://api.comstruct.com/v1/workflows/status/{external_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/workflows/status/{external_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/workflows/status/{external_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/workflows/status/{external_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/workflows/status/{external_id}")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.comstruct.com/v1/workflows/status/{external_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{
"success": true,
"status": "FACTUAL_CHECKING",
"url": "https://app.comstruct.com/invoices/123",
"history": [
{
"created_at": "2024-01-15T10:00:00Z",
"newStatus": "PROCESSING",
"previousStatus": "NEW",
"message": "Verarbeitung gestartet"
},
{
"created_at": "2024-01-15T10:05:00Z",
"newStatus": "FACTUAL_CHECKING",
"previousStatus": "PROCESSING",
"message": "Sachliche Prüfung"
}
]
}Workflow-Status abrufen
Erforderliche Berechtigungen: invoices:write
Ruft den aktuellen Status eines Workflow-Prozesses anhand der externen Kennung ab.
Dieser Endpunkt ermöglicht es Drittanbieter-Integrationen, den Verarbeitungsstatus einer Rechnung anhand ihrer externen ID zu überprüfen. Die Antwort enthält den aktuellen Status, eine URL zur Rechnung in comstruct und eine Historie der Statusänderungen. API-Schlüssel muss mit einem Kunden verknüpft sein.
curl --request GET \
--url https://api.comstruct.com/v1/workflows/status/{external_id} \
--header 'X-API-Key: <api-key>'import requests
url = "https://api.comstruct.com/v1/workflows/status/{external_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/workflows/status/{external_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/workflows/status/{external_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/workflows/status/{external_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/workflows/status/{external_id}")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.comstruct.com/v1/workflows/status/{external_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{
"success": true,
"status": "FACTUAL_CHECKING",
"url": "https://app.comstruct.com/invoices/123",
"history": [
{
"created_at": "2024-01-15T10:00:00Z",
"newStatus": "PROCESSING",
"previousStatus": "NEW",
"message": "Verarbeitung gestartet"
},
{
"created_at": "2024-01-15T10:05:00Z",
"newStatus": "FACTUAL_CHECKING",
"previousStatus": "PROCESSING",
"message": "Sachliche Prüfung"
}
]
}Autorisierungen
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.
Pfadparameter
Die externe Kennung der Rechnung/des Workflows
Antwort
Workflow-Status erfolgreich abgerufen
Gibt an, ob die Statusabfrage erfolgreich war
true
Aktueller Rechnungsstatus
NEW, PROCESSING, FACTUAL_CHECKING, PRICE_CHECKING, POSITIONS_CHECK, CHECKED, CANCELLED, ERROR, OPEN "FACTUAL_CHECKING"
URL zur Anzeige der Rechnung in comstruct
"https://app.comstruct.com/invoices/123"
Verlauf der Statusänderungen
Show child attributes
Show child attributes