Beleg hochladen
Benötigte Berechtigung:upload(Belege hochladen)
Echte Wirkung
/api/document/Kein Testversand aus der Dokumentation: Jeder Aufruf legt einen echten Beleg an. Nutze das Codebeispiel mit einer Datei, die wirklich in die Firma gehört.
Lädt genau eine Datei als neuen Beleg hoch und stößt die Erkennung an. Die Antwort ist ein Array mit genau einem Beleg. Das Formularfeld bestimmt die Belegart: invoice[] Ausgangsrechnung, receipt[] Eingangsbeleg, auto[] Erkennung durch bimetrics. Unterstützt werden PDF, PNG, JPEG und XML-E-Rechnungen. X-Upload-Request-Id macht Wiederholungen sicher: Dieselbe ID mit identischer Datei, identischem Dateinamen und Feld liefert denselben Beleg, ohne weiteres Kontingent; dieselbe ID mit anderem Inhalt ergibt 409 UploadRequestConflict. Für jeden neuen Beleg eine neue ID verwenden. Ist das Belegkontingent ausgeschöpft, wird der Beleg trotzdem gespeichert (uploadDocument.ocrStatus = quota_paused); dann keinen weiteren Upload mit neuer ID starten.
Benötigt einen Schlüssel mit der Berechtigung upload.
Empfohlen: Authorization: Bearer bm_…. Der Schlüssel wird nur einmal angezeigt; nie in URLs, Logs oder Frontend-Code ablegen.
In: header
Header-Parameter
Idempotenzschlüssel des Uploads: 1–128 druckbare ASCII-Zeichen ohne Leerzeichen. Für jeden neuen Beleg eine neue ID, bei Wiederholungen dieselbe.
^[!-~]+$1 <= length <= 128Request-Body
multipart/form-data
TypeScript-Typen
Typ request body für TypeScript.
Genau eine Datei (höchstens 30 MiB) in genau einem der Felder; weitere Felder sind nicht erlaubt.
1 <= properties <= 1Antworten
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://app.bimetrics.de/api/document/" \ -H "X-Upload-Request-Id: rechnung-2026-001"[ { "bookings": [ { "account": 0, "accountContra": 0, "accountingModel": "string", "amount": "string", "bookingDate": { "day": 0, "month": 0, "year": 0 }, "bookingFlags": "string", "companyId": "8bb73d03-06b4-47c7-80c7-59301f770eda", "createdAt": "2019-08-24T14:15:22Z", "finalized": "2019-08-24T14:15:22Z", "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "label": "string", "performanceFrom": { "day": 0, "month": 0, "year": 0 }, "performanceTo": { "day": 0, "month": 0, "year": 0 }, "refBankTransactionId": "346263b0-7db5-4151-a8e5-d641131746c9", "refDocumentId": "3d1faf84-ac8e-4e99-a7c1-22b08ddf0438", "refMatch": "38e85d86-d2e1-4bcd-b48f-bc18237ab5d5", "revertsAccountBookingId": "ee3e3dd1-4b8c-4397-8f0f-709439f9c5a7", "updatedAt": "2019-08-24T14:15:22Z" } ], "cashDiscount": { "basisAmount": 0, "days": 0, "deadline": { "day": 0, "month": 0, "year": 0 }, "discountAmount": 0, "payableAmount": 0, "percent": "string", "taxBreakdown": [ { "basisAmount": 0, "netAmount": 0, "rate": "string", "taxAmount": 0, "taxCategory": "string" } ] }, "companyId": "8bb73d03-06b4-47c7-80c7-59301f770eda", "contentSource": "string", "createdAt": "2019-08-24T14:15:22Z", "deliveryDate": { "day": 0, "month": 0, "year": 0 }, "documentContract": { "collectionNumber": "string", "companyId": "8bb73d03-06b4-47c7-80c7-59301f770eda", "createdAt": "2019-08-24T14:15:22Z", "documentContractRepetitionFixed": { "end": { "day": 0, "month": 0, "year": 0 }, "repetitionPeriodDays": 0, "repetitionPeriodMonth": 0, "start": { "day": 0, "month": 0, "year": 0 } }, "friendlyName": "string", "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "issuer": { "address": "string", "customerNumber": 0, "iban": "string", "name": "string", "taxId": "string" }, "kind": "string", "positionTemplate": [ { "additionalInfo": { "freeOfVat": true, "reverseCharge": true }, "category": "string", "label": "string", "totalFixed": 0, "totalRatio": "string", "vatPercentage": "string" } ], "recipient": { "address": "string", "customerNumber": 0, "iban": "string", "name": "string", "taxId": "string" }, "updatedAt": "2019-08-24T14:15:22Z", "uploadDocument": { "blob": { "companyId": "8bb73d03-06b4-47c7-80c7-59301f770eda", "createdAt": "2019-08-24T14:15:22Z", "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "length": 0, "mime": "string", "originalFilename": "string", "sha256": "string", "updatedAt": "2019-08-24T14:15:22Z" }, "blobId": "0f49f85e-7d44-46b5-bdff-ecf86c7fc0da", "creatorUserCompanyId": "715b8f75-5575-49cc-a878-f403a18527bc", "ocrFinishedAt": "2019-08-24T14:15:22Z", "ocrStartedAt": "2019-08-24T14:15:22Z", "ocrStatus": "pending" }, "uploadDocumentId": "0563a29e-ac7b-4716-94d1-4b8c1c602bf4" }, "documentContractId": "e0575985-80ff-4ac7-bb18-d1299e317329", "documentSeries": { "collectionNumber": "string", "companyId": "8bb73d03-06b4-47c7-80c7-59301f770eda", "createdAt": "2019-08-24T14:15:22Z", "friendlyName": "string", "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "issuer": { "address": "string", "customerNumber": 0, "iban": "string", "name": "string", "taxId": "string" }, "kind": "string", "positionTemplate": [ { "additionalInfo": { "freeOfVat": true, "reverseCharge": true }, "category": "string", "label": "string", "totalFixed": 0, "totalRatio": "string", "vatPercentage": "string" } ], "recipient": { "address": "string", "customerNumber": 0, "iban": "string", "name": "string", "taxId": "string" }, "systemTemplateId": "5b734280-f515-48db-96c2-cb686c2f5c6b", "updatedAt": "2019-08-24T14:15:22Z", "uploadDocument": { "blob": { "companyId": "8bb73d03-06b4-47c7-80c7-59301f770eda", "createdAt": "2019-08-24T14:15:22Z", "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "length": 0, "mime": "string", "originalFilename": "string", "sha256": "string", "updatedAt": "2019-08-24T14:15:22Z" }, "blobId": "0f49f85e-7d44-46b5-bdff-ecf86c7fc0da", "creatorUserCompanyId": "715b8f75-5575-49cc-a878-f403a18527bc", "ocrFinishedAt": "2019-08-24T14:15:22Z", "ocrStartedAt": "2019-08-24T14:15:22Z", "ocrStatus": "pending" }, "uploadDocumentId": "0563a29e-ac7b-4716-94d1-4b8c1c602bf4" }, "documentSeriesId": "0722c082-9704-4bf6-a904-28d269c6835c", "dueDate": { "day": 0, "month": 0, "year": 0 }, "duplicate": true, "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "importOrigin": "string", "invoiceDate": { "day": 0, "month": 0, "year": 0 }, "invoiceNumber": "string", "invoicePositions": [ { "additionalInfo": { "freeOfVat": true, "reverseCharge": true }, "category": "string", "label": "string", "subPositions": [ { "label": "string", "total": 0 } ], "total": 0, "vatPercentage": "string" } ], "issuer": { "address": "string", "customerNumber": 0, "iban": "string", "name": "string", "taxId": "string" }, "kind": "invoice", "match": { "amountOpen": 0, "autoMatch": true, "bankTransactions": [ { "bankTransactionId": "e64f7265-f5a1-4da6-baa0-5224e33ba98a", "companyId": "8bb73d03-06b4-47c7-80c7-59301f770eda", "createdAt": "2019-08-24T14:15:22Z", "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "matchId": "685569fd-95e6-4335-9aa5-fdd22382bd9e", "updatedAt": "2019-08-24T14:15:22Z" } ], "cashDiscount": { "basisAmount": 0, "days": 0, "deadline": { "day": 0, "month": 0, "year": 0 }, "discountAmount": 0, "payableAmount": 0, "percent": "string", "taxBreakdown": [ { "basisAmount": 0, "netAmount": 0, "rate": "string", "taxAmount": 0, "taxCategory": "string" } ] }, "category": "string", "companyId": "8bb73d03-06b4-47c7-80c7-59301f770eda", "createdAt": "2019-08-24T14:15:22Z", "documents": [ { "companyId": "8bb73d03-06b4-47c7-80c7-59301f770eda", "createdAt": "2019-08-24T14:15:22Z", "documentId": "4704590c-004e-410d-adf7-acb7ca0a7052", "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "matchId": "685569fd-95e6-4335-9aa5-fdd22382bd9e", "updatedAt": "2019-08-24T14:15:22Z" } ], "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "matchingRule": { "active": true, "companyId": "8bb73d03-06b4-47c7-80c7-59301f770eda", "createdAt": "2019-08-24T14:15:22Z", "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "updatedAt": "2019-08-24T14:15:22Z" }, "matchingRuleId": "cb548572-3303-4eed-855a-a8cd42c54014", "updatedAt": "2019-08-24T14:15:22Z" }, "paymentTerms": "string", "performancePeriodFrom": { "day": 0, "month": 0, "year": 0 }, "performancePeriodTo": { "day": 0, "month": 0, "year": 0 }, "recipient": { "address": "string", "customerNumber": 0, "iban": "string", "name": "string", "taxId": "string" }, "updatedAt": "2019-08-24T14:15:22Z", "uploadDocument": { "blob": { "companyId": "8bb73d03-06b4-47c7-80c7-59301f770eda", "createdAt": "2019-08-24T14:15:22Z", "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "length": 0, "mime": "string", "originalFilename": "string", "sha256": "string", "updatedAt": "2019-08-24T14:15:22Z" }, "blobId": "0f49f85e-7d44-46b5-bdff-ecf86c7fc0da", "creatorUserCompanyId": "715b8f75-5575-49cc-a878-f403a18527bc", "ocrFinishedAt": "2019-08-24T14:15:22Z", "ocrStartedAt": "2019-08-24T14:15:22Z", "ocrStatus": "pending" }, "uploadDocumentId": "0563a29e-ac7b-4716-94d1-4b8c1c602bf4" }]Endpunkte
Alle Endpunkte der bimetrics API mit Parametern, Antworten und Playground.
Belege suchen POST
Sucht Belege der Firma mit einem Filter und liefert eine Seite der Treffer (`items`) mit der Gesamtzahl (`total`). Ohne Filter (`{}`) liefert die Route alle Belege, höchstens 1000 je Seite. Benötigt einen Schlüssel mit der Berechtigung `read`.