User authentication and session management for B2B integrations
- Deprecated. Get a list of clients
Business Management (1.0.0)
Full-featured B2B API for business operations.
Base URL: https://api.alteg.io/api
V1 will be gradually deprecated. We recommend using V2 API for new integrations. V1 endpoints are maintained for backward compatibility, but new features will be released in V2 only.
Request
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/company/{location_id}/clients/visits/search
- Productionhttps://api.alteg.io/api/v1/company/{location_id}/clients/visits/search
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X POST \
https://developer.alteg.io/_mock/en/b2b-v1/openapi/company/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
}'{ "success": true, "data": { "goods_transactions": [ … ], "records": [ … ] }, "meta": { "dateCursor": { … } } }
Request
- Parameter
- company_id (required, number,
1) - location ID - page (number,
1) - Page number - count (number,
20) - Number of clients per page
- company_id (required, number,
- fullname:Joh (optional, string) - Name (part of name) to filter clients
- phone:1315 (optional, string) - Phone (part of the number) for filtering clients
- email:test@ (optional, string) - Email (part) for client filtering
- card:5663rt (optional, string) - Card (part) for filtering customers by loyalty card number
- paid_min:100 (optional, number) - Minimum amount paid, to filter customers by the amount of payments
- paid_max:0 (optional, number) - Maximum amount paid, to filter customers by the amount of payments
- paid_max:0 (optional, number) - Maximum amount paid, to filter customers by the amount of payments
- id:66 (optional, number) - ID of one client for filtering clients
- id[]: 66 (optional, array) - IDs of multiple clients to filter
- changed_after: '2000-01-01T00:00:00' (optional, string) - Filtering clients changed/created since a specific date and time
- changed_before: '2020-12-31T23:59:59' (optional, string) - Filtering clients changed/created before a specific date and time
- Mock serverhttps://developer.alteg.io/_mock/en/b2b-v1/openapi/clients/{location_id}
- Productionhttps://api.alteg.io/api/v1/clients/{location_id}
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X GET \
'https://developer.alteg.io/_mock/en/b2b-v1/openapi/clients/{location_id}?fullname=Joh&phone=1315&email=test%40&paid_min=1&paid_max=1&page=1&count=20&location_id=66' \
-H 'Accept: application/vnd.api.v2+json' \
-H 'Authorization: Bearer <YOUR_Bearer {PartnerToken}, User {UserToken}_HERE>' \
-H 'Content-Type: string'OK
Array of objects with data
{ "success": true, "data": [ { … }, { … } ], "meta": { "page": 1, "total_count": 8 } }