Receipts: upload receipt
receipts_uploadUpload a receipt file to your customer account for automated bookkeeping processing. Supports invoices, credit notes, and various file formats.
Instructions
🟡 WRITE · creates data — Creates new records (receipts, transactions, postings, invoices, master data). Not idempotent — calling twice may create duplicates. upload receipt Upload a receipt into the specified customer account. The receipt will be processed by the BuchhaltungsButler technology. The response includes the filename (without extension) of the receipt as it is stored.
Note: max 10 requests per minute
Endpoint: POST /receipts/upload
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| date | No | The receipt's issuing date in format 'YYYY-MM-DD' (e.g. '2017-04-26'). If specified, the field will be validated. An empty string is not considered a valid date. NOTE: This parameter will be ignored when you upload an e-invoice! | |
| file | Yes | The receipt file as real file upload or as base64 encoded string. Accepted file types are: application/pdf, text/xml, application/xml, image/jpeg, image/png, image/bmp, image/tiff | |
| type | Yes | Can be 'invoice inbound' ("Eingangsrechnung"), 'invoice outbound' ("Ausgangsrechnung"), 'credit inbound' ("Eingangsgutschrift § 14 UStG"), 'credit outbound' ("Ausgangsgutschrift § 14 UStG"). | |
| amount | No | The total amount of the receipt, can be negative to indicate a reversed payment (e.g. -12.30). If specified, the field will be validated. '0.00' is not considered a valid receipt amount. NOTE: This parameter will be ignored when you upload an e-invoice! | |
| account | No | If the receipt shall directly be assigned to a payment account, you can specify its posting account number (e.g. '1200'). If specified, the account must exist as a payment account for the customer. '0' is not considered a valid account. | |
| api_key | No | Optional. The BB customer api_key to act on. Defaults to the BB_API_KEY configured on the server — only set this to target a different customer. | |
| currency | No | Has to be 'EUR' if specified. If specified, the field will be validated. An empty string is not considered a valid currency. NOTE: This parameter will be ignored when you upload an e-invoice! | |
| vat_rate | No | The receipt's vat rate (e.g. 19.00 or 0) - may also be an empty string to indicate a non-available or multiple vat rates. NOTE: This parameter will be ignored when you upload an e-invoice! | |
| file_name | No | The name of the file. NOTE: This is required for files sent as base64 encoded string and will be ignored for files sent as real upload. | |
| counterparty | No | The counterparty of the receipt, i.e. the invoicing party for type 'invoice inbound' or the recipient for type 'invoice outbound' (e.g. 'Peter Maier'). If specified, the field will be validated. An empty string is not considered a valid counterparty. NOTE: This parameter will be ignored when you upload an e-invoice! | |
| date_delivery | No | The delivery date in format 'YYYY-MM-DD' (e.g. '2017-04-26'). NOTE: Due to the DATEV compatibility, we cannot accept a delivery date that is after the receipt date! If specified, it will be validated. NOTE: This parameter will be ignored when you upload an e-invoice! | |
| invoice_number | No | The invoice number (e.g. '1231XU23') with a maximum length of 60 characters - may also be an empty string. NOTE: This parameter will be ignored when you upload an e-invoice! | |
| creditor_debtor | No | If the receipt shall directly be assigned to a creditor (for type 'invoice inbound') or debtor (for type 'invoice outbound') account, you can specify its posting account number (e.g. '70001'). If specified, creditors/debtors have to be activated for the customer, the creditor/debtor account must exist for the customer and it must be compatible with the specified receipt type. '0' is not considered a valid creditor/debtor. | |
| date_payment_due | No | The payment due date in format 'YYYY-MM-DD' (e.g. '2017-04-26'). NOTE: This parameter will be ignored when you upload an e-invoice! | |
| payment_reference | No | The payment reference id. If specified correctly, the uploaded receipt will match with the corresponding transaction. Currently we support Amazon order id, PayPal transaction id and Stripe transaction id. NOTE: This parameter will be ignored when you upload an e-invoice! | |
| link_to_receipt_id_by_customer | No | Has to be a valid id_by_customer of another receipt. If specified, both receipts will be assigned to a transaction if one of them is assigned manually. |