# Get Booking Form Configuration

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: https://b123.alteg.io, where 123 is the booking form ID. This ID can be used to retrieve all necessary parameters for implementing Online Booking and to determine whether the booking applies to a specific location or a location chain.
For chain widgets, you will also need to call the [GET] /locations method with the company_id filter to retrieve the list of locations available for booking.
The object containing the Online Booking form settings includes the following fields:
| Field | Type | Description |
|  --- | --- | --- |
| steps | Array of objects | Booking form steps with custom settings |
| style | object | Booking form design settings |
| group_id | number | Location chain ID (0 - if the booking form is for a non-chain location) |
| company_id | number | Location ID (always returned, used to get additional settings) |
| phone_confirmation | boolean | Do I need to confirm the phone by SMS (if groupid = 0 (not a group form), otherwise look in the settings of each location separately) |
| language | string | Booking form language (code from langs array) |
| langs | array of object | List of widget languages |
| comment_required | boolean | Whether the field with a comment within booking is required |
| google_analytics_id | string | Google Analytics ID |
| facebook_pixel_id | string | Facebook Pixel ID |
| gtm_container_id | string | Google Tag Manager container ID (empty string if not set) |
| sms_enabled | boolean | Is sending SMS available? |
| comment_input_name | string (optional) | Title for the field with a comment to the booking (if not set, the default value is used) |
| booking_notify_text | string (optional) | The text of the notification that is displayed (if set) at the step of entering contact data |
| is_show_privacy_policy | boolean | Whether it is necessary to display the text of the agreement on the personal data processing policy to the user |
| specialization_display_mode | number | Display the specialization or position of the team member. 0 - Specialization, 1 - Position |

The steps array consists of objects that have the following fields:
| Field | Type | Description | For what steps is specified |
|  --- | --- | --- | --- |
| step | string | Step city/company/service/team member/datetime/contact/confirm |  |
| title | string | Name of the step to display in the interface | For everyone |
| number | number | What number should this step be displayed on (starting from 1) | For everyone |
| default | string or number | The default value for this step, if set | For all but datetime |
| hidden | boolean | Hide this step when booking or not | For everyone |
| date_hidden | boolean | Hide this step when booking or not | For datetime |
| time_hidden | boolean | Hide this step when booking or not | For datetime |
| date_default | string | The default value for this step, if set | For datetime |
| time_default | number | The default value for this step, if set | For datetime |

The style object has the following fields:
| Field | Type | Description |
|  --- | --- | --- |
| show header | boolean | Show header and menu or not |
| logo | string | Path to logo image |
| header_background | string | Path to subtitle background image |
| menu_background | string | Path to menu background image |
| primaryPalette | string | The main color of the form (all colors from the list: red, pink, purple, deep-purple, indigo, blue, light-blue, cyan, teal, green, light-green, lime, yellow, amber, orange, deep-orange, brown , grey, blue-grey, white, black) |
| accentPalette | string | Form secondary color (subtitle semi-transparent cover) |
| warnPalette | string | Booking form buttons color |
| backgroundPalette | string | Booking form background color |

Endpoint: GET /bookform/{id}
Version: 1.0.0
Security: BearerPartner

## Security:

  - `BearerPartner` (unknown)
    http bearer Bearer {PartnerToken}

## Path parameters:

  - `id` (number, required)
    ID of thebooking form

## Header parameters:

  - `Accept` (string, required)
    e.g. application/vnd.api.v2+json

  - `Content-Type` (string, required)
    application/json

  - `Authorization` (string, required)
    Bearer partner_token

## Response 200:

  - `200` (unknown)
    OK

