Create a customer
Creates a customer in the authenticated user's company. company_id and created_by are always derived from the bearer token — neither can be set from the body.
Required: customer_type. Everything else is optional.
Returns the fully materialized customer (re-fetched so computed fields like last_vehicle_* and next_appointment populate consistently with GET).
Foreign-key references in the body (price_list_id, etc.) must resolve to resources owned by the authenticated user's company. Unreachable refs return 422 parameter_invalid pointing at the offending field.
custom_fields carries custom field values keyed by the ids from GET /v1/customer-field-settings (see CustomerCustomFieldValues).
As on the web, creating a customer schedules its agenda events: the birthday (when birthday is set and the company keeps birthday events on) and each opted-in custom date field.
Request
- Base URL: https://api.officina.it
- URL: https://api.officina.it/v1/customers
- Auth: HTTP bearer
Request body
Example request
{
"custom_fields": {
"cf_4c1e7a": "Idraulico",
"cf_9b20d3": "2027-03-15"
}
}Response
Customer created.
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.