bimetricsEntwickler
Belege

Belegdaten berichtigen

Als Markdown ansehen

Benötigte Berechtigung:documents:write(Nicht festgeschriebene Belege ändern)

Echte Wirkung

Ändert Daten der Firma; wird atomar mit Idempotenzbeleg und Herkunft protokolliert.
patch/api/document/{id}

Kein Testversand aus der Dokumentation: Dieser Aufruf ist nicht als rein lesend gekennzeichnet. Nutze das Codebeispiel.

Ändert nur angegebene Geschäftsattribute bzw. Kategorie und Steuersatz bestehender Positionen. expectedVersion ist der fachliche Versionsdigest; ausgestellte Rechnungen und festgeschriebene Belege sind geschützt. Löst die normale Neubuchung und GoBD-Historie aus.

Benötigt einen Schlüssel mit der Berechtigung documents:write.

Authentifizierung

AuthentifizierungBearer <token>

Empfohlen: Authorization: Bearer bm_…. Der Schlüssel wird nur einmal angezeigt; nie in URLs, Logs oder Frontend-Code ablegen.

In: header

Pfadparameter

id*string

ID des Objekts in dieser Firma (UUID).

Formatuuid

Header-Parameter

Idempotency-Key*string

Stabiler Schlüssel für genau diese Änderung: 1–128 druckbare ASCII-Zeichen ohne Leerzeichen. Bei Wiederholungen denselben Schlüssel und unveränderten Inhalt senden; das Ergebnis wird nicht nochmals erzeugt.

Muster^[!-~]+$
Länge1 <= length <= 128

Request-Body

application/json

Business version and field patch

TypeScript-Typen

Typ request body für TypeScript.

Begrenzte Korrektur eines nicht festgeschriebenen Belegs.

