Rechnungspositionen abrufen
curl --request GET \
--url https://api.comstruct.com/v1/invoices/{id}/items \
--header 'X-API-Key: <api-key>'import requests
url = "https://api.comstruct.com/v1/invoices/{id}/items"
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/invoices/{id}/items', 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/invoices/{id}/items",
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/invoices/{id}/items"
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/invoices/{id}/items")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.comstruct.com/v1/invoices/{id}/items")
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{
"items": [
{
"index": 0,
"number": "10",
"id": 123,
"product_number": "<string>",
"title": "<string>",
"description": "<string>",
"type": "REMOVAL",
"quantity": 123,
"unit": "<string>",
"unit_net_price": 123,
"net_price": 123,
"deducted_quantity": 123,
"deducted_unit_net_price": 123,
"deducted_net_price": 123,
"delivery_number": "<string>",
"delivery_date": "2023-12-25",
"item_position": 123,
"matched_delivery_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"matched_product_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"matched_price": true,
"matched_quantity": true,
"discount": 123,
"special_discount": 123,
"comment": "<string>",
"account_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"llm_factual_match_reason": "<string>",
"llm_factual_match_status": "<string>",
"positions": [
{}
]
}
]
}Rechnungen
Rechnungspositionen abrufen
Erforderliche Berechtigungen: invoices:read
Gibt die Rechnungspositionen für die angegebene Rechnung zurück (sortiert nach index, Feld items).
Enthalten nicht in GET /invoices oder GET /invoices/{id}.
GET
/
invoices
/
{id}
/
items
Rechnungspositionen abrufen
curl --request GET \
--url https://api.comstruct.com/v1/invoices/{id}/items \
--header 'X-API-Key: <api-key>'import requests
url = "https://api.comstruct.com/v1/invoices/{id}/items"
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/invoices/{id}/items', 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/invoices/{id}/items",
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/invoices/{id}/items"
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/invoices/{id}/items")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.comstruct.com/v1/invoices/{id}/items")
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{
"items": [
{
"index": 0,
"number": "10",
"id": 123,
"product_number": "<string>",
"title": "<string>",
"description": "<string>",
"type": "REMOVAL",
"quantity": 123,
"unit": "<string>",
"unit_net_price": 123,
"net_price": 123,
"deducted_quantity": 123,
"deducted_unit_net_price": 123,
"deducted_net_price": 123,
"delivery_number": "<string>",
"delivery_date": "2023-12-25",
"item_position": 123,
"matched_delivery_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"matched_product_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"matched_price": true,
"matched_quantity": true,
"discount": 123,
"special_discount": 123,
"comment": "<string>",
"account_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"llm_factual_match_reason": "<string>",
"llm_factual_match_status": "<string>",
"positions": [
{}
]
}
]
}Gibt die Rechnungspositionen für eine Rechnung zurück (
items, nach index sortiert). Nicht in GET /invoices oder GET /invoices/{id} enthalten. Das optionale Feld number enthält die Positionsnummer, wie sie auf der Rechnung angegeben ist.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
Rechnungs-ID (Integer)
Antwort
Erfolgreich
Rechnungspositionen sortiert nach index
Show child attributes
Show child attributes