## Response 200 fields (application/json):

  - `success` (boolean)
    Execution success status (true)

  - `data` (object)
    Object with data

  - `data.steps` (array)
    appointment form steps with custom settings

  - `data.steps.step` (string)
    Selection step (Service / team member / date)

  - `data.steps.title` (string)
    The name of the step to display in the interface

  - `data.steps.num` (number)
    What number should this step be displayed on (starting from 1)

  - `data.steps.hidden` (boolean)
    Hide this step when appointment or not

  - `data.steps.default` (number | string)
    Default value for this step

  - `data.steps.date_default` (string)
    Default date value (for datetime step)

  - `data.steps.time_default` (number)
    Default time value (for datetime step)

  - `data.steps.date_hidden` (boolean)
    Hide date selection (for datetime step)

  - `data.steps.time_hidden` (boolean)
    Hide time selection (for datetime step)

  - `data.steps.is_title_default` (boolean)
    Is title default or custom

  - `data.steps.category_view_type` (string)
    Category view type (e.g., "horizontal_tags")

  - `data.style` (object)
    appointment form design settings

  - `data.style.show_header` (boolean)
    Display header and menu or not

  - `data.style.logo` (string)
    Path to logo image

  - `data.style.header_background` (string)
    Path to subtitle background image

  - `data.style.menu_background` (string)
    Path to menu background image

  - `data.style.main_color` (string)
    The main color of the form (all colors from the list: red, pink, purple, deep-purple, indigo, blue, light-blue, cyan, teal, green, light-green, lime, yellow, amber, orange, deep-orange, brown , grey, blue-grey, white, black)

  - `data.style.secondary_color` (string)
    Form secondary color (subtitle semi-transparent cover)

  - `data.style.buttons_color` (string)
    Button color

  - `data.style.logo_full` (string)
    Full path to logo image

  - `data.style.header_background_full` (string)
    Full path to header background image

  - `data.style.menu_background_full` (string)
    Full path to menu background image

  - `data.style.primaryPalette` (string)
    Primary palette color

  - `data.style.accentPalette` (string)
    Accent palette color

  - `data.style.warnPalette` (string)
    Warning palette color

  - `data.style.backgroundPalette` (string)
    Background palette color

  - `data.style.main_color_theme` (string)
    Main color theme identifier

  - `data.style.header_background_new` (any)
    New header background image configuration (empty array if not configured)

  - `data.style.header_background_new.sm` (string)
    Small image URL

  - `data.style.header_background_new.norm` (string)
    Normal image URL

  - `data.style.header_background_new.origin` (string)
    Original image URL

  - `data.group_id` (number)
    location chain ID (0 - if the appointment form for a non-chain location

  - `data.company_id` (number)
    location ID (always returned, used to get additional settings)

  - `data.phone_confirmation` (boolean)
    Do I need to confirm the phone by SMS (if groupid = 0 (not a chain form), otherwise look in the settings of each location separately)

  - `data.lang` (string)
    appointment form language (code from langs array)

  - `data.langs` (array)
    List of widget languages

  - `data.langs.id` (integer)

  - `data.langs.code` (string)

  - `data.langs.title` (string)

  - `data.comment_required` (boolean)
    Whether the field with a comment on the appointment is required

  - `data.google_analytics_id` (string)
    Google Analytics ID

  - `data.facebook_pixel_id` (string)
    Facebook Pixel ID

  - `data.gtm_container_id` (string)
    Google Tag Manager container ID (empty string if not set)

  - `data.metrika_counter_id` (number | null)
    Metrika counter ID (web analytics)

  - `data.app_metrika_id` (string | null)
    AppMetrika ID (mobile analytics)

  - `data.sms_enabled` (boolean)
    Is sending SMS available?

  - `data.id` (number)
    Booking form ID

  - `data.url` (string)
    Booking form URL

  - `data.staff_name` (object)
    Team member name configuration

  - `data.without_menu` (boolean)
    Step mode flag

  - `data.sequence_type` (string)
    Sequence type (e.g., "steps")

  - `data.client_scripts` (string)
    Client-side scripts

  - `data.y_injection` (string)
    Web analytics injection code

  - `data.first_service_category_close` (boolean)
    First service category close flag

  - `data.map` (object)
    Map configuration

  - `data.salon_select_type_code` (string)
    Location select type code

  - `data.is_show_privacy_policy` (boolean)
    Show privacy policy flag

  - `data.is_client_agreements_feature_enabled` (boolean)
    Client agreements feature enabled flag

  - `data.specialization_display_mode` (number)
    Specialization display mode (0 - specialization, 1 - position)

  - `data.ab_test_enabled` (boolean)
    A/B test enabled flag

  - `data.ab_test_percentage` (number)
    A/B test percentage

  - `data.is_online_sale_available` (boolean)
    Online sale available flag

  - `data.legal_info` (object | null)
    Legal information

  - `data.online_sales_links` (array)
    Online sales links

  - `data.google_analytics_client_id_index` (string | null)
    Google Analytics client ID index

  - `data.brand` (object)
    Brand configuration

  - `data.injection` (object)
    Injection scripts configuration

  - `data.display_activity_type` (string)
    Display event type

  - `data.is_multiple_activity_record` (boolean)
    Multiple event appointment flag

  - `data.activity_record_count` (number)
    Event appointment count

  - `data.weekly_view_enabled` (boolean)
    Weekly view enabled flag

  - `data.show_weekly_view_without_online_booking` (boolean)
    Show weekly view without online booking

  - `data.weekly_view_default_salon_id` (number | null)
    Default location ID for weekly view

  - `data.chain_main_salon_id` (number)
    Chain main location ID

  - `data.record_type_id` (number | null)
    Appointment type ID

  - `data.features` (object)
    Feature flags

  - `data.certificate_count` (number)
    Gift card count

  - `data.abonement_count` (number)
    Membership count

  - `meta` (array)
    Metadata (empty array)

## Response 401:

  - `401` (unknown)
    Unauthorized

## Response 401 fields (application/json):

  - `success` (boolean)
    Response status.
    Example: false

  - `data` (object | null)
    Response data.
    Example: null

  - `meta` (object)
    Additional response data.

  - `meta.message` (string)
    Error message.
    Example: Authentication needed.

## Response 403:

  - `403` (unknown)
    Forbidden

## Response 403 fields (application/json):

  - `success` (boolean)
    Response status.
    Example: false

  - `data` (object | null)
    Response data.
    Example: null

  - `meta` (object)
    Additional response data.

  - `meta.message` (string)
    Error message.
    Example: Access denied.

## Response 404:

  - `404` (unknown)
    Not Found

## Response 404 fields (application/json):

  - `success` (boolean)
    Response status.
    Example: false

  - `data` (object | null)
    Response data.
    Example: null

  - `meta` (object | array)
    Additional response data (empty object or empty array)
    Example: {}

