openapi: 3.1.1
info:
  title: Developer Tools
  version: 1.0.0
  termsOfService: https://alteg.io/en/info/terms/
  license:
    name: Altegio API Agreement
    url: /en/api-license-agreement
  description: >-
    APIs for partners building integrations with the Altegio platform.

    **Base URL:** `https://api.alteg.io/api`

    ## Available Methods

    **Marketplace** — Manage your marketplace applications: list connected
    locations, configure tariffs, handle billing, process
    installation/uninstallation callbacks.

    **Webhooks** — Configure event notifications for your integrations. Receive
    real-time updates when appointments, clients, or other entities change.

    **VoIP Integration** — Connect telephony systems to match incoming calls
    with client records and log call history.

    **Dictionaries** — Reference data for building forms and validations:
    countries, cities, business types.
servers:
  - url: https://api.alteg.io/api/v1
    description: Production
x-tagGroups:
  - name: Developers
    tags:
      - Marketplace
      - Webhooks
      - VoIP Integration
      - Dictionaries
tags:
  - name: Marketplace
    description: Marketplace application management, billing, and installation.
  - name: Webhooks
    description: Event subscription and webhook configuration.
  - name: VoIP Integration
    description: Telephony integration endpoints.
  - name: Dictionaries
    description: Reference data (countries, cities, business types).
