Invoices

Retrieve a invoice by number

Returns the invoice carrying number number in year year (the year it was issued in) — the number shown in the app, e.g. 12/2026. Numbers repeat across sezionali: pass sezionale_id (a sezionale id, or default for the series without one) to search one series; without it every series is searched.

The response is identical to GET /v1/invoices/{id}. A number that matches more than one document (repeated in historical data) returns 409 ambiguous_number with their ids in candidates.

get/v1/invoices/by-number/{year}/{number}

Request

  • Base URL: https://api.officina.it
  • URL: https://api.officina.it/v1/invoices/by-number/{year}/{number}
  • Auth: HTTP bearer

Response

The invoice, exactly as retrieving it by id returns it.

object'invoice' required
idstring required
status'draft' | 'issued' required

Derived from issued_at. Soft-deleted invoices 404 before reaching the client — "deleted" is never emitted.

titlestring nullable
commentsstring nullable
internal_commentsstring nullable
payment_methodstring required
payment_conditionstring required
payment_due_atstring date-time required
vat_exigibilitystring required
sezionale_idstring nullable
pa_document_typestring nullable
pa_document_numberstring nullable
pa_document_datestring date-time nullable
pa_cigstring nullable
pa_cupstring nullable
customer_idstring required
vehicle_idstring nullable
worksheet_idstring nullable
seq_numberinteger required

Per-company monotonic invoice number. 0 on drafts; assigned atomically at issuance.

total_before_taxnumber double required

Money. Float64 — clients render via the workshop locale formatter; avoid arithmetic.

total_taxnumber double required
total_after_taxnumber double required
total_discountnumber double required
total_after_discountnumber double required
total_paymentsnumber double required
outstanding_paymentsnumber double required
customer_namestring required
vehicle_namestring nullable
vehicle_licensestring nullable
created_by_full_namestring required
sezionale_codestring nullable
work_category_namestring nullable
work_category_namesstring[] required

Names of the linked worksheet's work categories, in order. [] when the invoice has no worksheet or the worksheet has none. work_category_name is the first one. Available since revision 2026-10-03.

sdi_statusstring required

Italian SDI e-invoice lifecycle status. Empty string when no e-invoice exists for this invoice. Possible non-empty values: "sent", "rejected", "pending_normal", "pending_warning", "pending_late".

created_atstring date-time required
updated_atstring date-time required
issued_atstring date-time nullable

Populated once the invoice is issued.

deleted_atstring date-time nullable

Soft-deletion timestamp. Populated only on the response from DELETE /v1/invoices/{id}.

Example response

{
  "id": "4412e7b9-0c35-4a18-92d7-5b6ea1f38c04"
}

Changes

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