# Clients

The client base of a Location. Appointments can reference an existing client, resolve an
inline client attach-only, or be clientless. Contact fields are PII and require the
`clients:read_contact` scope on top of `clients:read`.

 - [GET /locations/{location_id}/clients](https://developer.alteg.io/en/b2b-v3/openapi/clients/listclients.md): Searches the client base of the Location. Exact `phone` and `email` contact searches require `clients:read_contact` plus the subject contact permission; without that scope the API returns `403 missing
 - [POST /locations/{location_id}/clients](https://developer.alteg.io/en/b2b-v3/openapi/clients/createclient.md): Creates a client. `name` and `phone` are required. The phone number is deduplicated within the Location: if another (non-deleted) client already owns it, the request fails with `422 phone_taken`. That
 - [GET /locations/{location_id}/clients/{client_id}](https://developer.alteg.io/en/b2b-v3/openapi/clients/getclient.md): Returns a single client. Contact fields (`phone`, `email`, `additional_phone`) require `clients:read_contact` plus the subject's contact permission — otherwise they are returned as `null` and listed i
 - [PATCH /locations/{location_id}/clients/{client_id}](https://developer.alteg.io/en/b2b-v3/openapi/clients/updateclient.md): Partially updates a client with a merge-patch body. Requires `If-Match`. Changing the phone to a number owned by another client fails with `422 phone_taken` — the same `clients:write` signal as on cre
 - [DELETE /locations/{location_id}/clients/{client_id}](https://developer.alteg.io/en/b2b-v3/openapi/clients/deleteclient.md): Deletes a client (soft delete). A client with the same phone can be created again afterwards. Requires `If-Match` with the version last seen.
