Customers

List customers

Returns customers in the authenticated user's company, newest first. Search by name with ?q=; 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/customers

Request

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

Query parameters

qstring

Substring match on the customer's full name.

sort'date' | 'name' | 'vehicle' | 'spend'

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 customers.

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": "4c911f08-7713-4e83-bdf6-a0692a1b43fd",
      "documents": [
        {
          "url": "/v1/customers/0b6b…/documents/77c2…/download"
        }
      ]
    }
  ]
}

Changes

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