Customers

Retrieve a customer

Returns a single customer by id, scoped to the authenticated user's company. Unknown ids, ids from another company, and soft-deleted rows all return 404 — never 403, never 200 with deleted_at populated. This prevents cross-tenant and post-deletion existence leaks.

get/v1/customers/{id}

Request

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

Response

Customer found.

object'customer' required
idstring required
customer_typestring required

Tax-status discriminator (e.g. "private", "company").

full_namestring nullable
emailstring email nullable
phonestring nullable

Stored E.164 value, e.g. "+393331234567".

phone_dial_codestring nullable

phone split server-side for the edit form's dial-code selector (e.g. "+39"). Null when phone is null.

phone_nationalstring nullable

phone minus the dial code, for the edit form's national-number input. Null when phone is null.

addressstring nullable
citystring nullable
zip_codestring nullable
provincestring nullable
tax_idstring nullable

Partita IVA for an Italian customer; the VAT number without country prefix for a business elsewhere in the EU; free text otherwise. See "Partita IVA e numeri IVA UE".

fiscal_codestring nullable

Italian fiscal code (codice fiscale) for individuals.

pecstring nullable

Italian certified-email address for e-invoicing.

destination_codestring nullable

Italian SDI destination code for e-invoicing.

payment_methodstring nullable
commentsstring nullable
birthdaystring date-time nullable
last_vehicle_namestring nullable

Display string of the customer's most recent vehicle (e.g. "Fiat Panda"). Pre-computed on the entity for list-row rendering without a second request.

last_vehicle_licensestring nullable
total_spentnumber double

Lifetime spend (worksheet totals net of discounts), computed by the list query for row rendering. Money — render via the locale formatter; avoid arithmetic.

custom_fieldsobject nullable

Single-customer responses only (GET, POST, PATCH). Raw stored values keyed by custom field definition id (see CustomerCustomFieldValues for the stored shapes). Includes hidden fields. Omitted on lists.

next_appointmentstring date-time nullable
created_atstring date-time required
updated_atstring date-time required
deleted_atstring date-time nullable

Soft-deletion timestamp. Populated on the response from DELETE /v1/customers/{id}. Customers with a non-null deleted_at are not returned by list/detail endpoints — this field appears for the delete response only.

Example response

{
  "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.