Antworten

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl --fail-with-body "https://app.bimetrics.de/api/document/497f6eca-6276-4993-bfeb-53cbbbba6f08" \  -H "Authorization: Bearer $BIMETRICS_API_KEY" \  -H "Idempotency-Key: rechnung-2026-001" \  -H "Content-Type: application/json" \  -d '{}'
{  "document": {    "bookings": [      {        "account": 4930,        "accountContra": 71007,        "accountingModel": "SKR03",        "amount": "43.89",        "bookingDate": {          "day": 27,          "month": 8,          "year": 2026        },        "bookingFlags": "v19%",        "companyId": "9c388e1f-04a6-4770-80bd-66cd98dd00d5",        "createdAt": "2026-09-04T08:02:40Z",        "deletedAt": null,        "finalized": "2026-09-05T10:41:09Z",        "id": "f00b48c7-6eb3-4082-aba2-917944ac5f93",        "label": "Papierhaus Wendt KG, Kopierpapier A4 10 Pakete",        "performanceFrom": {          "day": 27,          "month": 8,          "year": 2026        },        "performanceTo": {          "day": 27,          "month": 8,          "year": 2026        },        "refBankTransactionId": null,        "refDocumentId": "a129ef0a-da5d-4204-804c-764d751bca95",        "refMatch": "d00419ed-ecab-4800-ad69-d482b73a6961",        "revertsAccountBookingId": null,        "updatedAt": "2026-09-05T10:41:09Z"      }    ],    "companyId": "9c388e1f-04a6-4770-80bd-66cd98dd00d5",    "contentSource": "auto",    "createdAt": "2026-08-28T06:15:03Z",    "deletedAt": null,    "deliveryDate": null,    "documentContract": null,    "documentContractId": null,    "documentSeries": null,    "documentSeriesId": null,    "dueDate": {      "day": 10,      "month": 9,      "year": 2026    },    "id": "a129ef0a-da5d-4204-804c-764d751bca95",    "importOrigin": "email",    "invoiceDate": {      "day": 27,      "month": 8,      "year": 2026    },    "invoiceNumber": "2026-5531",    "invoicePositions": [      {        "additionalInfo": {          "freeOfVat": false,          "reverseCharge": false        },        "category": "office_supplies",        "label": "Kopierpapier A4 10 Pakete",        "subPositions": null,        "total": 4389,        "vatPercentage": "19"      }    ],    "issuer": {      "address": "Bahnhofstraße 8, 24103 Kiel",      "customerNumber": 1007,      "iban": "DE02500105170137075030",      "name": "Papierhaus Wendt KG",      "taxId": "DE246813579"    },    "kind": "receipt",    "match": {      "amountOpen": 0,      "autoMatch": false,      "bankTransactions": [        {          "bankTransactionId": "78c4ff15-f2a0-4eae-945d-73a969adab4b",          "companyId": "9c388e1f-04a6-4770-80bd-66cd98dd00d5",          "createdAt": "2026-09-04T08:02:37Z",          "id": "b06c1337-d724-4854-bba8-d52bc6355c8b",          "matchId": "d00419ed-ecab-4800-ad69-d482b73a6961",          "updatedAt": "2026-09-04T08:02:37Z"        }      ],      "category": "payment",      "companyId": "9c388e1f-04a6-4770-80bd-66cd98dd00d5",      "createdAt": "2026-09-04T08:02:37Z",      "documents": [        {          "companyId": "9c388e1f-04a6-4770-80bd-66cd98dd00d5",          "createdAt": "2026-09-04T08:02:37Z",          "documentId": "a129ef0a-da5d-4204-804c-764d751bca95",          "id": "e1331e65-c539-4c84-9271-66cc20f52910",          "matchId": "d00419ed-ecab-4800-ad69-d482b73a6961",          "updatedAt": "2026-09-04T08:02:37Z"        }      ],      "id": "d00419ed-ecab-4800-ad69-d482b73a6961",      "matchingRule": {        "active": true,        "companyId": "9c388e1f-04a6-4770-80bd-66cd98dd00d5",        "createdAt": "2026-09-04T08:02:41Z",        "id": "5e0f6a4b-8d2c-4f7e-9b1a-3c6d2e8f4a71",        "updatedAt": "2026-09-04T08:02:41Z"      },      "matchingRuleId": "5e0f6a4b-8d2c-4f7e-9b1a-3c6d2e8f4a71",      "updatedAt": "2026-09-04T08:02:37Z"    },    "paymentTerms": "Der Betrag wird per SEPA-Lastschrift eingezogen.",    "performancePeriodFrom": null,    "performancePeriodTo": null,    "recipient": {      "address": "Mühlenkamp 31, 22303 Hamburg",      "customerNumber": null,      "iban": "",      "name": "Hansen & Kowalski Werbetechnik GmbH",      "taxId": "DE123456789"    },    "source": "",    "updatedAt": "2026-09-05T10:41:09Z",    "uploadDocument": {      "blob": {        "companyId": "9c388e1f-04a6-4770-80bd-66cd98dd00d5",        "createdAt": "2026-08-28T06:15:03Z",        "id": "138b7a6f-7e79-4040-bc64-3638e95d9682",        "length": 48213,        "mime": "application/pdf",        "originalFilename": "Rechnung_2026-5531.pdf",        "sha256": "a5a23fdf5e666babc92d877ccf80202609c25ae54b48095f0eaa02289012ca54",        "updatedAt": "2026-08-28T06:15:03Z"      },      "blobId": "138b7a6f-7e79-4040-bc64-3638e95d9682",      "creatorUserCompanyId": "53cd10a9-c864-4dc3-a777-9860d59efe6c",      "ocrFinishedAt": "2026-08-28T06:15:19Z",      "ocrStartedAt": "2026-08-28T06:15:04Z",      "ocrStatus": "success"    },    "uploadDocumentId": "08f65ded-eef9-4cdf-8954-ace8add6eb53",    "version": ""  },  "replayed": false,  "version": "0e8ca8e3db88d8d5b74c965d0e17598a5909240c88376e0b0a4a23e53ee9356f"}