Skip to main content
GET
/
invoices
Rechnungen auflisten
curl --request GET \
  --url https://api.comstruct.com/v1/invoices \
  --header 'X-API-Key: <api-key>'
import requests

url = "https://api.comstruct.com/v1/invoices"

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', 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",
  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"

	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")
  .header("X-API-Key", "<api-key>")
  .asString();
require 'uri'
require 'net/http'

url = URI("https://api.comstruct.com/v1/invoices")

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": "123", "external_id": "EXT-123", "invoice_number": "INV-2024-001", "invoice_date": "2024-01-15", "due_date": "2024-02-15", "receipt_date": "2023-11-07T05:31:56Z", "project_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a", "project_number": "PRJ-2024-001", "supplier_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a", "supplier_name": "ABC Supplies Ltd.", "supplier_tax_id": "<string>", "supplier_iban": "<string>", "customer_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a", "currency": "EUR", "net_amount": 1000, "total_tax_amount": 190, "total_amount": 1190, "deducted_net_amount": 800, "deducted_total_tax_amount": 152, "deducted_total_amount": 952, "tax_rate": 123, "status": "NEW", "document_type": "INVOICE", "electronic_invoice_type": "ZUGFERD", "down_payment_number": 123, "payment_reference": "RF18539007547034", "reference_type": "QRR", "payment_term": { "number": "<string>", "title": "<string>" }, "region_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a", "legal_entity_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a", "project_region": { "id": "<string>", "title": "<string>", "number": "<string>" }, "legal_entity": { "id": "<string>", "title": "<string>", "number": "<string>" }, "supplier": { "id": "<string>", "title": "<string>", "external_id": "<string>", "legal_uid": "<string>" }, "project": { "id": "<string>", "title": "<string>", "project_number": "<string>", "description": "<string>", "project_region": { "number": "<string>", "title": "<string>" }, "legal_entity": { "number": "<string>", "title": "<string>" } }, "invoice_accounts": [ { "net_amount": 1000, "gross_amount": 1190, "tax_amount": 190, "account_type": "DEBIT", "comment": "<string>", "quantity": 10, "unit": "Stück", "project_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a", "project": { "id": "<string>", "title": "<string>", "project_number": "<string>" }, "account": { "id": "<string>", "number": "<string>", "title": "<string>" }, "tax_code": { "id": "<string>", "number": "<string>", "title": "<string>" } } ], "document": { "id": "<string>", "title": "<string>" }, "comment": "<string>", "payment_terms": "<string>", "payment_term_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a", "discount_rate": 123, "discount_date": "2023-12-25", "file_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a", "created_at": "2024-01-15T10:00:00Z", "updated_at": "2024-01-16T14:30:00Z", "assignee_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a" } ], "total": 150, "limit": 25, "offset": 0, "hasNext": true, "hasPrevious": false, "totalPages": 6, "currentPage": 0 }

Authorizations

X-API-Key
string
header
required

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.

Query Parameters

limit
integer
default:25

Anzahl der Einträge pro Seite (max. 500, Standard 25)

Required range: 1 <= x <= 500
Example:

25

offset
integer
default:0

Anzahl der zu überspringenden Einträge für die Paginierung

Required range: x >= 0
Example:

0

status
enum<string>

Nach Rechnungsstatus filtern

Available options:
NEW,
PROCESSING,
FACTUAL_CHECKING,
PRICE_CHECKING,
CHECKED,
CANCELLED,
ERROR,
OPEN

Response

Erfolgreich

data
object[]

Array von Rechnungen

total
integer

Gesamtanzahl der Rechnungen

Example:

150

limit
integer | null

Anzahl der Einträge pro Seite

Example:

25

offset
integer

Anzahl der übersprungenen Einträge

Example:

0

hasNext
boolean

Ob weitere Seiten verfügbar sind

Example:

true

hasPrevious
boolean

Ob vorherige Seiten verfügbar sind

Example:

false

totalPages
integer

Gesamtanzahl der Seiten

Example:

6

currentPage
integer

Aktuelle Seitennummer (0-basiert)

Example:

0