officina.it Electronic Invoicing API
Fatturazione elettronica (sola lettura).
Fatturazione elettronica (sola lettura).
Every API here is available over the APIs.io API and to AI agents over MCP.
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
find_apisBrowse and filter every API in the catalog.get_api_artifactsOne API's artifacts, grouped by type.get_openapiThe primary OpenAPI for this API.find_similar_apisAPIs that look like this one.apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.resolveTurn a domain, URL or GitHub org into the provider it belongs to.find_cohortsEvery scored population of providers in the catalog.curl "https://apis.io/api/v1/apis/officina-it:officina-it-electronicinvoicing-api"
curl "https://apis.io/api/v1/apis?limit=25"
Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.
Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.
A second provider on the same verified email joins the account you already have.
openapi: 3.2.0
info:
title: officina.it Electronic Invoicing API
version: '2026-11-17'
description: 'API REST pubblica di officina.it: consente di leggere e scrivere i dati
della propria officina da altri programmi (gestionali contabili, sistemi
di flotta, strumenti di analisi). L''autenticazione avviene con una chiave API (`Authorization: Bearer
ofk_live_…`) generata da Impostazioni → Accesso API. Ogni chiave porta
permessi per risorsa e appartiene a una singola officina. Ogni richiesta deve indicare la revisione del contratto con l''header
`X-API-Version`. Il percorso `/v1` identifica la versione maggiore, che
cambia solo per modifiche non retrocompatibili; la revisione identifica
la data del contratto. La documentazione completa è su
https://officina.it/api. ## Revisioni
Ogni revisione dentro `/v1` è additiva: dichiarare una revisione più
vecchia continua a funzionare, semplicemente senza i campi più recenti. I campi e gli endpoint introdotti da una revisione riportano
`x-since: ''AAAA-MM-GG''` (schemi) o `x-changes` (operazioni). | Revisione | Novità | Azione |
|---|---|---|
| 2026-11-17 | Targa già presente. Il `409 license_plate_taken` di `POST /v1/vehicles` e `PATCH /v1/vehicles/{id}` porta `reason`: chi ha il veicolo che ha già la targa rispetto al cliente del veicolo che si sta salvando (`same_customer`, `no_customer`, `other_customer`); se più veicoli hanno la targa, `candidates` indica quello dello stesso cliente, poi uno senza cliente, poi il più vecchio, e `message` dice di chi è (entrambe le cose a ogni revisione dal 2026-10-22). Visura targa nell''app (`POST /v1/vehicles/license-plate-lookup`, non esposta nell''API pubblica): da questa revisione, se un veicolo attivo ha già la targa, risponde lo stesso `409` su `/license_plate` senza eseguire la visura; accetta `customer_id` (il cliente per cui si crea il veicolo) e `allow_duplicate_license: true` per eseguire comunque la visura. Le revisioni precedenti eseguono la visura come prima. | Opzionale |
| 2026-11-11 | Righe di schede lavoro, preventivi, fatture e scontrini: `article_code` è il codice della riga (scritto con la riga, non cambia se cambia l''articolo), assente se non ne ha, e `description` non lo contiene più. In `…/line-items/batch` `article_code` si invia sulle righe senza articolo (`""` lo toglie); sulle righe con `article_id` è quello dell''articolo, e in update un valore diverso da quello della riga risponde `422` su `/article_code`. Le revisioni precedenti vedono quello che vedevano: `article_code` è il codice attuale dell''articolo e, se l''officina stampa i codici, il codice salvato torna davanti a `description`; il loro `article_code` in scrittura è ignorato. | Opzionale |
| 2026-11-09 | Potenza motore (`engine_power_kw`) con al massimo due decimali, maggiore di 0 e al massimo 2000 (`422` su `/engine_power_kw` fuori dai limiti, a ogni revisione; le revisioni precedenti possono ancora inviare 0, salvato come vuoto). Le revisioni precedenti la ricevono arrotondata all''intero; un `PATCH` che rimanda il valore arrotondato non cambia quello salvato. | Opzionale |
| 2026-11-02 | Schede lavoro, preventivi, accettazioni e appuntamenti non riportano più `work_category_id` e `work_category_name`, le fatture `work_category_name`: si leggono `work_category_ids` / `work_categories` (`work_category_names` sulle fatture). In scrittura `work_category_id` risponde `422` su `/work_category_id`. Le righe collegate a un articolo riportano `work_category_names`, le categorie dell''articolo, e `article_code`, il suo codice (anche per le revisioni precedenti). Gli elenchi di clienti e veicoli riportano `custom_fields` come il dettaglio. L''etichetta del filtro categorie senza filtro diventa `Tutte` (era `tutte`). | Opzionale |
| 2026-10-31 | Ogni numero in scrittura segue le regole dei moduli web (`422` sul campo, con il messaggio del web). Righe di schede e preventivi: `quantity` e `unit_price` anche negativi, `unit_discount_rate` intero 0–100 (12.5 veniva salvato come 12). Importi arrotondati al centesimo; negativi, zero e decimali rifiutati dove il campo non li ammette.'
contact:
name: officina.it engineering
email: assistenza@officina.it
servers:
- url: https://api.officina.it
description: Production
- url: http://localhost:8084
description: Local development
security:
- PublicAPIKey: []
tags:
- name: ElectronicInvoicing
description: Fatturazione elettronica (sola lettura).
paths:
/v1/electronic-invoices:
parameters:
- $ref: '#/components/parameters/APIVersion'
get:
tags:
- ElectronicInvoicing
summary: List electronic invoices
x-summary-it: Elenca le fatture elettroniche emesse
x-scope: invoices.read
x-description-it: 'Le fatture elettroniche trasmesse allo SdI, con il loro stato
(`sent`, `delivered`, `rejected`).
L''intero gruppo è in sola lettura: la trasmissione allo SdI non è
esposta su questa API. Rientra nel permesso `invoices`, non ne ha uno
proprio.
'
operationId: electronicInvoiceList
description: '(attive) transmissions, newest first.
document_type (TD01/TD04/scontrino, ""=all), from/to/preset
(default last 12 months, echoed in date_filter).'
parameters:
- name: document_type
in: query
required: false
description: Filtra per tipo documento (es. `TD01`).
schema:
type: string
- name: from
in: query
required: false
description: Inizio dell'intervallo, formato `YYYY-MM-DD`.
schema:
type: string
- name: limit
in: query
required: false
description: Numero di risultati per pagina.
schema:
type: integer
- $ref: '#/components/parameters/DatePreset'
- name: q
in: query
required: false
description: Ricerca testuale libera.
schema:
type: string
- name: starting_after
in: query
required: false
description: Cursore opaco della pagina precedente. Va restituito invariato.
schema:
type: string
- name: status
in: query
required: false
description: Filtra per stato.
schema:
type: string
- name: to
in: query
required: false
description: Fine dell'intervallo, formato `YYYY-MM-DD`.
schema:
type: string
responses:
'200':
description: success
x-description-it: Le fatture elettroniche emesse.
headers:
X-API-Version:
$ref: '#/components/headers/APIVersion'
Deprecation:
$ref: '#/components/headers/Deprecation'
Sunset:
$ref: '#/components/headers/Sunset'
content:
application/json:
example:
object: list
data:
- object: electronic_invoice
id: 6b2f9d54-8c17-4a03-be91-2d7c5a4f8e30
status: delivered
document_type: TD01
invoice_id: 4412e7b9-0c35-4a18-92d7-5b6ea1f38c04
credit_note_id: null
receipt_number: null
seq_number: 214
customer_name: Mario Rossi
vehicle_name: Fiat Panda
total_after_discount: 285.36
date: '2026-07-16'
sent_at: '2026-07-16T10:35:00Z'
delivered_at: '2026-07-16T11:02:00Z'
rejected_at: null
created_at: '2026-07-16T10:35:00Z'
has_more: false
url: /v1/electronic-invoices
date_filter:
object: date_filter
preset: year
from: '2026-01-01'
to: '2026-12-31'
'401':
$ref: '#/components/responses/Unauthorized'
'402':
$ref: '#/components/responses/PaymentRequired'
'403':
$ref: '#/components/responses/Forbidden'
'422':
$ref: '#/components/responses/ValidationError'
'500':
$ref: '#/components/responses/InternalError'
/v1/electronic-invoices-incoming:
parameters:
- $ref: '#/components/parameters/APIVersion'
get:
tags:
- ElectronicInvoicing
summary: List electronic invoice incomings
x-summary-it: Elenca le fatture elettroniche ricevute
x-scope: invoices.read
x-description-it: 'Le fatture elettroniche ricevute dai fornitori. `expense_id` è
valorizzato quando la fattura è già stata registrata come spesa.
'
operationId: electronicInvoiceIncomingList
description: '— the passive supplier invoices synced from ACube.
FatturaPA code, ""=all), supplier_id, from/to/preset (default
last 12 months).'
parameters:
- name: document_type
in: query
required: false
description: Filtra per tipo documento (es. `TD01`).
schema:
type: string
- name: from
in: query
required: false
description: Inizio dell'intervallo, formato `YYYY-MM-DD`.
schema:
type: string
- name: limit
in: query
required: false
description: Numero di risultati per pagina.
schema:
type: integer
- $ref: '#/components/parameters/DatePreset'
- name: q
in: query
required: false
description: Ricerca testuale libera.
schema:
type: string
- name: starting_after
in: query
required: false
description: Cursore opaco della pagina precedente. Va restituito invariato.
schema:
type: string
- name: status
in: query
required: false
description: Filtra per stato.
schema:
type: string
- name: supplier_id
in: query
required: false
description: Filtra per fornitore.
schema:
type: string
- name: to
in: query
required: false
description: Fine dell'intervallo, formato `YYYY-MM-DD`.
schema:
type: string
responses:
'200':
description: success
x-description-it: Le fatture elettroniche ricevute.
headers:
X-API-Version:
$ref: '#/components/headers/APIVersion'
Deprecation:
$ref: '#/components/headers/Deprecation'
Sunset:
$ref: '#/components/headers/Sunset'
content:
application/json:
example:
object: list
data:
- object: electronic_invoice_incoming
id: 4c7e1b90-6d23-4a85-9f31-7b2c8e5d4a06
supplier_id: 6f2b8c14-9d70-4a35-b8e2-1c5f7a3d9e60
business_name: Ricambi Lombardia S.r.l.
invoice_number: 2026/1184
invoice_date: '2026-07-28'
total_amount: 512.4
status: delivered
document_type: TD01
expense_id: ba38f519-4c72-4e06-9d81-5a2c7f4b3e90
created_at: '2026-07-29T06:00:00Z'
has_more: false
url: /v1/electronic-invoices-incoming
date_filter:
object: date_filter
preset: year
from: '2026-01-01'
to: '2026-12-31'
'401':
$ref: '#/components/responses/Unauthorized'
'402':
$ref: '#/components/responses/PaymentRequired'
'403':
$ref: '#/components/responses/Forbidden'
'422':
$ref: '#/components/responses/ValidationError'
'500':
$ref: '#/components/responses/InternalError'
/v1/electronic-invoices-incoming/status-counts:
parameters:
- $ref: '#/components/parameters/APIVersion'
get:
tags:
- ElectronicInvoicing
summary: Electronic invoice incoming status counts
x-summary-it: Conta le fatture ricevute per stato
x-scope: invoices.read
x-description-it: 'Il numero di fatture ricevute in ciascuno stato, con gli stessi
filtri dell''elenco.
'
operationId: electronicInvoiceIncomingStatusCounts
description: '/v1/electronic-invoices-incoming/status-counts — the Passive tab counters
(Ricevute / In quarantena), same filters as the list minus status.'
parameters:
- name: document_type
in: query
required: false
description: Filtra per tipo documento (es. `TD01`).
schema:
type: string
- name: from
in: query
required: false
description: Inizio dell'intervallo, formato `YYYY-MM-DD`.
schema:
type: string
- $ref: '#/components/parameters/DatePreset'
- name: q
in: query
required: false
description: Ricerca testuale libera.
schema:
type: string
- name: supplier_id
in: query
required: false
description: Filtra per fornitore.
schema:
type: string
- name: to
in: query
required: false
description: Fine dell'intervallo, formato `YYYY-MM-DD`.
schema:
type: string
responses:
'200':
description: success
x-description-it: Il numero di fatture ricevute per stato.
headers:
X-API-Version:
$ref: '#/components/headers/APIVersion'
Deprecation:
$ref: '#/components/headers/Deprecation'
Sunset:
$ref: '#/components/headers/Sunset'
content:
application/json:
example:
object: electronic_invoice_incoming_status_counts
received: 214
quarantena: 0
date_filter:
object: date_filter
preset: year
from: '2026-01-01'
to: '2026-12-31'
'401':
$ref: '#/components/responses/Unauthorized'
'402':
$ref: '#/components/responses/PaymentRequired'
'403':
$ref: '#/components/responses/Forbidden'
'500':
$ref: '#/components/responses/InternalError'
/v1/electronic-invoices/status-counts:
parameters:
- $ref: '#/components/parameters/APIVersion'
get:
tags:
- ElectronicInvoicing
summary: Electronic invoice status counts
x-summary-it: Conta le fatture elettroniche per stato
x-scope: invoices.read
x-description-it: 'Il numero di fatture elettroniche in ciascuno stato, con gli stessi
filtri dell''elenco.
'
operationId: electronicInvoiceStatusCounts
description: '/v1/electronic-invoices/status-counts — the Attive tab counters. Uses the
same filters as the list minus status (so the counts stay stable while
switching tabs, web parity).'
parameters:
- name: document_type
in: query
required: false
description: Filtra per tipo documento (es. `TD01`).
schema:
type: string
- name: from
in: query
required: false
description: Inizio dell'intervallo, formato `YYYY-MM-DD`.
schema:
type: string
- $ref: '#/components/parameters/DatePreset'
- name: q
in: query
required: false
description: Ricerca testuale libera.
schema:
type: string
- name: to
in: query
required: false
description: Fine dell'intervallo, formato `YYYY-MM-DD`.
schema:
type: string
responses:
'200':
description: success
x-description-it: Il numero di fatture elettroniche per stato.
headers:
X-API-Version:
$ref: '#/components/headers/APIVersion'
Deprecation:
$ref: '#/components/headers/Deprecation'
Sunset:
$ref: '#/components/headers/Sunset'
content:
application/json:
example:
object: electronic_invoice_status_counts
sent: 3
delivered: 128
rejected: 1
date_filter:
object: date_filter
preset: year
from: '2026-01-01'
to: '2026-12-31'
'401':
$ref: '#/components/responses/Unauthorized'
'402':
$ref: '#/components/responses/PaymentRequired'
'403':
$ref: '#/components/responses/Forbidden'
'500':
$ref: '#/components/responses/InternalError'
components:
responses:
InternalError:
x-description-it: Errore imprevisto del server. Il dettaglio finisce nei log, non nella risposta.
description: Unhandled server error. Detail is logged, not exposed.
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorEnvelope'
example:
error:
type: https://api.officina.it/errors/internal_error
status: 500
code: internal_error
message: An unexpected error occurred. Please retry or contact support if it persists.
trace_id: abc-123
Forbidden:
x-description-it: La chiave non ha il permesso richiesto per questa operazione.
description: The authenticated user lacks the required permission.
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorEnvelope'
example:
error:
type: https://api.officina.it/errors/insufficient_scope
status: 403
code: insufficient_scope
message: La chiave non ha il permesso reports.read.
trace_id: abc-123
PaymentRequired:
x-description-it: Il piano non include l'accesso API, oppure non è attivo un abbonamento.
description: 'The company has no active subscription, or its plan does not
include API access. API access is included in the Business and
Illimitato plans.
'
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorEnvelope'
example:
error:
type: https://api.officina.it/errors/plan_upgrade_required
status: 402
code: plan_upgrade_required
message: Il piano attivo non include l'accesso API.
trace_id: abc-123
Unauthorized:
x-description-it: Chiave API mancante, non valida, revocata o scaduta.
description: Missing, malformed, expired, or wrong-audience bearer token.
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorEnvelope'
example:
error:
type: https://api.officina.it/errors/api_key_invalid
status: 401
code: api_key_invalid
message: Chiave API mancante, non valida, revocata o scaduta.
trace_id: abc-123
ValidationError:
x-description-it: 'Un campo della richiesta manca o non è valido: «param» indica quale.'
description: A request field is missing or invalid (fast-fail).
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorEnvelope'
example:
error:
type: https://api.officina.it/errors/parameter_invalid
status: 422
code: parameter_invalid
message: Email must be a valid email address.
param: /email
trace_id: abc-123
headers:
Deprecation:
description: 'Present only when the declared `X-API-Version` is older than the current
revision (RFC 9745): the revision still works but is deprecated. The value
is `@` + the Unix time of the current revision''s date. Comes with
`Link: <https://officina.it/api#deprecazione>; rel="deprecation"`.
'
schema:
type: string
example: '@1792022400'
Sunset:
description: 'Present only when the declared revision has a scheduled retirement
(RFC 8594): the HTTP date from which calls with it answer
`400 api_version_retired`. Announced at least 90 days ahead.
'
schema:
type: string
example: Wed, 20 Jan 2027 00:00:00 GMT
APIVersion:
description: Echoes the `X-API-Version` value the server processed.
schema:
type: string
schemas:
ErrorBody:
type: object
required:
- type
- status
- code
- message
description: 'Single error per response (fast-fail). Inspired by RFC 9457
Problem Details, wrapped in an `error` root key so success
and error bodies are visually distinguishable.
'
properties:
type:
type: string
format: uri
description: URI identifying the error class. Stable.
example: https://api.officina.it/errors/invalid_credentials
status:
type: integer
description: HTTP status code, mirrored from the response.
example: 401
code:
type: string
description: 'Stable machine-readable identifier (snake_case). Clients
branch on this, never on `message`.
'
example: invalid_credentials
message:
type: string
description: Human-readable English explanation.
param:
type: string
description: 'JSON Pointer (RFC 6901) to the offending request field.
Omitted when the error isn''t tied to a specific input
field (e.g. auth errors).
'
example: /email
trace_id:
type: string
description: Request trace ID for support correlation.
candidates:
type: array
items:
type: string
description: 'Only on `ambiguous_number`: the ids of every record the
number matched, to retrieve the right one by id.
'
reason:
type: string
enum:
- disabled
- fully_paid
- already_applied
- nothing_to_charge
- same_customer
- no_customer
- other_customer
x-since: '2026-10-06'
description: 'On `waste_disposal_not_applicable`: why the charge can''t be
applied to the document. On `license_plate_taken` (from
2026-11-17): who has the vehicle that already carries the plate,
seen from the customer of the vehicle being saved or looked up
(`same_customer`, `no_customer`, `other_customer`).
'
ErrorEnvelope:
type: object
required:
- error
properties:
error:
$ref: '#/components/schemas/ErrorBody'
parameters:
APIVersion:
name: X-API-Version
in: header
required: true
description: 'The client''s declared revision: the dated `/v1` contract this
client build was developed against. Floor-checked, not an
allowlist — must be a `YYYY-MM-DD` date and at least the minimum
supported revision (`api_version_retired` below it, meaning the
client build is too old); dates newer than the deployed server
are accepted and served with current behaviour. Clients should
also self-identify via the optional headers `X-Client`
(`officina-mobile/1.0.0 (ios)`), `X-App-Version` (`1.0.0`),
`X-Platform` (`ios`) and `X-OS-Version` (`18.5`) — all stamped
on the request logs (`client`, `app_version`, `platform`,
`os_version`) so revision adoption and platform-specific issues
are measurable before the floor is raised.
Current: `2026-07-15`. Minimum: `2026-07-15` (single pre-launch
revision). See the README registry and
`apihttp.CurrentAPIVersion` / `MinSupportedAPIVersion` for the
source of truth.
'
schema:
type: string
pattern: ^\d{4}-\d{2}-\d{2}$
example: '2026-07-15'
DatePreset:
name: preset
in: query
required: false
description: 'Date filter preset. Relative presets (`rel30`/`rel90`/`rel365`)
are resolved server-side from "now" and ignore `from`/`to`.
Absolute presets (`year`, `Q1`-`Q4`, `month`, `custom`) require
both `from` and `to`. `all` returns everything (no time bound).
Unknown values are rejected with 422.
Omitting `from`/`to`/`preset` gives the default window, the last
12 months. This tier is stateless: a selection applies to the
request that carries it and is never stored, so the same request
always covers the same range. The effective range is echoed back
in `date_filter`.
'
schema:
type: string
enum:
- rel30
- rel90
- rel365
- year
- Q1
- Q2
- Q3
- Q4
- month
- custom
- all
securitySchemes:
PublicAPIKey:
type: http
scheme: bearer
bearerFormat: APIKey
description: 'Long-lived API key minted from Impostazioni → Accesso API.
Format `ofk_live_<43 chars>` (`ofk_test_` outside production).
Send it as `Authorization: Bearer ofk_live_…`.
A key authorises a COMPANY and carries per-resource scopes;
a call outside its scopes answers 403 `insufficient_scope`.
Keys are shown once at creation and stored only as a digest.
'
x-doc-groups:
- slug: clienti
name: Clienti
tags:
- Customers
ready: true
description: Anagrafiche, documenti allegati e storico.
- slug: veicoli
name: Veicoli
tags:
- Vehicles
ready: true
description: Veicoli, marche e documenti allegati.
- slug: schede-lavoro
name: Schede lavoro
tags:
- Worksheets
- TimeTracking
ready: true
description: Schede, righe, pagamenti, stati di lavorazione e marcatempo.
- slug: preventivi
name: Preventivi
tags:
- Quotes
ready: true
description: Preventivi, righe e conversione in scheda lavoro.
- slug: fatture
name: Fatture
tags:
- Invoices
- CreditNotes
ready: true
description: Fatture, note di credito, pagamenti ed emissione.
- slug: scontrini
name: Scontrini
tags:
- Receipts
ready: true
description: Scontrini e relativi pagamenti.
- slug: accettazioni
name: Accettazioni
tags:
- Checkins
ready: true
description: Accettazioni, conversioni e documenti.
- slug: agenda
name: Agenda
tags:
- Calendar
ready: true
description: Calendari e appuntamenti.
- slug: magazzino
name: Magazzino
tags:
- Articles
ready: true
description: Articoli, listino manodopera e movimenti.
- slug: deposito-gomme
name: Deposito gomme
tags:
- TyreSets
ready: true
description: Pneumatici in deposito e passaggi di stato.
- slug: fornitori
name: Fornitori
tags:
- Suppliers
ready: true
description: Fornitori, ordini e documenti di trasporto.
- slug: spese
name: Spese
tags:
- Expenses
ready: true
description: Spese, pagamenti e categorie.
- slug: prima-nota
name: Prima nota
tags:
- CashBook
ready: true
description: Movimenti di cassa e conti finanziari.
- slug: impostazioni
name: Impostazioni
tags:
- Settings
- Cestino
ready: true
description: Dati azienda, aliquote IVA, listini, collaboratori, cestino.
- slug: fatturazione-elettronica
name: Fatturazione elettronica
tags:
- ElectronicInvoicing
ready: true
description: Fatture elettroniche emesse e ricevute, in sola lettura.
- slug: concessionaria
name: Concessionaria
tags:
- Dealership
ready: true
description: Stock veicoli, vendite e report.
- slug: report
name: Report
tags:
- Reports
ready: true
description: Statistiche e contatori della tua officina.
- slug: autenticazione
name: Autenticazione
tags:
- Authentication
ready: true
description: Verifica della chiave e dei permessi.