- Search by customer history
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 identified using either the client_id or client_phone parameter. All other parameters are optional. Results are sorted by visit date and paginated in batches of 25 items. If multiple visits share the same date as the last item on the page, they will be included on the current page to ensure complete grouping. To retrieve the next page, use the from and to values provided in the meta field of the current response.
Visit payment status:not_paid - the visit is not paid, no payments were made for the visit;paid_not_full - the visit is partially paid;paid_full - the visit is paid in full, there is no overpayment;paid_over - there is an overpayment for the visit.
If the filter by payment status is not required, then an empty array [] must be passed.
- Mock serverhttps://developer.alteg.io/_mock/en/b2b-v1/openapi/locations/{location_id}/clients/visits/search
- Productionhttps://api.alteg.io/api/v1/locations/{location_id}/clients/visits/search
curl -i -X POST \
https://developer.alteg.io/_mock/en/b2b-v1/openapi/locations/123/clients/visits/search \
-H 'Accept: application/vnd.api.v2+json' \
-H 'Authorization: Bearer <YOUR_Bearer {PartnerToken}, User {UserToken}_HERE>' \
-H 'Content-Type: application/json' \
-d '{
"client_id": 123,
"client_phone": 13155550184,
"from": "2022-01-31",
"to": "2022-02-01",
"payment_statuses": [
"not_paid"
],
"attendance": -1
}'OK
Data on customer visits, including appointments and product sales.
{ "goods_transactions": [ { … } ], "records": [ { … } ] }
{ "success": true, "data": { "goods_transactions": [ … ], "records": [ … ] }, "meta": { "dateCursor": { … } } }