paths:
  /marketplace/application/{application_id}/salons:
    get:
      tags:
        - Marketplace
      summary: Data About Locations Connected to the Application
      servers:
        - url: https://app.alteg.io
      description: >
        This endpoint retrieves a list of locations that have connected a
        specific application, along with detailed information about each.
      operationId: list_marketplace_app_locations
      security:
        - BearerPartner: []
      parameters:
        - name: Accept
          in: header
          description: e.g. application/vnd.api.v2+json
          required: true
          schema:
            type: string
          example: application/vnd.api.v2+json
        - name: application_id
          in: path
          description: Application ID
          required: true
          schema:
            type: number
        - name: page
          in: query
          description: Page number
          required: true
          schema:
            type: number
        - name: count
          in: query
          description: Number of elements per page
          required: true
          schema:
            type: number
            maximum: 1000
      responses:
        '200':
          description: Locations array
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/companies_data_types'
        '401':
          description: No partner token given
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/401_unauthorized_response'
        '403':
          description: No access to application.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/403_forbidden_response'
  /marketplace/application/{application_id}/tariffs:
    get:
      tags:
        - Marketplace
      summary: Get application tariffs
      description: |
        Retrieves list of tariffs for the application.

        **Note:** For marketplace partners only.
      operationId: marketplace_partner_applications_tariffs_list
      security:
        - BearerPartner: []
      parameters:
        - name: Accept
          in: header
          required: true
          schema:
            type: string
            default: application/vnd.api.v2+json
        - name: Authorization
          in: header
          required: true
          schema:
            type: string
          description: Bearer {partner_token}
        - name: application_id
          in: path
          description: Application ID
          required: true
          schema:
            type: integer
          example: 123
      responses:
        '200':
          description: Tariffs retrieved successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    example: true
                  data:
                    type: array
                    description: List of tariffs
                    items:
                      type: object
                      properties:
                        id:
                          type: integer
                          description: Tariff ID
                          example: 89
                        title:
                          type: string
                          description: Tariff name
                          example: 1 month
                        options:
                          type: array
                          description: Tariff options
                          items:
                            type: object
                            properties:
                              id:
                                type: integer
                                description: Option ID
                                example: 123
                              title:
                                type: string
                                description: Option name
                                example: Solo professional
                              overall_price:
                                type: number
                                format: float
                                description: Total price
                                example: 500
                              duration_in_months:
                                type: integer
                                description: Duration in months
                                example: 1
                              currency_iso:
                                type: string
                                description: Currency ISO code
                                example: USD
                              staff_amount:
                                type: integer
                                description: Maximum team members for this option
                                example: 1
                              free_period_in_months:
                                type: integer
                                description: Free trial period in months
                                example: 0
                  meta:
                    type: array
                    example: []
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    example: false
                  data:
                    type: 'null'
                  meta:
                    type: object
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    example: false
                  data:
                    type: 'null'
                  meta:
                    type: object
        '404':
          description: Application not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    example: false
                  data:
                    type: 'null'
                  meta:
                    type: object
  /marketplace/application/add_discount:
    post:
      tags:
        - Marketplace
      summary: Set payment discount for locations
      description: >
        Sets a payment discount for specific locations when they pay through
        Altegio platform.


        **Note:** This endpoint is intended for marketplace partners only.

        Requires marketplace partner authorization.
      operationId: marketplace_partner_application_add_discount
      security:
        - BearerPartner: []
      parameters:
        - name: Accept
          in: header
          required: true
          schema:
            type: string
            default: application/vnd.api.v2+json
        - name: Content-Type
          in: header
          required: true
          schema:
            type: string
            default: application/json
        - name: Authorization
          in: header
          required: true
          schema:
            type: string
          description: Bearer {partner_token}
      requestBody:
        required: true
        content:
          application/json:
            schema:
              required:
                - salon_ids
                - application_id
                - discount
              type: object
              properties:
                salon_ids:
                  type: array
                  description: List of location IDs to apply discount
                  items:
                    type: integer
                  example:
                    - 123
                    - 456
                application_id:
                  type: integer
                  description: Application ID from marketplace
                  example: 123
                discount:
                  type: number
                  format: float
                  description: >-
                    Discount amount (percentage or fixed amount depending on
                    configuration)
                  example: 15.54
      responses:
        '200':
          description: Discount successfully applied
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    example: true
                  data:
                    type: object
                  meta:
                    type: array
        '401':
          description: Unauthorized - partner token not provided or invalid
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    example: false
                  data:
                    type: 'null'
                  meta:
                    type: object
        '403':
          description: Forbidden - no access to application
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    example: false
                  data:
                    type: 'null'
                  meta:
                    type: object
                    properties:
                      message:
                        type: string
                        example: No access to application
        '404':
          description: Application not installed in location
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    example: false
                  data:
                    type: 'null'
                  meta:
                    type: object
                    properties:
                      message:
                        type: string
                        example: Application not found
  /marketplace/application/payment_link:
    get:
      tags:
        - Marketplace
      summary: Generate payment link
      description: >
        Generates a payment link for application payment through Altegio
        platform.


        **Note:** For marketplace partners only.
      operationId: marketplace_partner_application_payment_link
      security:
        - BearerPartner: []
      parameters:
        - name: Accept
          in: header
          required: true
          schema:
            type: string
            default: application/vnd.api.v2+json
        - name: Authorization
          in: header
          required: true
          schema:
            type: string
          description: Bearer {partner_token}
        - name: salon_id
          in: query
          description: Location ID
          required: true
          schema:
            type: integer
          example: 123
        - name: application_id
          in: query
          description: Application ID
          required: true
          schema:
            type: integer
          example: 456
        - name: discount
          in: query
          description: Discount percentage (optional)
          required: false
          schema:
            type: number
            format: float
          example: 15.55
      responses:
        '200':
          description: Payment link generated successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    example: true
                  data:
                    type: object
                    properties:
                      url:
                        type: string
                        description: Payment page URL
                        example: >-
                          https://alteg.io/appstore/payment/?salon_id=1111&application_id=1&discount=15.5&source=api&sign=6f9b5bc6fa787780161ed090af9429d5af963562b7a6ac8051888147370674be
                  meta:
                    type: array
                    example: []
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    example: false
                  data:
                    type: 'null'
                  meta:
                    type: object
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    example: false
                  data:
                    type: 'null'
                  meta:
                    type: object
        '404':
          description: Application not installed
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    example: false
                  data:
                    type: 'null'
                  meta:
                    type: object
  /marketplace/application/update_channel:
    post:
      tags:
        - Marketplace
      summary: Update notification channel availability
      description: |
        Updates available notification channels for the application.

        **Note:** Only for Chat Bots and SMS Aggregators category applications.
        For marketplace partners only.
      operationId: marketplace_partner_applications_update_channel
      security:
        - BearerPartner: []
      parameters:
        - name: Accept
          in: header
          required: true
          schema:
            type: string
            default: application/vnd.api.v2+json
        - name: Content-Type
          in: header
          required: true
          schema:
            type: string
            default: application/json
        - name: Authorization
          in: header
          required: true
          schema:
            type: string
          description: Bearer {partner_token}
      requestBody:
        required: true
        content:
          application/json:
            schema:
              required:
                - salon_id
                - application_id
                - channel_slug
                - is_available
              type: object
              properties:
                salon_id:
                  type: integer
                  description: Location ID
                  example: 123
                application_id:
                  type: integer
                  description: Application ID
                  example: 456
                channel_slug:
                  type: string
                  description: Channel to update availability for
                  enum:
                    - sms
                    - whatsapp
                  example: sms
                is_available:
                  type: boolean
                  description: Channel availability flag
                  example: true
      responses:
        '200':
          description: Channel availability updated successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    example: true
                  data:
                    type: object
                  meta:
                    type: array
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    example: false
                  data:
                    type: 'null'
                  meta:
                    type: object
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    example: false
                  data:
                    type: 'null'
                  meta:
                    type: object
        '422':
          description: Validation error
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    example: false
                  data:
                    type: 'null'
                  meta:
                    type: object
                    properties:
                      message:
                        type: string
                      errors:
                        type: object
  /marketplace/salon/{location_id}/application/{application_id}:
    get:
      tags:
        - Marketplace
      summary: Application Status Data for Any Location
      servers:
        - url: https://app.alteg.io
      description: >
        This endpoint is used to retrieve information about the application's
        installation status in a specific location.
      operationId: get_marketplace_integration_status
      security:
        - BearerPartner: []
      parameters:
        - name: Accept
          in: header
          description: e.g. application/vnd.api.v2+json
          required: true
          schema:
            type: string
          example: application/vnd.api.v2+json
        - name: location_id
          in: path
          description: Location ID
          required: true
          schema:
            type: number
        - name: application_id
          in: path
          description: Application ID
          required: true
          schema:
            type: number
      responses:
        '200':
          description: Info about application location link
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    $ref: '#/components/schemas/response_success_true_object'
                  data:
                    type: object
                    properties:
                      connection_status:
                        type: object
                        description: Installation status
                        properties:
                          status:
                            type: string
                            enum:
                              - pending
                              - freezed
                              - active
                            description: >-
                              Application installation status in the location.
                              Pending - waiting for activation from the partner,
                              Freezed - frozen due to non-payment, Active -
                              active
                          created_at:
                            type: string
                            description: Date of link creation
                      payments:
                        type: array
                        description: Payments list
                        items:
                          type: object
                          properties:
                            payment_sum:
                              type: number
                              description: The payment amount for the period.
                            id:
                              type: number
                              description: Payment ID.
                            payment_date:
                              type: string
                              description: The date of payment.
                            is_refunded:
                              type: boolean
                              description: Was there a refund?
                            period_from:
                              type: string
                              description: Subscription start date
                            period_to:
                              type: string
                              description: Subscription end date
                      logs:
                        type: array
                        description: Application status change log in location
                        items:
                          type: object
                          properties:
                            changed_at:
                              type: string
                              description: Status change date
                            status_from:
                              type: string
                              description: Previous app status in location
                            status_to:
                              type: string
                              description: New application status in the location
                            source:
                              type: string
                              description: Status Change Source
                  meta:
                    $ref: '#/components/schemas/response_meta_empty_object'
                example:
                  success: true
                  data:
                    logs:
                      - changed_at: '2022-06-27 12:20:02'
                        status_from: uninstalled
                        status_to: pending
                        source: marketplace
                      - changed_at: '2022-06-27 12:22:02'
                        status_from: pending
                        status_to: active
                        source: partner_api
                    payments:
                      - id: 1523
                        payment_sum: 1523.12
                        payment_date: '2022-06-27 12:22:02'
                        is_refunded: false
                        period_from: '2022-06-27 00:00:00'
                        period_to: '2022-07-27 00:00:00'
                    connection_status:
                      status: active
                      created_at: '2022-06-27 12:20:02'
        '401':
          description: No partner token given.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/401_unauthorized_response'
        '403':
          description: No application access
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/403_forbidden_response'
        '404':
          description: Application isn't installed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/404_not_found_response'
  /marketplace/salon/{location_id}/application/{application_id}/uninstall:
    post:
      tags:
        - Marketplace
      summary: Application Uninstall
      servers:
        - url: https://app.alteg.io
      description: >
        This endpoint is used by the partner service to uninstall the
        application from a specific location.
      operationId: uninstall_marketplace_app
      security:
        - BearerPartner: []
      parameters:
        - name: Accept
          in: header
          description: e.g. application/vnd.api.v2+json
          required: true
          schema:
            type: string
          example: application/vnd.api.v2+json
        - name: location_id
          in: path
          description: Location ID
          required: true
          schema:
            type: number
        - name: application_id
          in: path
          description: Application ID
          required: true
          schema:
            type: number
      responses:
        '200':
          description: successfully uninstalled
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/200_success_response'
        '401':
          description: No partner token given.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/401_unauthorized_response'
        '403':
          description: No application access
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/403_forbidden_response'
        '404':
          description: Application isn't installed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/404_not_found_response'
  /marketplace/partner/callback:
    post:
      tags:
        - Marketplace
      summary: Application Installation for a Location
      servers:
        - url: https://app.alteg.io
      description: >
        The integration settings of the partner service must be sent to this
        address. Once received, the application will be configured and installed
        for the corresponding location.
      operationId: marketplace_notification_settings_callback
      security:
        - BearerPartner: []
      parameters:
        - name: Accept
          in: header
          description: e.g. application/vnd.api.v2+json
          required: true
          schema:
            type: string
          example: application/vnd.api.v2+json
      requestBody:
        content:
          application/json:
            schema:
              required:
                - salon_id
                - application_id
              type: object
              properties:
                salon_id:
                  type: number
                  description: Location ID.
                  example: 123
                application_id:
                  type: number
                  description: Application ID.
                  example: 123
                api_key:
                  type: number
                  description: API-key for messaging module.
                  example: 2f181e2a-5c22-4ae7-9d9b-07104f312c28
                webhook_urls:
                  type: array
                  description: Webhooks array
                  items:
                    type: string
                  example:
                    - https://example.com/webhook
      responses:
        '201':
          description: All parameters installed
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/401_unauthorized_response'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/403_forbidden_response'
        '422':
          description: Invalid parameters given
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/422_unprocessable_entity_response'
  /marketplace/partner/callback/redirect:
    post:
      tags:
        - Marketplace
      summary: Redirect URL after user registration with the partner service
      servers:
        - url: https://app.alteg.io
      description: >
        After completing registration, the user must be redirected to this URL
        in the browser, along with any required data needed by the partner
        service.
      operationId: marketplace_notification_settings_redirect_callback
      security:
        - BearerPartner: []
      parameters:
        - name: Accept
          in: header
          description: e.g. application/vnd.api.v2+json
          required: true
          schema:
            type: string
          example: application/vnd.api.v2+json
      requestBody:
        content:
          application/json:
            schema:
              required:
                - salon_id
                - application_id
              type: object
              properties:
                salon_id:
                  type: number
                  description: Location ID.
                  example: 123
                application_id:
                  type: number
                  description: Application ID.
                  example: 123
                api_key:
                  type: number
                  description: API-key for messaging module.
                  example: 2f181e2a-5c22-4ae7-9d9b-07104f312c28
                webhook_urls:
                  type: array
                  description: Webhooks array
                  items:
                    type: string
                  example:
                    - https://example.com/webhook
      responses:
        '200':
          description: Accepted
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    example: true
        '301':
          description: Redirect to partner service
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/401_unauthorized_response'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/403_forbidden_response'
        '422':
          description: Invalid parameters given
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/422_unprocessable_entity_response'
  /marketplace/partner/payment:
    post:
      tags:
        - Marketplace
      summary: Notify Altegio of Successful Payment
      servers:
        - url: https://app.alteg.io
      description: >
        A webhook notification must be sent to this address to inform Altegio of
        a successful payment made on the partner service’s side.
      operationId: marketplace_notification_payment_callback
      security:
        - BearerPartner: []
      parameters:
        - name: Accept
          in: header
          description: e.g. application/vnd.api.v2+json
          required: true
          schema:
            type: string
          example: application/vnd.api.v2+json
      requestBody:
        content:
          application/json:
            schema:
              required:
                - salon_id
                - currency_iso
                - application_id
                - payment_sum
                - payment_date
                - period_from
                - period_to
              type: object
              properties:
                salon_id:
                  type: number
                  description: Location ID.
                  example: 123
                application_id:
                  type: number
                  description: Application ID.
                  example: 123
                currency_iso:
                  type: string
                  description: 'Currency ISO (e.g.: USD, EUR, BYN)'
                  example: EUR
                payment_sum:
                  type: number
                  description: Payment amount.
                  example: 990.99
                payment_date:
                  type: string
                  description: Date and time of payment.
                  example: '2022-01-01 10:10:00'
                period_from:
                  type: string
                  description: Date from which the paid period begins (inclusive).
                  example: '2022-01-01 10:10:00'
                period_to:
                  type: string
                  description: Date from which the paid period ends (inclusive).
                  example: '2022-02-01 10:10:00'
      responses:
        '200':
          description: Webhook ok
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    title: Status.
                    type: boolean
                    description: Status.
                    example: true
                  data:
                    type: object
                    description: Data.
                    properties:
                      id:
                        description: Payment ID
                        type: number
                        example: 123
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/401_unauthorized_response'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/403_forbidden_response'
        '422':
          description: Wrong parameters given
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/422_unprocessable_entity_response'
  /marketplace/partner/payment/refund/{payment_id}:
    post:
      tags:
        - Marketplace
      summary: Chargeback Notice
      servers:
        - url: https://app.alteg.io
      description: |
        Chargeback Notice
      operationId: marketplace_payment_refund_callback
      security:
        - BearerPartner: []
      parameters:
        - name: Accept
          in: header
          description: e.g. application/vnd.api.v2+json
          required: true
          schema:
            type: string
          example: application/vnd.api.v2+json
        - name: payment_id
          in: path
          description: Payment ID.
          required: true
          schema:
            type: number
          example: 123
      responses:
        '200':
          description: Refund confirmed
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/401_unauthorized_response'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/403_forbidden_response'
        '422':
          description: Invalid parameters given
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/422_unprocessable_entity_response'
  /marketplace/partner/short_names:
    post:
      tags:
        - Marketplace
      summary: Notify Altegio of Available SMS Sender Names
      servers:
        - url: https://app.alteg.io
      description: >
        This endpoint is used to send the list of SMS sender names available to
        the user. The user will be able to choose from any of the provided
        sender names.
      operationId: set_marketplace_notification_short_names
      security:
        - BearerPartner: []
      parameters:
        - name: Accept
          in: header
          description: e.g. application/vnd.api.v2+json
          required: true
          schema:
            type: string
          example: application/vnd.api.v2+json
      requestBody:
        content:
          application/json:
            schema:
              required:
                - salon_id
                - application_id
                - short_names
              type: object
              properties:
                salon_id:
                  type: number
                  description: Location ID.
                  example: 123
                application_id:
                  type: number
                  description: Application ID
                  example: 123
                short_names:
                  type: array
                  description: Array of SMS names
                  items:
                    type: string
                  example:
                    - Altegio
                    - AL
      responses:
        '201':
          description: OK
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/401_unauthorized_response'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/403_forbidden_response'
        '422':
          description: Invalid params given
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/422_unprocessable_entity_response'
  /marketplace_webhook:
    post:
      tags:
        - Marketplace
      summary: Webhook from Altegio About Application Events
      security: []
      servers:
        - url: https://api.alteg.io
      description: >
        Note: This is not a callable endpoint.


        This section describes how Altegio sends webhook notifications when
        specific events occur in the application-to-location lifecycle. The
        following event types are currently supported:


        * uninstall — Sent when the application is disabled on the Altegio side.

        * freeze — Sent when the integration is frozen due to service
        expiration.


        You can configure the webhook URL for receiving these events in your
        Altegio Developer Account.
      operationId: marketplace_webhook
      parameters:
        - name: Accept
          in: header
          description: e.g. application/vnd.api.v2+json
          required: true
          schema:
            type: string
          example: application/vnd.api.v2+json
      requestBody:
        content:
          application/json:
            schema:
              required:
                - salon_id
                - application_id
                - event
                - partner_token
              type: object
              properties:
                salon_id:
                  type: number
                  description: Location ID.
                  example: 123
                application_id:
                  type: number
                  description: Application ID.
                  example: 123
                event:
                  type: string
                  description: Event Slug.
                  enum:
                    - uninstall
                    - freeze
                  example: uninstall
                partner_token:
                  type: string
                  description: >-
                    Bearer token of the developer's location (to verify the
                    origin of the webhook)
                  example: yasdfkjah2328aj
      responses:
        '200':
          description: >-
            From the side of the partner, a response code of successful
            processing (200-299) is expected.
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/401_unauthorized_response'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/403_forbidden_response'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/404_not_found_response'
  /hooks_settings/{location_id}:
    get:
      tags:
        - Webhooks
      security:
        - BearerPartnerUser: []
      summary: Get event notification settings
      operationId: get_event_notification_settings
      parameters:
        - name: location_id
          in: path
          description: location ID
          required: true
          schema:
            type: number
        - name: Accept
          in: header
          description: e.g. application/vnd.api.v2+json
          required: true
          schema:
            type: string
          example: application/vnd.api.v2+json
        - name: Content-Type
          in: header
          description: application/json
          required: true
          schema:
            type: string
        - name: Authorization
          in: header
          description: Bearer partner_token, User user_token
          required: true
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/hooks_settings_response_data_types'
              example:
                success: true
                data:
                  urls:
                    - https://dev.tools.test.com/test/Hooks
                  active: 0
                  salon: 1
                  service_category: 0
                  service: 1
                  good: 1
                  master: 1
                  client: 1
                  record: 1
                  goods_operations_sale: 1
                  goods_operations_receipt: 1
                  goods_operations_consumable: 1
                  goods_operations_stolen: 1
                  goods_operations_move: 1
                  finances_operation: 1
                meta: []
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/401_unauthorized_response'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/403_forbidden_response'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/404_not_found_response'
    post:
      tags:
        - Webhooks
      security:
        - BearerPartnerUser: []
      summary: Change Event Notification Settings
      operationId: update_event_notification_settings
      parameters:
        - name: location_id
          in: path
          description: location ID
          required: true
          schema:
            type: number
        - name: Accept
          in: header
          description: e.g. application/vnd.api.v2+json
          required: true
          schema:
            type: string
          example: application/vnd.api.v2+json
        - name: Content-Type
          in: header
          description: application/json
          required: true
          schema:
            type: string
        - name: Authorization
          in: header
          description: Bearer partner_token, User user_token
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              required:
                - active
                - urls
              type: object
              properties:
                urls:
                  type: array
                  description: List of addresses to send notifications to
                active:
                  type: number
                  description: 1 - notifications are active, 0 - not active
                salon:
                  type: number
                  description: 1 - send events by location entity, 0 - do not send
                service_category:
                  type: number
                  description: 1 - send events by service category entity, 0 - do not send
                service:
                  type: number
                  description: 1 - send events by service entity, 0 - do not send
                good:
                  type: number
                  description: 1 - send events by product entity, 0 - don't send
                master:
                  type: number
                  description: 1 - send events by team member entity, 0 - don't send
                client:
                  type: number
                  description: 1 - send events by client entity, 0 - don't send
                record:
                  type: number
                  description: 1 - send events by appointment entity, 0 - do not send
                goods_operations_sale:
                  type: number
                  description: 1 - send events by the product sale entity, 0 - do not send
                goods_operations_receipt:
                  type: number
                  description: >-
                    1 - send events by the entity arrival of products, 0 - do
                    not send
                goods_operations_consumable:
                  type: number
                  description: >-
                    1 - send events by the consumable write-off entity, 0 - do
                    not send
                goods_operations_stolen:
                  type: number
                  description: >-
                    1 - send events by the product write-off entity, 0 - do not
                    send
                goods_operations_move:
                  type: number
                  description: 1 - send events by the product movement entity, 0 - no send
                finances_operation:
                  type: number
                  description: 1 - send events by entity financial operation, 0 - no send
                self_sending:
                  type: number
                  description: >-
                    1 - The webhook creator will receive events triggered by
                    their own actions, 0 - The webhook creator will not receive
                    events triggered by their own actions
              example:
                urls:
                  - https://dev.tools.test.com/test/Hooks
                active: 0
                salon: 1
                service_category: 0
                service: 1
                good: 1
                master: 1
                client: 1
                record: 1
                goods_operations_sale: 1
                goods_operations_receipt: 1
                goods_operations_consumable: 1
                goods_operations_stolen: 1
                goods_operations_move: 1
                finances_operation: 1
                self_sending: 0
        required: false
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/hooks_settings_response_data_types'
              example:
                success: true
                data:
                  urls:
                    - https://dev.tools.test.com/test/Hooks
                  active: 0
                  salon: 1
                  service_category: 0
                  service: 1
                  master: 1
                  client: 1
                  record: 1
                  goods_operations_sale: 1
                  goods_operations_receipt: 1
                  goods_operations_consumable: 1
                  goods_operations_stolen: 1
                  goods_operations_move: 1
                  finances_operation: 1
                meta: []
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/401_unauthorized_response'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/403_forbidden_response'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/404_not_found_response'
      x-codegen-request-body-name: body
  /voip/integration:
    post:
      tags:
        - VoIP Integration
      security:
        - BearerPartner: []
      summary: VoIP events
      operationId: handle_voip_integration_event
      description: >-
        #### Enable integration

        To use the api and activate access to the settings in the user
        interface, you need to activate the integration by sending the "Enable
        integration" request. After a successful connection, access to the
        section with routing settings will be opened in the chain user
        interface.


        #### Disable integration

        To disable the integration, you can use the "Disable integration"
        method. After the integration is disabled, access to the user interface
        settings section is closed, the requests "Call notification" and "Call
        information saving" are not processed.


        #### Call notification

        To display notifications about an incoming call, the "Call notification"
        method is used, the call type ("incoming", "outgoing", "internal") is
        specified in the parameters, but currently notifications are displayed
        only for the "incoming" value. Notifications are displayed for users
        defined based on routing settings. When specifying the "user" and
        "diversion" parameters at the same time, "user" is the priority when
        searching for routes.


        #### Saving call information

        The information about the call is automatically saved to the chain
        history and to the history of chain locations in accordance with the
        call routing settings.
      parameters:
        - name: Accept
          in: header
          description: e.g. application/vnd.api.v2+json
          required: true
          schema:
            type: string
          example: application/vnd.api.v2+json
        - name: Content-Type
          in: header
          description: application/json
          required: true
          schema:
            type: string
        - name: Authorization
          in: header
          description: Bearer partner_token
          required: true
          schema:
            type: string
      requestBody:
        description: Request bodies
        content:
          application/json:
            schema:
              anyOf:
                - $ref: >-
                    #/components/schemas/voip_integration_enable_request_data_types
                - $ref: >-
                    #/components/schemas/voip_integration_disable_request_data_types
                - $ref: >-
                    #/components/schemas/voip_integration_history_request_data_types
                - $ref: >-
                    #/components/schemas/voip_integration_notification_request_data_types
        required: true
      responses:
        '202':
          description: Accepted
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/voip_integration_response_data_types'
              example:
                success: true
                meta:
                  message: Accepted
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/401_unauthorized_response'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/403_forbidden_response'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/404_not_found_response'
      x-codegen-request-body-name: body.
  /voip/integration/calls:
    get:
      tags:
        - VoIP Integration
      summary: Get Location's Call List
      description: >
        This endpoint is designed to get a list of calls in a location, taking
        into account filters and pagination
      operationId: list_voip_calls
      security:
        - BearerPartnerUser: []
      parameters:
        - name: Accept
          in: header
          description: e.g. application/vnd.api.v2+json
          required: true
          schema:
            type: string
          example: application/vnd.api.v2+json
      requestBody:
        content:
          application/json:
            schema:
              required:
                - salon_id
                - date_from
                - date_to
              type: object
              properties:
                salon_id:
                  type: number
                  description: Location ID.
                  example: 615243
                date_from:
                  type: string
                  description: Start date.
                  example: '2026-01-01'
                date_to:
                  type: string
                  description: End date.
                  example: '2026-02-01'
                phone:
                  type: string
                  description: Phone number.
                  example: '+13155550175'
                types:
                  type: array
                  description: Call types list
                  items:
                    type: string
                    enum:
                      - incoming
                      - outgoing
                      - internal
                  example:
                    - incoming
                    - internal
                statuses:
                  type: array
                  description: Call statuses list
                  items:
                    type: string
                    enum:
                      - success
                      - missed
                      - cancel
                      - busy
                      - notallowed
                      - notavailable
                      - notfound
                  example:
                    - success
                    - cancel
                page:
                  type: number
                  description: Page number
                  example: 1
                limit:
                  type: number
                  description: Amount of elements on page
                  example: 25
                  maximum: 1000
      responses:
        '200':
          description: Calls list
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    $ref: '#/components/schemas/response_success_true_object'
                  data:
                    type: array
                    description: Calls list
                    items:
                      type: object
                      properties:
                        id:
                          type: integer
                          description: Call ID
                        client_id:
                          type: integer
                          description: Client ID (if there is a client in Clients Base)
                        caller_phone:
                          type: string
                          description: Phone number
                        record_link:
                          type: string
                          description: Link to call recording (if available)
                        duration:
                          type: integer
                          description: Call duration in seconds
                        status:
                          type: string
                          enum:
                            - success
                            - missed
                            - cancel
                            - busy
                            - notallowed
                            - notavailable
                            - notfound
                          description: Call status
                        type:
                          type: string
                          description: Call type
                          enum:
                            - incoming
                            - outgoing
                            - internal
                        call_date:
                          type: string
                          description: Date and time of call
                  meta:
                    $ref: '#/components/schemas/response_meta_empty_object'
                example:
                  success: true
                  data:
                    - id: 8923525
                      client_id: 51342134
                      caller_phone: '+13155550175'
                      record_link: https://records.example.com/somelink.mp3
                      duration: 244
                      status: success
                      type: outgoing
                      call_date: '2026-01-17T23:52:21-05:00'
                    - id: 66795308
                      client_id: 0
                      caller_phone: '+13155550175'
                      record_link: ''
                      duration: 0
                      status: missed
                      type: incoming
                      call_date: '2026-01-17T12:31:12-05:00'
        '401':
          description: Partner token not passed.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/401_unauthorized_response'
        '403':
          description: No access (requires the right to view "Overview - Calls").
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/403_forbidden_response'
  /countries:
    get:
      tags:
        - Dictionaries
      security:
        - BearerPartner: []
      summary: Get a list of countries
      operationId: get_country_list
      parameters:
        - name: Accept
          in: header
          description: e.g. application/vnd.api.v2+json
          required: true
          schema:
            type: string
          example: application/vnd.api.v2+json
        - name: Content-Type
          in: header
          description: application/json
          required: true
          schema:
            type: string
        - name: Authorization
          in: header
          description: Bearer partner_token
          required: true
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/countries_response_data_types'
              example:
                success: true
                data:
                  - id: 7
                    title: USA
                    full_title: United States
                    iso_code: US
                    phone_code: '1'
                    phone_template: +1 xxx-xxx-xxxx
                    phone_example: +1 201-123-4567
                    currency: $
                    exchange: 32.99
                    lang_id: 2
                    group_type: 1
                  - id: 56
                    title: France
                    full_title: France
                    iso_code: FR
                    phone_code: '33'
                    phone_template: +33 x xx xx xx xx
                    phone_example: +33 1 23 45 67 89
                    currency: €
                    exchange: 11.18
                    lang_id: 8
                    group_type: 1
                meta: []
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/401_unauthorized_response'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/403_forbidden_response'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/404_not_found_response'
  /cities:
    get:
      tags:
        - Dictionaries
      security:
        - BearerPartner: []
      summary: Get a list of cities
      operationId: get_city_list
      parameters:
        - name: Accept
          in: header
          description: e.g. application/vnd.api.v2+json
          required: true
          schema:
            type: string
          example: application/vnd.api.v2+json
        - name: country_id
          in: query
          description: Country ID to get cities from
          schema:
            type: number
        - name: company_id
          in: query
          description: >-
            Location ID. If passed, the city of the location will also be
            returned, regardless of whether it belongs to the specified country
            or not
          schema:
            type: number
        - name: Content-Type
          in: header
          description: application/json
          required: true
          schema:
            type: string
        - name: Authorization
          in: header
          description: Bearer partner_token
          required: true
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/cities_response_data_types'
              example:
                success: true
                data:
                  - id: 2
                    country_id: 7
                    title: New York
                  - id: 1040
                    country_id: 30
                    title: Belfast
                  - id: 1201
                    country_id: 38
                    title: București
                  - id: 1334
                    country_id: 31
                    title: Budapest
                meta: []
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/401_unauthorized_response'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/403_forbidden_response'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/404_not_found_response'
  /references/business_groups_with_types:
    get:
      tags:
        - Dictionaries
      security:
        - BearerPartner: []
      summary: Get business types by group
      operationId: get_business_types_by_group
      parameters:
        - name: Accept
          in: header
          description: e.g. application/vnd.api.v2+json
          required: true
          schema:
            type: string
          example: application/vnd.api.v2+json
        - name: Content-Type
          in: header
          description: application/json
          required: true
          schema:
            type: string
        - name: Authorization
          in: header
          description: Bearer partner_token, User user_token
          required: true
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/references_business_group_response_data_types
              example:
                success: true
                data:
                  - id: 10
                    title: Domestic services
                    image: https://app.alteg.io/images/business-groups/services.png
                    types:
                      - id: 31
                        title: Studio
                        business_group_id: 10
                  - id: 1
                    title: beauty
                    image: https://app.alteg.io/images/business-groups/beauty.png
                    types:
                      - id: 1
                        title: Beauty Salons
                        business_group_id: 1
                      - id: 25
                        title: Spa
                        business_group_id: 1
                meta:
                  count: 10
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/401_unauthorized_response'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/403_forbidden_response'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/404_not_found_response'
components:
  securitySchemes:
    BearerPartner:
      type: http
      scheme: bearer
      bearerFormat: Bearer {PartnerToken}
      description: Partner API token for accessing developer endpoints
    BearerPartnerUser:
      type: http
      scheme: bearer
      bearerFormat: Bearer {PartnerToken}, User {UserToken}
      description: Combined partner and user tokens for authenticated user operations
  schemas:
    companies_data_types:
      title: Root Type for companies_data_types
      type: object
      properties:
        success:
          type: boolean
          description: Success status (true)
        data:
          type: array
          description: Array of objects
          items:
            type: object
            additionalProperties: true
            properties:
              id:
                type: number
                description: location ID
              title:
                type: string
                description: location name
              public_title:
                type: string
                description: Public display name of the location
              short_descr:
                type: string
                description: location category
              logo:
                type: string
                description: location logo image address
              active:
                type: integer
                description: Is the location active (1 = active, 0 = inactive)
              phone:
                type: string
                description: location phone number
              phones:
                type: array
                description: Array of location phone numbers
                items:
                  type: string
              email:
                type: string
                description: Location email address
              country_id:
                type: number
                description: Identifier of the country in which the location is located
              schedule:
                type: string
                description: location schedule
              country:
                type: string
                description: location country name
              city_id:
                type: number
                description: City ID where the location is located
              city:
                type: string
                description: location city name
              timezone:
                type: number
                description: Timezone offset in hours
              timezone_name:
                type: string
                description: timezone locations
              address:
                type: string
                description: Address where the location is located
              coordinate_lat:
                type: number
                description: Latitude
                format: float
              coordinate_lon:
                type: number
                description: Longitude
                format: float
              phone_confirmation:
                type: boolean
                description: Do I need to confirm my phone number via SMS when appointment?
              active_staff_count:
                type: number
                description: Number of team members available for appointment
              next_slot:
                type: string
                description: >-
                  Date and time of the next free session in the location
                  (ISO8601). The field will be present only if the GET parameter
                  forBooking=1 is passed
                format: date-time
              app_ios:
                type: string
                description: Link to iOS App
              app_android:
                type: string
                description: Link to app for Android
              currency_short_title:
                type: string
                description: Abbreviated currency name
              reminds_sms_disabled:
                type: boolean
                description: SMS reminders disabled
              reminds_sms_default:
                type: integer
                description: Default SMS reminder setting
              group_priority:
                type: number
                description: >-
                  The higher the priority, the higher the location when
                  displayed in the list of chain locations
              bookform_group_priority:
                type: number
                description: Priority for booking form display
              description:
                type: string
                description: Full HTML description of the location
              photos:
                type: array
                description: Array of location photo paths
                items:
                  type: string
              company_photos:
                type: array
                description: Array of full location photo URLs
                items:
                  type: string
              booking_widget_promo:
                type:
                  - object
                  - 'null'
                description: Booking widget promo configuration
        meta:
          type: array
          description: Metadata (empty array)
          items:
            type: object
      description: Get a list of locations
      example:
        success: true
        data:
          - id: 1050
            title: La Visage
            public_title: La Visage Beauty
            short_descr: Beauty saloon
            logo: https://app.alteg.io/images/no-master.png
            active: 1
            phone: '+13155550175'
            phones:
              - '+13155550175'
            email: info@lavisage.com
            country_id: 7
            schedule: ''
            country: United States
            city_id: 181
            city: New York
            timezone: -5
            timezone_name: America/New_York
            address: New York, 787 Jackson Drive
            coordinate_lat: 40.73061
            coordinate_lon: -73.935242
            phone_confirmation: true
            active_staff_count: 2
            next_slot: '2026-03-23T10:10:00-05:00'
            app_ios: ''
            app_android: ''
            currency_short_title: $
            reminds_sms_disabled: false
            reminds_sms_default: 1
            group_priority: 900
            bookform_group_priority: 0
            description: <p>Welcome to La Visage</p>
            photos: []
            booking_widget_promo: null
        meta: []
    response_success_false_object:
      title: Unsuccessful response status
      type: boolean
      description: Response status.
      example: false
    response_data_null_object:
      title: No data in response
      type:
        - object
        - 'null'
      description: Response data.
      example: null
    response_meta_error_unauthorized_object:
      title: Response error message
      type: object
      description: Additional response data.
      properties:
        message:
          type: string
          description: Error message.
          example: Authentication needed.
    401_unauthorized_response:
      type: object
      properties:
        success:
          $ref: '#/components/schemas/response_success_false_object'
        data:
          $ref: '#/components/schemas/response_data_null_object'
        meta:
          $ref: '#/components/schemas/response_meta_error_unauthorized_object'
    response_meta_error_forbidden_object:
      title: Response error message
      type: object
      description: Additional response data.
      properties:
        message:
          type: string
          description: Error message.
          example: Access denied.
    403_forbidden_response:
      type: object
      properties:
        success:
          $ref: '#/components/schemas/response_success_false_object'
        data:
          $ref: '#/components/schemas/response_data_null_object'
        meta:
          $ref: '#/components/schemas/response_meta_error_forbidden_object'
    response_success_true_object:
      title: Successful response status
      type: boolean
      description: Response status.
      example: true
    response_meta_empty_object:
      title: Empty meta object
      type:
        - object
        - array
      description: Additional response data (empty object or empty array)
      example: {}
    404_not_found_response:
      type: object
      properties:
        success:
          $ref: '#/components/schemas/response_success_false_object'
        data:
          $ref: '#/components/schemas/response_data_null_object'
        meta:
          $ref: '#/components/schemas/response_meta_empty_object'
    200_success_response:
      type: object
      properties:
        success:
          $ref: '#/components/schemas/response_success_true_object'
        data:
          $ref: '#/components/schemas/response_data_null_object'
        meta:
          $ref: '#/components/schemas/response_meta_empty_object'
    response_meta_validation_exception_object:
      title: Request validation error message
      type: object
      description: Additional response data.
      properties:
        message:
          type: string
          description: Error message.
          example: An error has occurred.
        errors:
          type: array
          description: Set of a validation error messages.
          items:
            type: object
            additionalProperties: true
    422_unprocessable_entity_response:
      type: object
      properties:
        success:
          $ref: '#/components/schemas/response_success_false_object'
        data:
          $ref: '#/components/schemas/response_data_null_object'
        meta:
          $ref: '#/components/schemas/response_meta_validation_exception_object'
    hooks_settings_response_data_types:
      title: Root Type for hooks_settings_response_data_types
      type: object
      properties:
        success:
          type: boolean
          description: Execution success status (true)
        data:
          type: object
          properties:
            urls:
              type: array
              description: List of addresses to send notifications to
              items:
                type: string
            active:
              type: integer
              description: 1 - notifications are active, 0 - not active
              format: int32
            salon:
              type: integer
              description: 1 - send events by location entity, 0 - do not send
              format: int32
            service_category:
              type: integer
              description: 1 - send events by service category entity, 0 - do not send
              format: int32
            service:
              type: integer
              description: 1 - send events by service entity, 0 - do not send
              format: int32
            good:
              type: integer
              description: 1 - send events by product entity, 0 - don't send
              format: int32
            master:
              type: integer
              description: 1 - send events by team member entity, 0 - don't send
              format: int32
            client:
              type: integer
              description: 1 - send events by client entity, 0 - don't send
              format: int32
            record:
              type: integer
              description: 1 - send events by appointment entity, 0 - do not send
              format: int32
            goods_operations_sale:
              type: integer
              description: 1 - send events by the product sale entity, 0 - do not send
              format: int32
            goods_operations_receipt:
              type: integer
              description: >-
                1 - send events by the entity arrival of products, 0 - do not
                send
              format: int32
            goods_operations_consumable:
              type: integer
              description: >-
                1 - send events by the consumable write-off entity, 0 - do not
                send
              format: int32
            goods_operations_stolen:
              type: integer
              description: 1 - send events by the product write-off entity, 0 - do not send
              format: int32
            goods_operations_move:
              type: integer
              description: 1 - send events by the product movement entity, 0 - no send
              format: int32
            finances_operation:
              type: integer
              description: 1 - send events by entity financial operation, 0 - no send
              format: int32
          description: Object with data
        meta:
          type: array
          description: Metadata (empty array)
          items:
            type: object
      description: Event notification settings
      example:
        success: true
        data:
          urls:
            - https://dev.tools.test.com/test/Hooks
          active: 0
          salon: 1
          service_category: 0
          service: 1
          good: 1
          master: 1
          client: 1
          record: 1
          goods_operations_sale: 1
          goods_operations_receipt: 1
          goods_operations_consumable: 1
          goods_operations_stolen: 1
          goods_operations_move: 1
          finances_operation: 1
        meta: []
    voip_integration_enable_request_data_types:
      title: Connect Integration
      required:
        - command
        - crm_token
        - type
      type: object
      properties:
        command:
          type: string
          description: 'Operation type: ''setup'''
        type:
          type: string
          description: Operation type, in this case 'enable'
        crm_token:
          type: string
          description: CRM-token from the VoIP Integration in the client's chain section
      description: Connect integration
      example:
        command: setup
        type: enable
        crm_token: 7cf262d6-1656-43f9-86ac-2826bdc125d2
    voip_integration_disable_request_data_types:
      title: Disable integration
      required:
        - command
        - crm_token
        - type
      type: object
      properties:
        command:
          type: string
          description: 'Operation type: ''setup'''
        type:
          type: string
          description: Operation type, in this case 'disable'
        crm_token:
          type: string
          description: CRM-token from the VoIP Integration in the client's chain section
      description: Disable Integration
      example:
        command: setup
        type: disable
        crm_token: 7cf262d6-1656-43f9-86ac-2826bdc125d2
    voip_integration_history_request_data_types:
      title: Saving call information
      required:
        - command
        - crm_token
        - diversion
        - phone
        - type
      type: object
      properties:
        command:
          type: string
          description: 'Operation type: ''history'''
        type:
          type: string
          description: Operation type ("incoming", "outgoing", "internal")
        crm_token:
          type: string
          description: CRM-token from the VoIP Integration in the client's chain section
        phone:
          type: string
          description: Caller number
        user:
          type: string
          description: SIP subscriber ID
        diversion:
          type: string
          description: The number through which the call came
        duration:
          type: number
          description: Call duration (in seconds)
        link:
          type: string
          description: Call recording link
        call_id:
          type: string
          description: Call ID in voip system
        status:
          type: string
          description: Call status 'success'|'missed'
        date:
          type: string
          description: Date and time of the call (ISO8601)
          format: date-time
      description: Save Call Information
      example:
        command: history
        type: incoming
        crm_token: 7cf262d6-1656-43f9-86ac-2826bdc125d2
        phone: '+13155550175'
        user: external_user_id
        diversion: '+13155550176'
        duration: 90
        link: https://external.call.storage/call_record.mp3
        call_id: external_call_id
        status: success
        date: '2026-09-01T14:40:28-05:00'
    voip_integration_notification_request_data_types:
      title: call notification
      required:
        - command
        - crm_token
        - diversion
        - phone
        - type
      type: object
      properties:
        command:
          type: string
          description: 'Operation type: ''event'''
        type:
          type: string
          description: Operation type, in this case "incoming"
        crm_token:
          type: string
          description: CRM-token from the VoIP Integration in the client's chain section
        phone:
          type: string
          description: Caller number
        user:
          type: string
          description: SIP number
        diversion:
          type: string
          description: The number through which the call came
      description: Call Notification
      example:
        command: event
        type: incoming
        crm_token: 7cf262d6-1656-43f9-86ac-2826bdc125d2
        phone: '+13155550175'
        user: external_user_id
        diversion: '+13155550176'
    voip_integration_response_data_types:
      title: Root Type for voip_integration_setup_response_data_types
      type: object
      properties:
        success:
          type: boolean
          description: Success status (true)
        data:
          type: string
          description: Contains null
        meta:
          type: object
          properties:
            message:
              type: string
          description: Metadata (contain an "Accepted" message)
      description: Connect Integration
      example:
        success: true
        meta:
          message: Accepted
    countries_response_data_types:
      title: Root Type for countries_response_data_types
      type: object
      properties:
        success:
          type: boolean
          description: Execution success status (true)
        data:
          type: array
          description: Array of objects with data
          items:
            type: object
            properties:
              id:
                type: number
                description: Country ID
              title:
                type: string
                description: Short country name
              full_title:
                type: string
                description: Full country name
              iso_code:
                type: string
                description: ISO 3166-1 alpha-2 country code
              phone_code:
                type: string
                description: Country phone code
              phone_template:
                type: string
                description: Country phone number mask
              phone_example:
                type: string
                description: Country phone number example
              currency:
                type: string
                description: Country currency symbol
              exchange:
                type: number
                description: Currency exchange rate
              lang_id:
                type: number
                description: Language ID
              group_type:
                type: number
                description: Country group type
              is_eu:
                type: boolean
                description: Whether the country is in the European Union
        meta:
          type: array
          description: Metadata (empty array)
          items:
            type: object
      description: Get a list of countries
      example:
        success: true
        data:
          - id: 7
            title: USA
            full_title: United States
            iso_code: US
            phone_code: '1'
            phone_template: +1 xxx-xxx-xxxx
            phone_example: +1 201-123-4567
            currency: $
            exchange: 32.99
            lang_id: 2
            group_type: 1
            is_eu: false
          - id: 56
            title: France
            full_title: France
            iso_code: FR
            phone_code: '33'
            phone_template: +33 x xx xx xx xx
            phone_example: +33 1 23 45 67 89
            currency: €
            exchange: 11.18
            lang_id: 8
            group_type: 1
            is_eu: true
        meta: []
    cities_response_data_types:
      title: Root Type for cities_response_data_types
      type: object
      properties:
        success:
          type: boolean
          description: Execution success status (true)
        data:
          type: array
          description: Array of objects with data
          items:
            type: object
            properties:
              id:
                type: number
                description: City ID
              country_id:
                type: number
                description: Country ID
              title:
                type: string
                description: City name
        meta:
          type: array
          description: Metadata (empty array)
          items:
            type: object
      description: Get a list of cities
      example:
        success: true
        data:
          - id: 2
            country_id: 7
            title: New York
          - id: 1040
            country_id: 30
            title: Belfast
          - id: 1201
            country_id: 38
            title: București
          - id: 1334
            country_id: 31
            title: Budapest
        meta: []
    references_business_group_response_data_types:
      title: Root Type for references_business_group_response_data_types
      type: object
      properties:
        success:
          type: boolean
          description: Execution success status (true)
        data:
          type: array
          description: Array of objects with data
          items:
            type: object
            additionalProperties: true
            properties:
              id:
                type: number
                description: Category ID
              title:
                type: string
                description: name of category
              image:
                type: string
                description: Group image
              image_small:
                type: string
                description: Group small image
              types:
                type: array
                description: Related business types
                items:
                  type: object
                  properties:
                    id:
                      type: number
                      description: Type identifier
                    title:
                      type: string
                      description: Type name
                    business_group_id:
                      type: number
                      description: Business group ID
        meta:
          type: object
          properties:
            count:
              type: integer
              format: int32
          description: Metadata (contains the number of business types found)
      description: Getting a list of business types grouped by group
      example:
        success: true
        data:
          - id: 10
            title: Domestic services
            image: https://app.alteg.io/images/business-groups/services.png
            types:
              - id: 31
                title: Studio
                business_group_id: 10
          - id: 1
            title: beauty
            image: https://app.alteg.io/images/business-groups/beauty.png
            types:
              - id: 1
                title: Beauty Salons
                business_group_id: 1
              - id: 25
                title: Spa
                business_group_id: 1
        meta:
          count: 10
