Invoices

List invoices

Returns invoices in the authenticated user's company, newest first. Filter by name (?q=), payment state (?payment_filter=pending|settled), fiscal status (?fiscal_status=draft|issued), or date range (?from=/?to=/?preset=). Paginate with cursor-based ?limit= + ?starting_after=.

The date window defaults to the last 12 months; set it with from/to/preset. The applied range is echoed in date_filter.

The cursor is opaque — clients MUST NOT parse it. Pass back the value verbatim. has_more drives the "load more" UI; a full page may still be the last page.

List rows OMIT line_items to keep payloads small. Fetch the detail endpoint for the full body.

get/v1/invoices

Request

  • Base URL: https://api.officina.it
  • URL: https://api.officina.it/v1/invoices
  • Auth: HTTP bearer

Query parameters

qstring

Substring match on invoice display fields.

payment_filter'pending' | 'settled'
fiscal_status'draft' | 'issued'
sort'date' | 'number' | 'customer' | 'vehicle' | 'total' | 'outstanding'

Sort key (default date = emission date, i.e. issued_at falling back to created_at). Named keys are mapped server-side to whitelisted columns.

direction'asc' | 'desc'

Sort direction (default desc).

fromstring date

Inclusive lower bound (YYYY-MM-DD).

tostring date

Inclusive upper bound (YYYY-MM-DD).

preset'rel30' | 'rel90' | 'rel365' | 'year' | 'Q1' | 'Q2' | 'Q3' | 'Q4' | 'month' | 'custom' | 'all'

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.

limitinteger
starting_afterstring

Opaque cursor from a prior response.

without_electronic_invoiceboolean

Solo le fatture senza controparte elettronica.

Response

Page of invoices (line_items omitted).

object'list' required

Polymorphic discriminator.

has_moreboolean required

True if more results exist beyond this page. Use this for the "load more" UI — data.length alone is unreliable because a full page may still be the last page.

next_starting_afterstring

Opaque cursor for the next page. Present (and non-empty) when has_more is true; omitted otherwise. Pass the value verbatim as ?starting_after= on the follow-up request. Clients MUST NOT parse it — today it encodes an offset, tomorrow it may encode a (created_at, id) tuple without a wire-visible change.

urlstring required

The request path that produced this list.

Example response

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

Changes

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