Receipts: add a receipt
receipts_addAdd a receipt to a customer account without a file. Specify type, counterparty, invoice number, date, amount, and currency to create the record.
Instructions
๐ก WRITE ยท creates data โ Creates new records (receipts, transactions, postings, invoices, master data). Not idempotent โ calling twice may create duplicates. add a receipt Add a receipt into the specified customer account. NOTE: Use this endpoint, to add a receipt without a file!
Endpoint: POST /receipts/add
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| date | Yes | The receipt's issuing date in format 'YYYY-MM-DD' (e.g. '2017-04-26'). An empty string is not considered a valid date. | |
| type | Yes | Can be 'invoice inbound' ("Eingangsrechnung"), 'invoice outbound' ("Ausgangsrechnung"), 'credit inbound' ("Eingangsgutschrift ยง 14 UStG"), 'credit outbound' ("Ausgangsgutschrift ยง 14 UStG"). | |
| amount | Yes | The total amount of the receipt, can be negative to indicate a reversed payment (e.g. -12.30). '0.00' is not considered a valid receipt amount. | |
| 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 | Yes | At the moment we accept USD, GBP and CHF. An empty string is not considered a valid currency. | |
| 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 | |
| counterparty | Yes | 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'). An empty string is not considered a valid counterparty. | |
| 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. | |
| invoice_number | Yes | The invoice number (e.g. '1231XU23') with a maximum length of 60 characters - may also be an empty string. | |
| 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'). | |
| payment_reference | No | The payment reference id. If specified correctly, the uploaded receipt will match with the corresponding transaction. | |
| 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. |