officina.it Authentication API

Endpoints that exchange credentials for a mobile bearer JWT. None of these require auth — they issue it.

GitHub OpenAPI

Operations 1

GET /v1/whoami Describe the calling API key #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • 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.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/officina-it:officina-it-authentication-api"
All apis
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.

Get an API 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 Specification

officina-it-authentication-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: officina.it Authentication 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: Authentication
  description: 'Endpoints that exchange credentials for a mobile bearer JWT.

    None of these require auth — they issue it.'
paths:
  /v1/whoami:
    parameters:
    - $ref: '#/components/parameters/APIVersion'
    get:
      tags:
      - Authentication
      summary: Describe the calling API key
      x-summary-it: Verifica la chiave API
      x-description-it: 'Restituisce la chiave che sta effettuando la richiesta: nome,

        ambiente, permessi concessi e azienda a cui appartiene.


        È l''unico endpoint senza permesso richiesto: qualunque chiave valida

        può chiamarlo, ed è il modo più rapido per verificare che una chiave

        funzioni. Un `200` significa che la chiave è valida e che il piano

        attivo include l''accesso API; `401` che la chiave è sconosciuta,

        revocata o scaduta; `402` che il piano non include l''accesso API.

        '
      operationId: whoAmI
      description: 'Returns the key making the request: its name, environment and the

        scopes it was granted, plus the company it authorises.


        Deliberately unscoped — every integrator''s first call, and the

        cheapest answer to "is my key working". It reveals nothing the

        caller does not already hold.


        A 200 means the key is valid AND the company''s plan includes API

        access. 401 means the key is unknown, revoked or expired; 402

        means the plan does not include API access.'
      responses:
        '200':
          description: The calling key.
          x-description-it: La chiave che sta effettuando la richiesta.
          headers:
            X-API-Version:
              $ref: '#/components/headers/APIVersion'
            Deprecation:
              $ref: '#/components/headers/Deprecation'
            Sunset:
              $ref: '#/components/headers/Sunset'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WhoAmI'
              example:
                object: api_key
                id: 5f1a8c36-2e74-4b90-8d25-6c3f9a1e7b48
                name: Gestionale contabilità
                environment: live
                scopes:
                - customers.read
                - customers.write
                - invoices.read
                company:
                  object: company
                  id: 1f8c4e73-2a95-4b06-9d31-7e5a2c8b6f40
                  name: Officina Rossi S.r.l.
        '401':
          $ref: '#/components/responses/Unauthorized'
        '402':
          $ref: '#/components/responses/PaymentRequired'
        '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
    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
  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`).

            '
    WhoAmI:
      type: object
      description: 'The API key making the request, as returned by GET /v1/whoami.

        '
      required:
      - object
      - id
      - name
      - environment
      - scopes
      - company
      properties:
        object:
          type: string
          description: always "api_key"
        id:
          type: string
        name:
          type: string
          description: The label the workshop gave the key.
        environment:
          type: string
          enum:
          - live
          - test
          description: Matches the token prefix (ofk_live_ / ofk_test_).
        scopes:
          type: array
          description: Granted scopes, e.g. "customers.read".
          items:
            type: string
        company:
          type: object
          required:
          - object
          - id
          - name
          properties:
            object:
              type: string
              description: always "company"
            id:
              type: string
            name:
              type: string
    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'
  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.