Postings: add receipt posting
postings_add_receiptAdd postings to a receipt by providing accounts, VATs, amounts, and texts. Requires creditor or debtor posting to be activated for the receipt.
Instructions
🟡 WRITE · creates data — Creates new records (receipts, transactions, postings, invoices, master data). Not idempotent — calling twice may create duplicates. add receipt posting Add postings for a specified receipt. Important: Receipt postings are only available if creditor or debtor posting is activated!
IMPORTANT: If you add postings to a receipt with foreign currency, you have to get that receipt (/receipts/get/id_by_customer) and find the calculated amount before performing this request.
Endpoint: POST /postings/add/receipt
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| vats | Yes | An array of vats. Usage: "vats" : ['vat of posting 1', 'vat of posting 2']. Possible vats: - 0_none ('keine Ust.') - 19_vat ('19% Ust.') - 7_vat ('7% Ust.') - 19_pre ('19% Vst.') - 7_pre ('7% Vst.') - 19_both_1 ('§13b 19% USt./VSt.') - 19_both_2 ('I.g.E. 19% USt./VSt.') - 7_both ('I.g.E. 7% USt./VSt.') - 19_both_1_no_pre ('§13b 19/16% USt.') - 19_both_2_no_pre ('i.g.E. 19/16% USt.') - 7_both_no_pre ('i.g.E. 7/5% USt.') - 19_pre_app ('19/16% Aufz. VSt.') - 7_pre_app ('7/5% Aufz. VSt.') - 19_both_app_1 ('§13b 19/16% USt./Aufz. VSt.') - 19_both_app_2 ('i.g.E. 19/16% USt./Aufz. VSt.') - 7_both_app ('i.g.E. 7/5% USt./Aufz. VSt.') | |
| debtor | Yes | The number of the debtor. IMPORTANT: The field is only required, if you are posting to an outgoing invoice and if debtor posting is activated. If specified, the field will be validated. | |
| amounts | Yes | An array of amounts. Usage: "amounts" : ['amount of posting 1', 'amount of posting 2'] Amount must be in format 0000.00 | |
| 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. | |
| creditor | Yes | The number of the creditor. IMPORTANT: The field is only required, if you are posting to an incoming invoice and if creditor posting is activated. If specified, the field will be validated. | |
| postingtexts | Yes | An array of posting texts. Usage: "postingtexts" : ['text of posting 1', 'text of posting 2'] | |
| cost_locations | No | An array of cost_locations. Usage: "cost_locations" : ['cost_location of posting 1', 'cost_location of posting 2']. If specified, the field will be validated. | |
| postingaccounts | Yes | An array of postingaccount numbers. Usage: "postingaccounts" : ['number of posting 1', 'number of posting 2'] | |
| cost_locations_two | No | An array of cost_locations_two. Usage: "cost_locations_two" : ['cost_location_two of posting 1', 'cost_location_two of posting 2']. If specified, the field will be validated. | |
| receipt_id_by_customer | Yes | The id_by_customer of the receipt. |