# Online Booking

Public API for client-facing online booking integration.
This API enables third-party developers to embed online booking functionality into external platforms such as business catalogs, branded apps, and partner services.
**Base URL:** `https://api.alteg.io/api`
## Start here
New to the live Altegio APIs? Follow [How to Get API Keys](../get-api-key.md) to register and obtain the Partner Token required by the examples in this reference.
## Authentication
All requests require partner authorization via Bearer token in the HTTP header:
``` Authorization: Bearer <partner_token> ```
To obtain a partner token, register in the [Altegio Marketplace](https://app.alteg.io/appstore/developers/1).
## Rate Limits
- 200 requests per minute per IP address - 5 requests per second per IP address

Version: 1.0.0
License: Altegio API Agreement

## Servers

Production server
```
https://api.alteg.io/api/v1
```

## Security

### BearerPartner

Partner API token for accessing public endpoints

Type: http
Scheme: bearer
Bearer Format: Bearer {PartnerToken}

### BearerPartnerUser

Combined partner and user tokens for authenticated user operations

Type: http
Scheme: bearer
Bearer Format: Bearer {PartnerToken}, User {UserToken}

## Download OpenAPI description

 - [Online Booking](https://developer.alteg.io/_bundle/en/public/openapi.yaml)

## Authentication

 - [POST /booking/auth](https://developer.alteg.io/en/public/openapi/authentication/authorize_online_booking_user.md): When a user of an online account changes their password, their API key will change and a new authorization will be required | Attribute | Type | Description | | --- | --- | --- | | login | string | T
## Online Booking

 - [GET /bookform/{id}](https://developer.alteg.io/en/public/openapi/online-booking/get_booking_form_config.md): Each Altegio client can create an unlimited number of Online Booking forms with different designs and booking scenarios. Typically, the ID of a booking form is embedded in the subdomain. For example:
 - [GET /i18n/{lang_code}](https://developer.alteg.io/en/public/openapi/online-booking/get_i18n_options.md): Translation is available in one of the languages: - Latvian - 'lv-LV' - English - 'en-US' - Estonian - 'ee-EE' - Lithuanian - 'lt-LT' - German - 'de-DE' - Ukrainian - 'uk-UK'
 - [GET /book_services/{location_id}](https://developer.alteg.io/en/public/openapi/online-booking/get_services_available_for_booking.md): The object of services available for booking has the following fields: | Field | Type | Description | | --- | --- | --- | | categories | array of objects | Array of service categories (you can't book
 - [GET /book_staff/{location_id}](https://developer.alteg.io/en/public/openapi/online-booking/get_team_members_available_for_booking.md): Each object from the array of team members available for booking has the following fields: | Field | Type | Description | | --- | --- | --- | | id | number | team member ID | | name | string | team m
 - [GET /book_staff_seances/{location_id}/{team_member_id}](https://developer.alteg.io/en/public/openapi/online-booking/get_nearest_time_slots.md): the team member's nearest sessions object has the following fields: | Field | Type | Description | | --- | --- | --- | | session_date | string | Next date with available sessions | | sessions | array
 - [GET /book_dates/{location_id}](https://developer.alteg.io/en/public/openapi/online-booking/get_dates_available_for_booking.md): The dates available for booking object has the following fields: | Field | Type | Description | | --- | --- | --- | | working_days | array of working days grouped by month | Working days of a team me
 - [GET /book_times/{location_id}/{team_member_id}/{date}](https://developer.alteg.io/en/public/openapi/online-booking/get_time_slots_for_booking.md): The sessions available for booking object has the following fields: | Field | Type | Description | | --- | --- | --- | | time | string | Session time (17:30 for example) | | session_length | number |
 - [POST /book_check/{location_id}](https://developer.alteg.io/en/public/openapi/online-booking/validate_booking_params.md): After generating the appointment parameters, you can validate them to ensure the appointment can be successfully created. The JSON object containing the Online Booking parameters includes the followin
 - [POST /book_record/{location_id}](https://developer.alteg.io/en/public/openapi/online-booking/create_online_booking.md): To create a session appointment, provide a JSON object containing the online booking parameters. The object includes the following fields: | Field | Type | Mandatory | Description | | --- | --- | ---
 - [GET /book_record/{location_id}/{record_id}/{record_hash}](https://developer.alteg.io/en/public/openapi/online-booking/get_online_booking_details.md)
 - [PUT /book_record/{location_id}/{record_id}](https://developer.alteg.io/en/public/openapi/online-booking/update_online_booking_datetime.md)
 - [POST /activity/{location_id}/{event_id}/book](https://developer.alteg.io/en/public/openapi/online-booking/book_event.md)
 - [GET /privacy_policy/{location_id}](https://developer.alteg.io/en/public/openapi/online-booking/get_location_privacy_policy.md): Retrieves the privacy policy configured for a specific location. This endpoint should be called before creating an online booking record to check if the location has a custom privacy policy. If a loc
## Client Personal Cabinet

 - [PUT /booking/user](https://developer.alteg.io/en/public/openapi/client-personal-cabinet/update_booking_user.md): Updating a team member’s data in online booking. When updating a phone number, the confirmation_code field must be included in the request. This code should be obtained using the [SMS confirmation cod
 - [GET /booking/user/data](https://developer.alteg.io/en/public/openapi/client-personal-cabinet/get_booking_user.md): Retrieve online booking user data.
 - [PUT /booking/user/password](https://developer.alteg.io/en/public/openapi/client-personal-cabinet/update_booking_user_password.md): Updating the password of an online booking user. The response comes with a new user token.
 - [GET /booking/user/phone_confirmation](https://developer.alteg.io/en/public/openapi/client-personal-cabinet/send_phone_update_verification_code.md): The request must contain one of two parameters: company_id or group_id
 - [GET /user/records/{record_id}/{record_hash}](https://developer.alteg.io/en/public/openapi/client-personal-cabinet/get_user_appointment_list.md): The JSON Object containing the user appointment parameters has the following fields: | Field | Type | Mandatory | Description | | --- | --- | --- | --- | | id | number | YES | Appointment ID | | serv
 - [DELETE /user/records/{record_id}/{record_hash}](https://developer.alteg.io/en/public/openapi/client-personal-cabinet/delete_user_appointment.md)
 - [GET /master_record_review/{record_token}](https://developer.alteg.io/en/public/openapi/client-personal-cabinet/get_feedback_form_status.md)
 - [POST /master_record_review/{record_token}](https://developer.alteg.io/en/public/openapi/client-personal-cabinet/submit_feedback_form.md)
