Issue an invoice (fiscal, irreversible)
oblio_issue_invoiceISSUE a real INVOICE. This is a legal fiscal document: it takes the next number in the series at once, there is no draft state, it cannot be edited, and it can only be cancelled afterwards (it may also be sent to ANAF e-Factura / SPV, automatically if the account is set up so). Needs confirm: true, an idempotency_key, and the user's explicit approval of the exact client, lines, totals and series. Optionally base it on a proforma or notice (reference_document), record the payment at once (collect) or set the delivery date. Not retried: if the reply is an error, look in Oblio before repeating. Oblio never e-mails the client from this tool. POST /api/docs/invoice.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cif | Yes | CIF of YOUR company in Oblio (from oblio_list_companies), for example RO37311090. | |
| client | No | The client. Required unless reference_document is given (then Oblio takes it from the referenced document). | |
| collect | No | Record the payment together with the invoice. | |
| confirm | No | Must be true. Set it only after the user has confirmed this exact action in this conversation. | |
| currency | No | Document currency (default "RON"). | |
| due_date | No | Due date yyyy-mm-dd. | |
| language | No | Document language code from oblio_list_languages (default "RO"). | |
| mentions | No | Mentions printed on the document. | |
| products | No | 1-200 lines: products/services (name + price) or discounts (name + discount). Required unless reference_document is given. | |
| precision | No | Decimals, 2 to 4 (default 2). | |
| use_stock | No | Take the goods out of stock (only with stock enabled). | |
| issue_date | No | Issue date yyyy-mm-dd (default today). | |
| issuer_name | No | Prepared by (intocmit de). | |
| series_name | Yes | Document series name (from oblio_list_series), for example FCT. | |
| collect_date | No | Collection date yyyy-mm-dd. | |
| order_number | No | Order number (BT-13). | |
| work_station | No | Work point (only with stock enabled; default "Sediu"). | |
| delivery_date | No | Delivery date yyyy-mm-dd. | |
| exchange_rate | No | Exchange rate for a foreign-currency document (default: the company's setting). | |
| internal_note | No | Internal note, not visible to the client. | |
| idempotency_key | Yes | REQUIRED unique key for this invoice (for example a UUID) so Oblio drops a duplicate of the same request. | |
| reference_document | No | Base the invoice on a proforma or notice, or reverse an invoice. |