Invoices

Convert a draft fattura into a scontrino

Swaps a non-emessa, worksheet-backed draft invoice for a draft scontrino on the same scheda lavoro — the same conversion the web performs (POST /hx/private/invoices/{id}/convert-to-scontrino).

Payments move onto the new receipt; the source invoice is soft-deleted; worksheets.fiscal_document_type flips to scontrino. Line items are not copied (both documents project the worksheet).

No request body. Server re-validates every convertibility guard: draft only, worksheet-backed, no blocking e-invoice (past draft), no linked nota di credito, no ritenuta d'acconto.

Returns 422 when any guard fails. The invoice is gone after a successful conversion — navigate to the returned receipt.

post/v1/invoices/{id}/convert-to-scontrino

Request

  • Base URL: https://api.officina.it
  • URL: https://api.officina.it/v1/invoices/{id}/convert-to-scontrino
  • Auth: HTTP bearer

Response

The freshly created draft scontrino (full detail shape).

objectstring required

always "receipt"

idstring required
titlestring nullable required
commentsstring nullable required
internal_commentsstring nullable required

Optional — the electronic receipt PDF is delivered here.

emailstring nullable required
customer_idstring nullable required
vehicle_idstring nullable required
worksheet_idstring nullable required
sezionale_idstring nullable required
seq_numberinteger required

Progressive number. 0 until the receipt is issued.

typestring required

Derived: "draft" | "issued" | "voided".

statusstring required

"sale" | "return".

issued_atstring date-time nullable required
voided_atstring date-time nullable required
payment_methodstring nullable required
total_before_taxnumber required
total_taxnumber required
total_after_taxnumber required
total_discountnumber required
total_after_discountnumber required
total_paymentsnumber required
outstanding_paymentsnumber required
customer_namestring nullable required
vehicle_namestring nullable required
vehicle_licensestring nullable required
created_by_full_namestring required
sezionale_codestring nullable required

Latest electronic-receipt transmission (empty when none / module off).

e_receipt_statusstring nullable required
e_receipt_document_numberstring nullable required

ElectronicReceiptsEnabled — the company transmits scontrini to the AdE.

electronic_receipts_enabledboolean required
created_atstring date-time required
updated_atstring date-time required
deleted_atstring date-time nullable required

Detail responses only.

Changes

No recorded changes to this operation across all 1 revision of this API.