PlanDocket

Rechnungen

Business+

Rechnungen anzeigen und aktualisieren.

Erforderliche Bereiche: invoices
Feature-Flag: invoices

Endpunkte

GET /api/v1/invoices

Alle Rechnungen auflisten

GET /api/v1/invoices/{id}

Einzelne Rechnung abrufen

PUT/PATCH /api/v1/invoices/{id}

Rechnung aktualisieren

Abfrageparameter

Parameter Beschreibung
status Nach Rechnungsstatus filtern
customer_number Nach Kundennummer filtern
event_key Nach Event-Schlüssel filtern
type Nach Rechnungstyp filtern (invoice, credit_note)
sort Sortierfeld (invoice_number, total, status, due_date, created_at)
order Sortierrichtung (ASC oder DESC, Standard: DESC)
include Verknüpfte Daten einschließen (items, payments, contact)

Request-Schema

Parameter Typ Erforderlich Beschreibung
status string Nein Rechnungsstatus (draft, sent, paid, etc.)
notes string Nein Interne Notizen zur Rechnung
due_date string Nein Fälligkeitsdatum (ISO 8601 Format)

Response-Schema

Feld Typ
id integer
invoice_number string
invoice_type string
related_invoice_id integer|null
status string
event_participant_id integer|null
total float
currency string
paid_amount float
open_amount float
service_date string|null
due_date string|null
is_reverse_charge boolean
is_locked boolean
locked_at string|null
reminder_sent_at string|null
reminder_count integer
notes string|null
created_at string
updated_at string

Codebeispiele

curl -X GET "https://your-tenant.plandocket.com/api/v1/invoices" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json"
<?php
$apiKey = 'YOUR_API_KEY';
$baseUrl = 'https://your-tenant.plandocket.com';

$ch = curl_init();
curl_setopt_array($ch, [
    CURLOPT_URL => $baseUrl . '/api/v1/invoices',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => [
        'Authorization: Bearer ' . $apiKey,
        'Content-Type: application/json',
    ],
]);

$response = curl_exec($ch);
$data = json_decode($response, true);
curl_close($ch);

print_r($data);
const apiKey = 'YOUR_API_KEY';
const baseUrl = 'https://your-tenant.plandocket.com';

const response = await fetch(`${baseUrl}/api/v1/invoices`, {
  method: 'GET',
  headers: {
    'Authorization': `Bearer ${apiKey}`,
    'Content-Type': 'application/json',
  },
});

const data = await response.json();
console.log(data);
import requests

api_key = 'YOUR_API_KEY'
base_url = 'https://your-tenant.plandocket.com'

headers = {
    'Authorization': f'Bearer {api_key}',
    'Content-Type': 'application/json',
}

response = requests.get(f'{base_url}/api/v1/invoices', headers=headers)
data = response.json()
print(data)

Beispiel-Antwort

200 OK
{
  "data": {
    "invoice_id": 1,
    "created_at": 1704067200,
    "updated_at": 1704067200
  },
  "meta": {
    "request_id": "req_abc123"
  }
}
API Version v1.0
Esc zum Schließen