User authentication and session management for B2B integrations
- Create and Send an Invitation
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.
List of user permissions values
- Mock serverhttps://developer.alteg.io/_mock/en/b2b-v1/openapi/company/{location_id}/users/{user_id}/permissions
- Productionhttps://api.alteg.io/api/v1/company/{location_id}/users/{user_id}/permissions
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X PUT \
https://developer.alteg.io/_mock/en/b2b-v1/openapi/company/123/users/123/permissions \
-H 'Accept: application/vnd.api.v2+json' \
-H 'Authorization: Bearer <YOUR_Bearer {PartnerToken}, User {UserToken}_HERE>' \
-H 'Content-Type: application/json' \
-d '{
"user_role": "worker",
"user_permissions": [
{
"slug": "timetable_access",
"value": true
}
],
"staff_id": 0
}'{ "success": true, "data": { "is_editable": true, "staff_id": 12345, "user_role": "owner", "user_permissions": [ … ] }, "meta": {} }
Request
An invitation to manage a location is sent via email or phone as a link. By following the link and completing registration, the user gains access to manage the location according to the permissions assigned. Permission assignment is performed in a separate request after the invitation is sent.
Array of invites
Role name
List of user permissions
- Mock serverhttps://developer.alteg.io/_mock/en/b2b-v1/openapi/user/invite/{location_id}
- Productionhttps://api.alteg.io/api/v1/user/invite/{location_id}
- 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/user/invite/123 \
-H 'Accept: application/vnd.api.v2+json' \
-H 'Authorization: Bearer <YOUR_Bearer {PartnerToken}, User {UserToken}_HERE>' \
-H 'Content-Type: application/json' \
-d '{
"invites": [
{
"name": "Olivia",
"search": "mail@gmail.com",
"position": "Administrator",
"user_role": "administrator",
"user_permissions": [
{
"slug": "timetable_access",
"value": true
}
],
"staff_id": 12
}
]
}'{ "success": true, "meta": { "message": "Saved" } }
Request
Copies an active user and their permissions to multiple locations at once. If the user does not yet exist in a location, they will be added as an active user. If the user has already been invited to the location, only their permissions will be updated — however, they will still need to accept the invitation.
List of locations to copy the user to
- Mock serverhttps://developer.alteg.io/_mock/en/b2b-v1/openapi/company/{location_id}/users/{user_id}/copy_to_companies
- Productionhttps://api.alteg.io/api/v1/company/{location_id}/users/{user_id}/copy_to_companies
- 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/users/123/copy_to_companies \
-H 'Accept: application/vnd.api.v2+json' \
-H 'Authorization: Bearer <YOUR_Bearer {PartnerToken}, User {UserToken}_HERE>' \
-H 'Content-Type: application/json' \
-d '{
"user_company_links": [
{
"company_id": 123,
"user_permissions": [
{
"slug": "timetable_access",
"value": true
}
]
}
]
}'{ "success": true, "data": null, "meta": {} }