beel_create_simplified_exchange
Issues a full standard invoice that replaces one or more simplified invoices when a customer requests their tax details on it, voiding the originals as exchanged.
Instructions
Issues a full invoice in exchange for one or more simplified invoices already issued, when the customer asks for an invoice with their details. It is not a corrective invoice: it documents the same operations again with the recipient identified (RD 1619/2012, art. 15.6).
What it issues: a
STANDARDinvoice with the lines of the simplified invoices and therecipientsent, numbered inseries_idor in the company's default standard series. It lists the invoices it replaces inreplaced_invoice_ids, and the AEAT records it as F3, identifying them.The simplified invoices: each becomes
VOIDEDwithvoid_causeEXCHANGED, in the same act: their records are not cancelled, the exchange replaces them. They must be simplified invoices (422 EXCHANGE_REQUIRES_SIMPLIFIED), issued and not voided, exchanged or corrected before (422 SIMPLIFIED_NOT_EXCHANGEABLE).The exchange invoice cannot be voided afterwards (
422 EXCHANGE_INVOICE_NOT_VOIDABLE); if it has an error, it is corrected with a corrective invoice.VeriFactu: while the exchange cannot yet be recorded as F3, an exchange that would be submitted to the AEAT fails with
422 SIMPLIFIED_EXCHANGE_NOT_RECORDABLEand nothing is issued.
Endpoint: POST /v1/companies/{company_id}/invoices/simplified-exchanges
⚠️ Read before calling:
Fiscal rules, domains simplified, records: beel_rules_list with domain, or resource beel://guardrails/.
How to tell, before issuing, whether a NIF can issue, and what each blocker means. (resource: beel://guardrails/verifactu-gates)
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| body | Yes | ||
| company_id | Yes | Unique identifier (UUID) of the company the operation acts on — its identifier, not its NIF. It is the only source of context: the account that owns it is derived from it, and the `BeeL-Active-Company` header plays no part. A company you do not reach answers `403`, and so does a company that does not exist, so the existence of a company in another account is never disclosed. | |
| idempotency_key | No | Optional idempotency key for this operation. Omit it and one is derived from the request itself, which makes a blind retry safe but also collapses a SECOND, deliberately identical operation into the first for 24 hours. Set it — to an order id, or anything unique per intended operation — whenever you mean to create something that may look identical to what you just created. |