Zum Inhalt springen

Konto und Stammdaten

5 Werkzeuge in dieser Gruppe, jedes mit Stufe, Eigenschaften, Beschreibung und Argumenten.

Die Beschreibung für das Modell und die Argumente stehen auf Englisch, so wie das Modell sie liest.

sevdesk_account_info 

Kontoübersicht und aktive Rechte

Lesenread-onlyidempotent

Zeigt dein Konto, die Buchhaltungsversion, die Umsatzsteuerregelung und was der Server darf. Gut als erster Aufruf.

Für das Modell, auf Englisch

Overview of the connected sevDesk account and of this server's permissions. Call it first in a session to orient yourself: it returns the bookkeeping system version (1.0 or 'Update 2.0', which decides whether documents use taxRule or taxType), the VAT regulation (regular or Kleinunternehmer, which decides the tax rules) and chart of accounts, the sevDesk users (Benutzer; their ids are needed as contactPerson on invoices, orders and credit notes) and which permission tiers (read, write, commit, external), toolsets, dry-run and confirmation mode are active, so you know what you may do before you try.

Keine Argumente.

sevdesk_document_save 

Dokument als Datei speichern

Lesenchanges state

Speichert das PDF einer Rechnung, Gutschrift oder eines Auftrags oder das XML einer E-Rechnung als neue Datei.

Für das Modell, auf Englisch

Save the PDF of an invoice (Rechnung), credit note (Gutschrift) or order (Angebot, Auftragsbestätigung, Lieferschein), or the XML of an e-invoice (E-Rechnung, XRechnung), as a new file in SEVDESK_OUTPUT_DIR (on a remote server: a download link), e.g. to archive or attach it. It writes only inside that folder, never overwrites a file (a taken name gets a suffix such as RE-1001-1.pdf) and never changes anything in sevDesk: PDFs are fetched as previews (preventSendBy), so nothing is marked as sent. Every call creates another file or link, so save each document once. To only look at a file, use sevdesk_invoice_pdf, sevdesk_credit_note_pdf, sevdesk_order_pdf or sevdesk_invoice_xml instead.

documenterforderlichinvoice_pdf | credit_note_pdf | order_pdf | invoice_xml
Which file: invoice_pdf, credit_note_pdf, order_pdf, or invoice_xml (e-invoice XML).
iderforderlichinteger
sevDesk id of the document (not its number such as RE-1001).

sevdesk_reference_lookup 

IDs und Codes nachschlagen

Lesenread-onlyidempotent

Schlägt die IDs und Codes nach, die andere Werkzeuge brauchen: Steuerregeln, Kategorien, Status, Länder, Einheiten.

Für das Modell, auf Englisch

Look up the ids and codes other sevDesk tools need instead of guessing them: tax_rules (Steuerregeln for Update 2.0, e.g. 1 = steuerpflichtig, 11 = Kleinunternehmer §19), contact_categories (Kunde, Lieferant, …), status_codes (Entwurf, offen, bezahlt per document type), document_types (RE, AN, …), users (SevUser), countries (StaticCountry), units (Einheiten), payment_methods (Zahlungsarten) and receipt_guidance (Kontierungshilfe: which booking account (accountDatev) allows which tax rules and tax rates for expense or revenue receipts (Belege); filter with accountNumber, taxRuleId and receiptType, paged with limit/offset). Use query to filter by a case-insensitive substring of names, codes or ids.

kinderforderlichtax_rules | contact_categories | status_codes | document_types | users | countries | units | payment_methods | receipt_guidance
Which list to return.
queryoptionalstring
Case-insensitive substring filter on names, codes and ids, e.g. 'reverse'.
accountNumberoptionalstring
receipt_guidance only: exact account number in the chart of accounts.
taxRuleIdoptionalinteger
receipt_guidance only: accounts that allow this tax rule id.
receiptTypeoptionalexpense | revenue
receipt_guidance only: accounts for expense or revenue receipts.
limitoptionalinteger
receipt_guidance only: page size, 1–100 (default 25).
offsetoptionalinteger
receipt_guidance only: entries to skip; pass the previous nextOffset.

sevdesk_upload_request 

Datei-Upload anfordern

Lesenchanges state

Gibt dir auf einem entfernten Server einen Link, über den du eine Datei hochlädst, etwa einen Beleg oder eine E-Rechnung.

Für das Modell, auf Englisch

Let the user upload a file to this remote server, for the tools that take a file (sevdesk_voucher_create_draft, sevdesk_voucher_update_draft, sevdesk_einvoice_parse, sevdesk_voucher_import_einvoice): purpose receipt (Beleg, Belegbild: PDF, PNG or JPEG) or einvoice (E-Rechnung: XRechnung XML or ZUGFeRD/Factur-X PDF). Returns a link: give it to the user, who opens it in the browser they connected this server with and uploads the file there. Wait until the user says the upload is done, then pass uploadId as file. Each request expires (expiresAt). Optional count (1–10, default 1) reserves several files on one page: for count > 1, call sevdesk_uploads_list with batchId after the upload to match cleaned names to uploadIds. Uploaded files stay usable until expiry or successful attachment. Nothing is sent to sevDesk.

countoptionalinteger
Files to upload on one page (default 1). Every file uses one account slot.
purposeerforderlichreceipt | einvoice
receipt (PDF, PNG, JPEG) for a voucher draft, einvoice (XML, PDF) for sevdesk_einvoice_parse and sevdesk_voucher_import_einvoice.

sevdesk_uploads_list 

Dateien eines Uploads auflisten

Lesenread-onlyidempotent

Zeigt, welche Dateien eines Uploads mit mehreren Dateien schon da sind, mit Name, Größe und Prüfsumme.

Für das Modell, auf Englisch

Read the status of a batch from sevdesk_upload_request (count > 1). Returns one slot per requested file with its uploadId; uploaded slots include the cleaned file name, kind, size, SHA-256 and file expiry. Match names to the intended voucher drafts (Belege), then pass each uploaded slot's uploadId as file. Duplicate cleaned names need clarification; use size and SHA-256 to distinguish them. Pending slots can still be uploaded on the same page until the batch expiry. Only this connection's batches are visible. Reads no file bytes, creates no upload requests and changes nothing in sevDesk.

batchIderforderlichstring
batchId from sevdesk_upload_request.