# Clients

Location and Chain Clients with comments, files, visit history and reviews

 - [POST /clients/{location_id}](https://developer.alteg.io/en/b2b-v1/openapi/clients/create_client.md)
 - [POST /locations/{location_id}/clients/search](https://developer.alteg.io/en/b2b-v1/openapi/clients/get_client_list.md): Filter and sort the client base, returning meta.total_count and only the requested fields for one page. If fields is omitted, each row contains only id. This endpoint cannot return tags/categories, cu
 - [GET /client/{location_id}/{id}](https://developer.alteg.io/en/b2b-v1/openapi/clients/get_client.md)
 - [PUT /client/{location_id}/{id}](https://developer.alteg.io/en/b2b-v1/openapi/clients/update_client.md)
 - [DELETE /client/{location_id}/{id}](https://developer.alteg.io/en/b2b-v1/openapi/clients/delete_client.md)
 - [POST /clients/{location_id}/bulk](https://developer.alteg.io/en/b2b-v1/openapi/clients/bulk_create_clients.md)
 - [GET /locations/{location_id}/clients/{client_id}/comments](https://developer.alteg.io/en/b2b-v1/openapi/clients/list_client_comments.md): Returns text comments and file upload history for one Location client. Requires `clients_access` and `client_comments_list_access`. File entries have `type: file` and a `files` array; text entries hav
 - [POST /locations/{location_id}/clients/{client_id}/comments](https://developer.alteg.io/en/b2b-v1/openapi/clients/create_client_comment.md): Creates a text comment for one Location client. Requires `clients_access` and `client_comments_add_access`. `text` must be nonblank and at most 255 characters. A URL in `text` is saved as text; it doe
 - [DELETE /locations/{location_id}/clients/{client_id}/comments/{comment_id}](https://developer.alteg.io/en/b2b-v1/openapi/clients/delete_client_comment.md): Deletes a client card comment with the corresponding own or other comment edit permission. It does not delete an uploaded file linked to a file comment.
 - [GET /locations/{location_id}/clients/files/{client_id}](https://developer.alteg.io/en/b2b-v1/openapi/clients/get_client_file_list.md): Lists uploaded files for one Location client. Requires `clients_access` and `client_files_list_access`. The `link` is a download route, while `full_link` is its absolute URL. A saved form URL in a com
 - [POST /locations/{location_id}/clients/files/{client_id}](https://developer.alteg.io/en/b2b-v1/openapi/clients/upload_client_file.md): Uploads one completed file as multipart form data under the field name `file`. Requires `clients_access` and `client_files_upload_access`. The Location client must match the path. Accepted filename ex
 - [DELETE /locations/{location_id}/clients/files/{client_id}/{file_id}](https://developer.alteg.io/en/b2b-v1/openapi/clients/delete_client_file.md): Deletes an uploaded file belonging to this Location client. Requires `clients_access` and `client_files_delete_access`. The client comment history is a separate resource; deleting a file does not turn
 - [POST /locations/{location_id}/clients/visits/search](https://developer.alteg.io/en/b2b-v1/openapi/clients/search_client_visits.md): Displays the client’s visit history.This method returns the client’s appointment and product purchase history, grouped by visit. Data is filtered based on visit status and paid status. The client is i
 - [GET /locations/{location_id}/client/{client_id}/loyalty](https://developer.alteg.io/en/b2b-v1/openapi/clients/get_client_loyalty_summary.md): Returns everything the client can pay with or earn from at the Location in one call: gift cards, Memberships, loyalty cards and referral program settings. Gift cards and Memberships are matched by the
 - [GET /comments/{location_id}](https://developer.alteg.io/en/b2b-v1/openapi/clients/get_comments.md): The comment object has the following fields: | Field | Type | Description | | --- | --- | --- | | id | number | Comment ID | | salon_id | number | location ID | | type | number | 1 - comment to the t
 - [POST /comments/{location_id}/{team_member_id}](https://developer.alteg.io/en/b2b-v1/openapi/clients/leave_comment.md)
 - [GET /chains/{chain_id}/clients](https://developer.alteg.io/en/b2b-v1/openapi/clients/get_chain_client_by_phone_number.md): + Parameter + group_id (required, number, `43877`) - ID of the location chain #### Client filtering + phone:'+13155550175' (optional, string) - Phone to filter clients
 - [GET /clients/{location_id}](https://developer.alteg.io/en/b2b-v1/openapi/clients/deprecated_get_client_list.md): Returns full client cards (including categories, custom fields, lifetime spent and paid amounts) in ascending client ID order. The default page is 1 and the default count is 20; count is limited to 30
