Vehicles

List vehicles

Returns vehicles in the authenticated user's company, newest first. Search by name with ?q=; filter to a single customer with ?customer_id=; paginate with cursor-based ?limit= + ?starting_after=.

The cursor is opaque — clients MUST NOT parse it. Pass back the value verbatim. Today it encodes an offset; tomorrow it may encode a (created_at, id) tuple without a client-visible change.

has_more is true when more results exist beyond this page. Drive the "load more" UI off this flag, not off data.length — the last page may still contain a full limit worth of results.

get/v1/vehicles

Request

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

Query parameters

qstring

Substring match on vehicle model / license.

customer_idstring

Restrict the result set to vehicles owned by a single customer. Useful for the "customer detail → vehicles" mobile screen.

sort'date' | 'customer' | 'vehicle' | 'license'

Sort key (default date = creation date). Named keys are mapped server-side to whitelisted columns.

direction'asc' | 'desc'

Sort direction (default desc).

limitinteger

Page size. Default 20, max 100. Out-of-range values clamp silently to the defaults — never error.

starting_afterstring

Opaque cursor from a prior response's next-page link. Pass verbatim. Omit on the first page.

Response

Page of vehicles.

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": "2200ab13-7c48-4d52-b6e9-0a4f81c27d3e",
      "documents": [
        {
          "url": "/v1/vehicles/8821f0ac-5d2b-41e7-9a10-6c3f2b7d4e55/documents/3b91ee0c-19b4-4f0a-9c2e-7d51a0c88e14/download"
        }
      ]
    }
  ]
}

Changes

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