Rechnungs-PDF herunterladen
GET
/invoices/{id}/pdf
Lädt die PDF-Datei für eine bestimmte Rechnung herunter. Erfordert Authentifizierung; gibt nur Dokumente des authentifizierten Benutzers zurück.
Authorizations
Abschnitt betitelt „Authorizations “Parameters
Abschnitt betitelt „ Parameters “Path Parameters
Abschnitt betitelt „Path Parameters “ id
required
Document ID
integer
Rechnungs-ID
Responses
Abschnitt betitelt „ Responses “Invoice PDF file
Media type application/pdf
string format: binary
Kunden-Nr oder API Key sind ungültig oder inaktiv!
Account ist noch nicht innerhalb von 24h nach Registrierung aktiviert. Bitte warten oder Support kontaktieren
Quelle nicht gefunden
Die IP-Adresse wurde vorübergehend blockiert, da in kurzer Zeit viele Anfragen mit ungültigen Anmeldeinformationen gesendet wurden. Bitte warten Sie und versuchen Sie es später.
Code Samples
curl -s 'https://api.lox24.eu/invoices/34101/pdf' -H 'X-LOX24-AUTH-TOKEN: YOUR_API_TOKEN' --output invoice.pdfusing System;using System.Net.Http;using System.Net.Http.Headers;using System.IO;using System.Threading.Tasks;
class Program{ static async Task Main() { using var client = new HttpClient(); client.DefaultRequestHeaders.Add("X-LOX24-AUTH-TOKEN", "YOUR_API_TOKEN");
var response = await client.GetByteArrayAsync("https://api.lox24.eu/invoices/34101/pdf"); await File.WriteAllBytesAsync("invoice.pdf", response); Console.WriteLine("PDF saved to invoice.pdf"); }}package main
import ( "fmt" "io" "net/http" "os")
func main() { req, _ := http.NewRequest("GET", "https://api.lox24.eu/invoices/34101/pdf", nil) req.Header.Set("X-LOX24-AUTH-TOKEN", "YOUR_API_TOKEN")
resp, _ := http.DefaultClient.Do(req) defer resp.Body.Close() body, _ := io.ReadAll(resp.Body) os.WriteFile("invoice.pdf", body, 0644) fmt.Println("PDF saved to invoice.pdf")}import java.net.URI;import java.net.http.HttpClient;import java.net.http.HttpRequest;import java.net.http.HttpResponse;import java.nio.file.Files;import java.nio.file.Path;
public class Main { public static void main(String[] args) throws Exception { var client = HttpClient.newHttpClient(); var request = HttpRequest.newBuilder() .uri(URI.create("https://api.lox24.eu/invoices/34101/pdf")) .header("X-LOX24-AUTH-TOKEN", "YOUR_API_TOKEN") .GET() .build();
var response = client.send(request, HttpResponse.BodyHandlers.ofByteArray()); Files.write(Path.of("invoice.pdf"), response.body()); System.out.println("PDF saved to invoice.pdf"); }}fetch('https://api.lox24.eu/invoices/34101/pdf', { headers: { 'X-LOX24-AUTH-TOKEN': 'YOUR_API_TOKEN' }}).then(res => res.blob()).then(blob => { const url = URL.createObjectURL(blob); const a = document.createElement('a'); a.href = url; a.download = 'invoice.pdf'; a.click();});<?php
$ch = curl_init('https://api.lox24.eu/invoices/34101/pdf');curl_setopt($ch, CURLOPT_HTTPHEADER, ['X-LOX24-AUTH-TOKEN: YOUR_API_TOKEN']);curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$pdf = curl_exec($ch);curl_close($ch);
file_put_contents('invoice.pdf', $pdf);echo "PDF saved to invoice.pdf\n";import requests
response = requests.get( 'https://api.lox24.eu/invoices/34101/pdf', headers={'X-LOX24-AUTH-TOKEN': 'YOUR_API_TOKEN'})with open('invoice.pdf', 'wb') as f: f.write(response.content)print('PDF saved to invoice.pdf')