User authentication and session management for B2B integrations
- Delete request example
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
A list of uploaded client files can be retrieved by providing both the location ID and the client ID in the request. The client ID can be obtained from the client collection.
The response returns an array of client files.
Each client file has the following structure:
| Field | Type | Description | | -----------------| ------- | -------------------------------------------------- ------------------------ | | id | number | File ID | | client_id | number | Client ID | | name | string | Filename with extension | | description | string | File description | | extension | string | File name extension | | mime | string | MIME file type | | link | string | File download link | | date_create | string | File upload date in ISO8601 format | | size | string | Formatted file size string | | username | string | The name of the user who uploaded the file | | user_avatar | string | Avatar of the user who uploaded the file | | can_edit | boolean | Is there a right to change and delete the file? true - there is a right, false - there is no right |
- Mock serverhttps://developer.alteg.io/_mock/en/b2b-v1/openapi/company/{location_id}/clients/files/{client_id}
- Productionhttps://api.alteg.io/api/v1/company/{location_id}/clients/files/{client_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/company/{location_id}/clients/files/{client_id}' \
-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": { "count": 2 } }
- Mock serverhttps://developer.alteg.io/_mock/en/b2b-v1/openapi/company/{location_id}/clients/files/{client_id}/{file_id}
- Productionhttps://api.alteg.io/api/v1/company/{location_id}/clients/files/{client_id}/{file_id}
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X DELETE \
'https://developer.alteg.io/_mock/en/b2b-v1/openapi/company/{location_id}/clients/files/{client_id}/{file_id}' \
-H 'Accept: application/vnd.api.v2+json' \
-H 'Authorization: Bearer <YOUR_Bearer {PartnerToken}, User {UserToken}_HERE>'{ "success": true, "meta": { "message": "Accepted" } }
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": { … } } }