openapi: 3.0.3
info:
  title: Laravel
  description: 'OpenAPI documentation for the application'
  version: 1.0.0
servers:
  -
    url: 'https://availability-prod.dataverse.gr'
paths:
  /api/personal-access-tokens:
    post:
      summary: 'Create api token'
      operationId: createApiToken
      description: "Authenticate by username and password (log-in).\nUsing the Avail API from server applications,\njust use the access token you received.\nNo need for username-password login."
      parameters: []
      responses: {  }
      tags:
        - Authentication
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                email:
                  type: string
                  description: 'Credentials: test user email. Must be a valid email address.'
                  example: sdm@dataverse.gr
                  nullable: false
                password:
                  type: string
                  description: 'Credentials: test user password.'
                  example: someHAPPYp@ssw0rd
                  nullable: false
                domain:
                  type: string
                  description: 'The domain of the user company.'
                  example: dataverse.gr
                  nullable: false
              required:
                - email
                - password
                - domain
      security: []
  /api/personal-access-tokens/current/refresh:
    post:
      summary: 'Refresh api token'
      operationId: refreshApiToken
      description: 'Create a new api token for the logged in user.'
      parameters: []
      responses: {  }
      tags:
        - Authentication
  /api/personal-access-tokens/current:
    delete:
      summary: 'Delete api token'
      operationId: deleteApiToken
      description: 'Delete token for the logged in user (log-out).'
      parameters: []
      responses: {  }
      tags:
        - Authentication
  /api/availability-calculation-sessions:
    post:
      summary: Create
      operationId: create
      description: 'Store an availability calculation session'
      parameters: []
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  data:
                    id: a859cf61-2467-3252-9256-0bcbc0a340a7
                    date_from: 1704528000
                    date_from_string: '2024-01-06T08:00:00+00:00'
                    date_until: 1704985200
                    date_until_string: '2024-01-11T15:00:00+00:00'
                    status: SUCCESS
                    error: null
                    time_constrained_entity_groups:
                      -
                        time_constrained_entity_ids:
                          - 9b0516c6-10a5-4da0-b17d-8898b5adb0b4
                          - 9b05144b-93fd-4e53-8fe0-d690f35f7cef
                          - 9aff2f1a-9c34-40f7-9a35-ae22c309f925
                        availability_calculation_days:
                          -
                            id: c4907188-62e5-47d8-9211-e6262c7e9815
                            availabilities: []
                          -
                            id: ee146a4f-050b-45bb-86e1-c52dc4a3590f
                            availabilities: []
                          -
                            id: 509f3ac1-8c28-47da-ae8a-11d3eaae4486
                            availabilities: []
                          -
                            id: b73ae99a-bc55-4bf9-bd9d-bd26dc501d93
                            availabilities: []
                          -
                            id: 6e9910de-f27a-4aa0-85f4-d88160a6d5fd
                            availabilities:
                              -
                                start: 1704877200
                                start_str: '2024-01-10T09:00:00.000000Z'
                                end: 1704905940
                                end_str: '2024-01-10T16:59:00.000000Z'
                          -
                            id: 2b74bc10-6000-4d8f-8aea-fe8434536446
                            availabilities:
                              -
                                start: 1704956400
                                start_str: '2024-01-11T07:00:00.000000Z'
                                end: 1704985140
                                end_str: '2024-01-11T14:59:00.000000Z'
                        availabilities:
                          -
                            start: 1704877200
                            start_str: '2024-01-10T09:00:00.000000Z'
                            end: 1704905940
                            end_str: '2024-01-10T16:59:00.000000Z'
                          -
                            start: 1704956400
                            start_str: '2024-01-11T07:00:00.000000Z'
                            end: 1704985140
                            end_str: '2024-01-11T14:59:00.000000Z'
                    availabilities:
                      -
                        start: 1704877200
                        start_str: '2024-01-10T09:00:00.000000Z'
                        end: 1704905940
                        end_str: '2024-01-10T16:59:00.000000Z'
                      -
                        start: 1704956400
                        start_str: '2024-01-11T07:00:00.000000Z'
                        end: 1704985140
                        end_str: '2024-01-11T14:59:00.000000Z'
                properties:
                  data:
                    type: object
                    properties:
                      id:
                        type: string
                        example: a859cf61-2467-3252-9256-0bcbc0a340a7
                      date_from:
                        type: integer
                        example: 1704528000
                      date_from_string:
                        type: string
                        example: '2024-01-06T08:00:00+00:00'
                      date_until:
                        type: integer
                        example: 1704985200
                      date_until_string:
                        type: string
                        example: '2024-01-11T15:00:00+00:00'
                      status:
                        type: string
                        example: SUCCESS
                      error:
                        type: string
                        example: null
                      time_constrained_entity_groups:
                        type: array
                        example:
                          -
                            time_constrained_entity_ids:
                              - 9b0516c6-10a5-4da0-b17d-8898b5adb0b4
                              - 9b05144b-93fd-4e53-8fe0-d690f35f7cef
                              - 9aff2f1a-9c34-40f7-9a35-ae22c309f925
                            availability_calculation_days:
                              -
                                id: c4907188-62e5-47d8-9211-e6262c7e9815
                                availabilities: []
                              -
                                id: ee146a4f-050b-45bb-86e1-c52dc4a3590f
                                availabilities: []
                              -
                                id: 509f3ac1-8c28-47da-ae8a-11d3eaae4486
                                availabilities: []
                              -
                                id: b73ae99a-bc55-4bf9-bd9d-bd26dc501d93
                                availabilities: []
                              -
                                id: 6e9910de-f27a-4aa0-85f4-d88160a6d5fd
                                availabilities:
                                  -
                                    start: 1704877200
                                    start_str: '2024-01-10T09:00:00.000000Z'
                                    end: 1704905940
                                    end_str: '2024-01-10T16:59:00.000000Z'
                              -
                                id: 2b74bc10-6000-4d8f-8aea-fe8434536446
                                availabilities:
                                  -
                                    start: 1704956400
                                    start_str: '2024-01-11T07:00:00.000000Z'
                                    end: 1704985140
                                    end_str: '2024-01-11T14:59:00.000000Z'
                            availabilities:
                              -
                                start: 1704877200
                                start_str: '2024-01-10T09:00:00.000000Z'
                                end: 1704905940
                                end_str: '2024-01-10T16:59:00.000000Z'
                              -
                                start: 1704956400
                                start_str: '2024-01-11T07:00:00.000000Z'
                                end: 1704985140
                                end_str: '2024-01-11T14:59:00.000000Z'
                        items:
                          type: object
                          properties:
                            time_constrained_entity_ids:
                              type: array
                              example:
                                - 9b0516c6-10a5-4da0-b17d-8898b5adb0b4
                                - 9b05144b-93fd-4e53-8fe0-d690f35f7cef
                                - 9aff2f1a-9c34-40f7-9a35-ae22c309f925
                              items:
                                type: string
                            availability_calculation_days:
                              type: array
                              example:
                                -
                                  id: c4907188-62e5-47d8-9211-e6262c7e9815
                                  availabilities: []
                                -
                                  id: ee146a4f-050b-45bb-86e1-c52dc4a3590f
                                  availabilities: []
                                -
                                  id: 509f3ac1-8c28-47da-ae8a-11d3eaae4486
                                  availabilities: []
                                -
                                  id: b73ae99a-bc55-4bf9-bd9d-bd26dc501d93
                                  availabilities: []
                                -
                                  id: 6e9910de-f27a-4aa0-85f4-d88160a6d5fd
                                  availabilities:
                                    -
                                      start: 1704877200
                                      start_str: '2024-01-10T09:00:00.000000Z'
                                      end: 1704905940
                                      end_str: '2024-01-10T16:59:00.000000Z'
                                -
                                  id: 2b74bc10-6000-4d8f-8aea-fe8434536446
                                  availabilities:
                                    -
                                      start: 1704956400
                                      start_str: '2024-01-11T07:00:00.000000Z'
                                      end: 1704985140
                                      end_str: '2024-01-11T14:59:00.000000Z'
                              items:
                                type: object
                                properties:
                                  id:
                                    type: string
                                    example: c4907188-62e5-47d8-9211-e6262c7e9815
                                  availabilities:
                                    type: array
                                    example: []
                            availabilities:
                              type: array
                              example:
                                -
                                  start: 1704877200
                                  start_str: '2024-01-10T09:00:00.000000Z'
                                  end: 1704905940
                                  end_str: '2024-01-10T16:59:00.000000Z'
                                -
                                  start: 1704956400
                                  start_str: '2024-01-11T07:00:00.000000Z'
                                  end: 1704985140
                                  end_str: '2024-01-11T14:59:00.000000Z'
                              items:
                                type: object
                                properties:
                                  start:
                                    type: integer
                                    example: 1704877200
                                  start_str:
                                    type: string
                                    example: '2024-01-10T09:00:00.000000Z'
                                  end:
                                    type: integer
                                    example: 1704905940
                                  end_str:
                                    type: string
                                    example: '2024-01-10T16:59:00.000000Z'
                      availabilities:
                        type: array
                        example:
                          -
                            start: 1704877200
                            start_str: '2024-01-10T09:00:00.000000Z'
                            end: 1704905940
                            end_str: '2024-01-10T16:59:00.000000Z'
                          -
                            start: 1704956400
                            start_str: '2024-01-11T07:00:00.000000Z'
                            end: 1704985140
                            end_str: '2024-01-11T14:59:00.000000Z'
                        items:
                          type: object
                          properties:
                            start:
                              type: integer
                              example: 1704877200
                            start_str:
                              type: string
                              example: '2024-01-10T09:00:00.000000Z'
                            end:
                              type: integer
                              example: 1704905940
                            end_str:
                              type: string
                              example: '2024-01-10T16:59:00.000000Z'
      tags:
        - 'Availability calculation sessions'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                persist_result:
                  type: boolean
                  description: 'Whether to persist the availability calculation session result. If false or not provided, the result will not be stored in the database.'
                  example: true
                  nullable: true
                date_from:
                  type: integer
                  description: 'The date from to calculate availability for. Unix timestamp (seconds). The value must be a multiple of client time step in seconds.'
                  example: 1704528000
                  nullable: false
                date_until:
                  type: integer
                  description: 'The date until to calculate availability for. Unix timestamp (seconds).'
                  example: 1704639600
                  nullable: false
                time_constrained_entity_groups:
                  type: array
                  description: 'Time constrained entity groups to include in availability queries. A calculation session may contain several time constained entity groups.'
                  example:
                    - []
                  items:
                    type: object
                    properties:
                      time_constrained_entity_ids:
                        type: array
                        description: 'Ids of the the time constrained entities consisting the group. Must be a valid UUID.'
                        example:
                          - 64b507f3-9fbe-34d7-aa3a-ceb2d2682c27
                        items:
                          type: string
                    required:
                      - time_constrained_entity_ids
              required:
                - date_from
                - date_until
                - time_constrained_entity_groups
  '/api/availability-calculation-sessions/{id}':
    get:
      summary: Get
      operationId: get
      description: 'Get an availability calculation session by id'
      parameters: []
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  data:
                    id: 56e2aae1-5b7c-31d3-bc81-f55a5355feea
                    date_from: 1704528000
                    date_from_string: '2024-01-06T08:00:00+00:00'
                    date_until: 1704985200
                    date_until_string: '2024-01-11T15:00:00+00:00'
                    status: SUCCESS
                    error: null
                    time_constrained_entity_groups:
                      -
                        time_constrained_entity_ids:
                          - 9b0516c6-10a5-4da0-b17d-8898b5adb0b4
                          - 9b05144b-93fd-4e53-8fe0-d690f35f7cef
                          - 9aff2f1a-9c34-40f7-9a35-ae22c309f925
                        availability_calculation_days:
                          -
                            id: c4907188-62e5-47d8-9211-e6262c7e9815
                            availabilities: []
                          -
                            id: ee146a4f-050b-45bb-86e1-c52dc4a3590f
                            availabilities: []
                          -
                            id: 509f3ac1-8c28-47da-ae8a-11d3eaae4486
                            availabilities: []
                          -
                            id: b73ae99a-bc55-4bf9-bd9d-bd26dc501d93
                            availabilities: []
                          -
                            id: 6e9910de-f27a-4aa0-85f4-d88160a6d5fd
                            availabilities:
                              -
                                start: 1704877200
                                start_str: '2024-01-10T09:00:00.000000Z'
                                end: 1704905940
                                end_str: '2024-01-10T16:59:00.000000Z'
                          -
                            id: 2b74bc10-6000-4d8f-8aea-fe8434536446
                            availabilities:
                              -
                                start: 1704956400
                                start_str: '2024-01-11T07:00:00.000000Z'
                                end: 1704985140
                                end_str: '2024-01-11T14:59:00.000000Z'
                        availabilities:
                          -
                            start: 1704877200
                            start_str: '2024-01-10T09:00:00.000000Z'
                            end: 1704905940
                            end_str: '2024-01-10T16:59:00.000000Z'
                          -
                            start: 1704956400
                            start_str: '2024-01-11T07:00:00.000000Z'
                            end: 1704985140
                            end_str: '2024-01-11T14:59:00.000000Z'
                    availabilities:
                      -
                        start: 1704877200
                        start_str: '2024-01-10T09:00:00.000000Z'
                        end: 1704905940
                        end_str: '2024-01-10T16:59:00.000000Z'
                      -
                        start: 1704956400
                        start_str: '2024-01-11T07:00:00.000000Z'
                        end: 1704985140
                        end_str: '2024-01-11T14:59:00.000000Z'
                properties:
                  data:
                    type: object
                    properties:
                      id:
                        type: string
                        example: 56e2aae1-5b7c-31d3-bc81-f55a5355feea
                      date_from:
                        type: integer
                        example: 1704528000
                      date_from_string:
                        type: string
                        example: '2024-01-06T08:00:00+00:00'
                      date_until:
                        type: integer
                        example: 1704985200
                      date_until_string:
                        type: string
                        example: '2024-01-11T15:00:00+00:00'
                      status:
                        type: string
                        example: SUCCESS
                      error:
                        type: string
                        example: null
                      time_constrained_entity_groups:
                        type: array
                        example:
                          -
                            time_constrained_entity_ids:
                              - 9b0516c6-10a5-4da0-b17d-8898b5adb0b4
                              - 9b05144b-93fd-4e53-8fe0-d690f35f7cef
                              - 9aff2f1a-9c34-40f7-9a35-ae22c309f925
                            availability_calculation_days:
                              -
                                id: c4907188-62e5-47d8-9211-e6262c7e9815
                                availabilities: []
                              -
                                id: ee146a4f-050b-45bb-86e1-c52dc4a3590f
                                availabilities: []
                              -
                                id: 509f3ac1-8c28-47da-ae8a-11d3eaae4486
                                availabilities: []
                              -
                                id: b73ae99a-bc55-4bf9-bd9d-bd26dc501d93
                                availabilities: []
                              -
                                id: 6e9910de-f27a-4aa0-85f4-d88160a6d5fd
                                availabilities:
                                  -
                                    start: 1704877200
                                    start_str: '2024-01-10T09:00:00.000000Z'
                                    end: 1704905940
                                    end_str: '2024-01-10T16:59:00.000000Z'
                              -
                                id: 2b74bc10-6000-4d8f-8aea-fe8434536446
                                availabilities:
                                  -
                                    start: 1704956400
                                    start_str: '2024-01-11T07:00:00.000000Z'
                                    end: 1704985140
                                    end_str: '2024-01-11T14:59:00.000000Z'
                            availabilities:
                              -
                                start: 1704877200
                                start_str: '2024-01-10T09:00:00.000000Z'
                                end: 1704905940
                                end_str: '2024-01-10T16:59:00.000000Z'
                              -
                                start: 1704956400
                                start_str: '2024-01-11T07:00:00.000000Z'
                                end: 1704985140
                                end_str: '2024-01-11T14:59:00.000000Z'
                        items:
                          type: object
                          properties:
                            time_constrained_entity_ids:
                              type: array
                              example:
                                - 9b0516c6-10a5-4da0-b17d-8898b5adb0b4
                                - 9b05144b-93fd-4e53-8fe0-d690f35f7cef
                                - 9aff2f1a-9c34-40f7-9a35-ae22c309f925
                              items:
                                type: string
                            availability_calculation_days:
                              type: array
                              example:
                                -
                                  id: c4907188-62e5-47d8-9211-e6262c7e9815
                                  availabilities: []
                                -
                                  id: ee146a4f-050b-45bb-86e1-c52dc4a3590f
                                  availabilities: []
                                -
                                  id: 509f3ac1-8c28-47da-ae8a-11d3eaae4486
                                  availabilities: []
                                -
                                  id: b73ae99a-bc55-4bf9-bd9d-bd26dc501d93
                                  availabilities: []
                                -
                                  id: 6e9910de-f27a-4aa0-85f4-d88160a6d5fd
                                  availabilities:
                                    -
                                      start: 1704877200
                                      start_str: '2024-01-10T09:00:00.000000Z'
                                      end: 1704905940
                                      end_str: '2024-01-10T16:59:00.000000Z'
                                -
                                  id: 2b74bc10-6000-4d8f-8aea-fe8434536446
                                  availabilities:
                                    -
                                      start: 1704956400
                                      start_str: '2024-01-11T07:00:00.000000Z'
                                      end: 1704985140
                                      end_str: '2024-01-11T14:59:00.000000Z'
                              items:
                                type: object
                                properties:
                                  id:
                                    type: string
                                    example: c4907188-62e5-47d8-9211-e6262c7e9815
                                  availabilities:
                                    type: array
                                    example: []
                            availabilities:
                              type: array
                              example:
                                -
                                  start: 1704877200
                                  start_str: '2024-01-10T09:00:00.000000Z'
                                  end: 1704905940
                                  end_str: '2024-01-10T16:59:00.000000Z'
                                -
                                  start: 1704956400
                                  start_str: '2024-01-11T07:00:00.000000Z'
                                  end: 1704985140
                                  end_str: '2024-01-11T14:59:00.000000Z'
                              items:
                                type: object
                                properties:
                                  start:
                                    type: integer
                                    example: 1704877200
                                  start_str:
                                    type: string
                                    example: '2024-01-10T09:00:00.000000Z'
                                  end:
                                    type: integer
                                    example: 1704905940
                                  end_str:
                                    type: string
                                    example: '2024-01-10T16:59:00.000000Z'
                      availabilities:
                        type: array
                        example:
                          -
                            start: 1704877200
                            start_str: '2024-01-10T09:00:00.000000Z'
                            end: 1704905940
                            end_str: '2024-01-10T16:59:00.000000Z'
                          -
                            start: 1704956400
                            start_str: '2024-01-11T07:00:00.000000Z'
                            end: 1704985140
                            end_str: '2024-01-11T14:59:00.000000Z'
                        items:
                          type: object
                          properties:
                            start:
                              type: integer
                              example: 1704877200
                            start_str:
                              type: string
                              example: '2024-01-10T09:00:00.000000Z'
                            end:
                              type: integer
                              example: 1704905940
                            end_str:
                              type: string
                              example: '2024-01-10T16:59:00.000000Z'
      tags:
        - 'Availability calculation sessions'
    delete:
      summary: Delete
      operationId: delete
      description: 'Delete an availability calculation session by id'
      parameters: []
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  data:
                    id: 607d5a37-801e-3b7b-b564-9fe0616638a0
                    date_from: 1704528000
                    date_from_string: '2024-01-06T08:00:00+00:00'
                    date_until: 1704985200
                    date_until_string: '2024-01-11T15:00:00+00:00'
                    status: SUCCESS
                    error: null
                    time_constrained_entity_groups:
                      -
                        time_constrained_entity_ids:
                          - 9b0516c6-10a5-4da0-b17d-8898b5adb0b4
                          - 9b05144b-93fd-4e53-8fe0-d690f35f7cef
                          - 9aff2f1a-9c34-40f7-9a35-ae22c309f925
                        availability_calculation_days:
                          -
                            id: c4907188-62e5-47d8-9211-e6262c7e9815
                            availabilities: []
                          -
                            id: ee146a4f-050b-45bb-86e1-c52dc4a3590f
                            availabilities: []
                          -
                            id: 509f3ac1-8c28-47da-ae8a-11d3eaae4486
                            availabilities: []
                          -
                            id: b73ae99a-bc55-4bf9-bd9d-bd26dc501d93
                            availabilities: []
                          -
                            id: 6e9910de-f27a-4aa0-85f4-d88160a6d5fd
                            availabilities:
                              -
                                start: 1704877200
                                start_str: '2024-01-10T09:00:00.000000Z'
                                end: 1704905940
                                end_str: '2024-01-10T16:59:00.000000Z'
                          -
                            id: 2b74bc10-6000-4d8f-8aea-fe8434536446
                            availabilities:
                              -
                                start: 1704956400
                                start_str: '2024-01-11T07:00:00.000000Z'
                                end: 1704985140
                                end_str: '2024-01-11T14:59:00.000000Z'
                        availabilities:
                          -
                            start: 1704877200
                            start_str: '2024-01-10T09:00:00.000000Z'
                            end: 1704905940
                            end_str: '2024-01-10T16:59:00.000000Z'
                          -
                            start: 1704956400
                            start_str: '2024-01-11T07:00:00.000000Z'
                            end: 1704985140
                            end_str: '2024-01-11T14:59:00.000000Z'
                    availabilities:
                      -
                        start: 1704877200
                        start_str: '2024-01-10T09:00:00.000000Z'
                        end: 1704905940
                        end_str: '2024-01-10T16:59:00.000000Z'
                      -
                        start: 1704956400
                        start_str: '2024-01-11T07:00:00.000000Z'
                        end: 1704985140
                        end_str: '2024-01-11T14:59:00.000000Z'
                properties:
                  data:
                    type: object
                    properties:
                      id:
                        type: string
                        example: 607d5a37-801e-3b7b-b564-9fe0616638a0
                      date_from:
                        type: integer
                        example: 1704528000
                      date_from_string:
                        type: string
                        example: '2024-01-06T08:00:00+00:00'
                      date_until:
                        type: integer
                        example: 1704985200
                      date_until_string:
                        type: string
                        example: '2024-01-11T15:00:00+00:00'
                      status:
                        type: string
                        example: SUCCESS
                      error:
                        type: string
                        example: null
                      time_constrained_entity_groups:
                        type: array
                        example:
                          -
                            time_constrained_entity_ids:
                              - 9b0516c6-10a5-4da0-b17d-8898b5adb0b4
                              - 9b05144b-93fd-4e53-8fe0-d690f35f7cef
                              - 9aff2f1a-9c34-40f7-9a35-ae22c309f925
                            availability_calculation_days:
                              -
                                id: c4907188-62e5-47d8-9211-e6262c7e9815
                                availabilities: []
                              -
                                id: ee146a4f-050b-45bb-86e1-c52dc4a3590f
                                availabilities: []
                              -
                                id: 509f3ac1-8c28-47da-ae8a-11d3eaae4486
                                availabilities: []
                              -
                                id: b73ae99a-bc55-4bf9-bd9d-bd26dc501d93
                                availabilities: []
                              -
                                id: 6e9910de-f27a-4aa0-85f4-d88160a6d5fd
                                availabilities:
                                  -
                                    start: 1704877200
                                    start_str: '2024-01-10T09:00:00.000000Z'
                                    end: 1704905940
                                    end_str: '2024-01-10T16:59:00.000000Z'
                              -
                                id: 2b74bc10-6000-4d8f-8aea-fe8434536446
                                availabilities:
                                  -
                                    start: 1704956400
                                    start_str: '2024-01-11T07:00:00.000000Z'
                                    end: 1704985140
                                    end_str: '2024-01-11T14:59:00.000000Z'
                            availabilities:
                              -
                                start: 1704877200
                                start_str: '2024-01-10T09:00:00.000000Z'
                                end: 1704905940
                                end_str: '2024-01-10T16:59:00.000000Z'
                              -
                                start: 1704956400
                                start_str: '2024-01-11T07:00:00.000000Z'
                                end: 1704985140
                                end_str: '2024-01-11T14:59:00.000000Z'
                        items:
                          type: object
                          properties:
                            time_constrained_entity_ids:
                              type: array
                              example:
                                - 9b0516c6-10a5-4da0-b17d-8898b5adb0b4
                                - 9b05144b-93fd-4e53-8fe0-d690f35f7cef
                                - 9aff2f1a-9c34-40f7-9a35-ae22c309f925
                              items:
                                type: string
                            availability_calculation_days:
                              type: array
                              example:
                                -
                                  id: c4907188-62e5-47d8-9211-e6262c7e9815
                                  availabilities: []
                                -
                                  id: ee146a4f-050b-45bb-86e1-c52dc4a3590f
                                  availabilities: []
                                -
                                  id: 509f3ac1-8c28-47da-ae8a-11d3eaae4486
                                  availabilities: []
                                -
                                  id: b73ae99a-bc55-4bf9-bd9d-bd26dc501d93
                                  availabilities: []
                                -
                                  id: 6e9910de-f27a-4aa0-85f4-d88160a6d5fd
                                  availabilities:
                                    -
                                      start: 1704877200
                                      start_str: '2024-01-10T09:00:00.000000Z'
                                      end: 1704905940
                                      end_str: '2024-01-10T16:59:00.000000Z'
                                -
                                  id: 2b74bc10-6000-4d8f-8aea-fe8434536446
                                  availabilities:
                                    -
                                      start: 1704956400
                                      start_str: '2024-01-11T07:00:00.000000Z'
                                      end: 1704985140
                                      end_str: '2024-01-11T14:59:00.000000Z'
                              items:
                                type: object
                                properties:
                                  id:
                                    type: string
                                    example: c4907188-62e5-47d8-9211-e6262c7e9815
                                  availabilities:
                                    type: array
                                    example: []
                            availabilities:
                              type: array
                              example:
                                -
                                  start: 1704877200
                                  start_str: '2024-01-10T09:00:00.000000Z'
                                  end: 1704905940
                                  end_str: '2024-01-10T16:59:00.000000Z'
                                -
                                  start: 1704956400
                                  start_str: '2024-01-11T07:00:00.000000Z'
                                  end: 1704985140
                                  end_str: '2024-01-11T14:59:00.000000Z'
                              items:
                                type: object
                                properties:
                                  start:
                                    type: integer
                                    example: 1704877200
                                  start_str:
                                    type: string
                                    example: '2024-01-10T09:00:00.000000Z'
                                  end:
                                    type: integer
                                    example: 1704905940
                                  end_str:
                                    type: string
                                    example: '2024-01-10T16:59:00.000000Z'
                      availabilities:
                        type: array
                        example:
                          -
                            start: 1704877200
                            start_str: '2024-01-10T09:00:00.000000Z'
                            end: 1704905940
                            end_str: '2024-01-10T16:59:00.000000Z'
                          -
                            start: 1704956400
                            start_str: '2024-01-11T07:00:00.000000Z'
                            end: 1704985140
                            end_str: '2024-01-11T14:59:00.000000Z'
                        items:
                          type: object
                          properties:
                            start:
                              type: integer
                              example: 1704877200
                            start_str:
                              type: string
                              example: '2024-01-10T09:00:00.000000Z'
                            end:
                              type: integer
                              example: 1704905940
                            end_str:
                              type: string
                              example: '2024-01-10T16:59:00.000000Z'
      tags:
        - 'Availability calculation sessions'
    parameters:
      -
        in: path
        name: id
        description: 'The id of the availability calculation session.'
        example: 0ce149e5-caed-4143-a3ea-4359799d53ea
        required: true
        schema:
          type: uuid
  /api/reservations:
    get:
      summary: Index
      operationId: index
      description: 'Get-search reservations.'
      parameters:
        -
          in: query
          name: time_constrained_entity_id
          description: 'Id of the time constrained entity to get reservations for. Must be a valid UUID.'
          example: 1be149e5-caed-4143-a3ea-4359799d53ea
          required: false
          schema:
            type: string
            description: 'Id of the time constrained entity to get reservations for. Must be a valid UUID.'
            example: 1be149e5-caed-4143-a3ea-4359799d53ea
            nullable: true
        -
          in: query
          name: query
          description: 'Any text-query to match definition. Must not be greater than 250 characters.'
          example: 'Mrs Adams'
          required: false
          schema:
            type: string
            description: 'Any text-query to match definition. Must not be greater than 250 characters.'
            example: 'Mrs Adams'
            nullable: true
        -
          in: query
          name: starts_after
          description: 'Unix timestamp (in seconds) UTC to filter reservations starting after the specified date.'
          example: 1706180400
          required: false
          schema:
            type: integer
            description: 'Unix timestamp (in seconds) UTC to filter reservations starting after the specified date.'
            example: 1706180400
            nullable: true
        -
          in: query
          name: ends_before
          description: 'Unix timestamp (in seconds) UTC to filter reservations ending before the specified date.'
          example: 1706180400
          required: false
          schema:
            type: integer
            description: 'Unix timestamp (in seconds) UTC to filter reservations ending before the specified date.'
            example: 1706180400
            nullable: true
        -
          in: query
          name: page_number
          description: 'Page number for pagination. First page is 1. Default: 1. Must be at least 1.'
          example: 1
          required: false
          schema:
            type: integer
            description: 'Page number for pagination. First page is 1. Default: 1. Must be at least 1.'
            example: 1
            nullable: false
        -
          in: query
          name: page_size
          description: 'Page size for pagination. Default: 10. Must be at least 1. Must not be greater than 50.'
          example: 10
          required: false
          schema:
            type: integer
            description: 'Page size for pagination. Default: 10. Must be at least 1. Must not be greater than 50.'
            example: 10
            nullable: false
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  data:
                    -
                      id: 0cdd4730-0ca4-3726-b695-5ed5013b0f46
                      friendly_name: 'Appointment with Mrs Adams'
                      definition:
                        business_logic_key: business_logic_value
                      multiple_reservation_definition_id: null
                      time_constrained_entity_ids:
                        - 00432624-b8b4-30be-9a05-caa2d51469d2
                        - 481b10cc-6233-32d8-a072-9eeb264a164b
                      date_from: 1671926400
                      date_until: 1990742400
                      date_from_string: '2022-12-25T00:00:00+00:00'
                      date_until_string: '2033-01-31T00:00:00+00:00'
                      created_at: null
                      updated_at: null
                      slots_duration: 15
                    -
                      id: 27b14751-a3cd-3318-a4e6-acef8affa661
                      friendly_name: 'Appointment with Mrs Adams'
                      definition:
                        business_logic_key: business_logic_value
                      multiple_reservation_definition_id: null
                      time_constrained_entity_ids:
                        - 5191cde6-173d-3659-aa03-6f07ea2c857f
                        - ce626a78-651f-30f9-bdb7-c763d4c0e94f
                      date_from: 1671926400
                      date_until: 1990742400
                      date_from_string: '2022-12-25T00:00:00+00:00'
                      date_until_string: '2033-01-31T00:00:00+00:00'
                      created_at: null
                      updated_at: null
                      slots_duration: 15
                  meta:
                    total: 43
                    page_number: 2
                    page_size: 10
                properties:
                  data:
                    type: array
                    example:
                      -
                        id: 0cdd4730-0ca4-3726-b695-5ed5013b0f46
                        friendly_name: 'Appointment with Mrs Adams'
                        definition:
                          business_logic_key: business_logic_value
                        multiple_reservation_definition_id: null
                        time_constrained_entity_ids:
                          - 00432624-b8b4-30be-9a05-caa2d51469d2
                          - 481b10cc-6233-32d8-a072-9eeb264a164b
                        date_from: 1671926400
                        date_until: 1990742400
                        date_from_string: '2022-12-25T00:00:00+00:00'
                        date_until_string: '2033-01-31T00:00:00+00:00'
                        created_at: null
                        updated_at: null
                        slots_duration: 15
                      -
                        id: 27b14751-a3cd-3318-a4e6-acef8affa661
                        friendly_name: 'Appointment with Mrs Adams'
                        definition:
                          business_logic_key: business_logic_value
                        multiple_reservation_definition_id: null
                        time_constrained_entity_ids:
                          - 5191cde6-173d-3659-aa03-6f07ea2c857f
                          - ce626a78-651f-30f9-bdb7-c763d4c0e94f
                        date_from: 1671926400
                        date_until: 1990742400
                        date_from_string: '2022-12-25T00:00:00+00:00'
                        date_until_string: '2033-01-31T00:00:00+00:00'
                        created_at: null
                        updated_at: null
                        slots_duration: 15
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                          example: 0cdd4730-0ca4-3726-b695-5ed5013b0f46
                        friendly_name:
                          type: string
                          example: 'Appointment with Mrs Adams'
                        definition:
                          type: object
                          properties:
                            business_logic_key:
                              type: string
                              example: business_logic_value
                        multiple_reservation_definition_id:
                          type: string
                          example: null
                        time_constrained_entity_ids:
                          type: array
                          example:
                            - 00432624-b8b4-30be-9a05-caa2d51469d2
                            - 481b10cc-6233-32d8-a072-9eeb264a164b
                          items:
                            type: string
                        date_from:
                          type: integer
                          example: 1671926400
                        date_until:
                          type: integer
                          example: 1990742400
                        date_from_string:
                          type: string
                          example: '2022-12-25T00:00:00+00:00'
                        date_until_string:
                          type: string
                          example: '2033-01-31T00:00:00+00:00'
                        created_at:
                          type: string
                          example: null
                        updated_at:
                          type: string
                          example: null
                        slots_duration:
                          type: integer
                          example: 15
                  meta:
                    type: object
                    properties:
                      total:
                        type: integer
                        example: 43
                      page_number:
                        type: integer
                        example: 2
                      page_size:
                        type: integer
                        example: 10
      tags:
        - Reservations
    post:
      summary: Create
      operationId: create
      description: 'Store a reservation (recurrent or not recurrent)'
      parameters: []
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  data:
                    id: 401b6c55-106e-390c-8823-9d570090a550
                    friendly_name: 'Appointment with Mrs Adams'
                    definition:
                      business_logic_key: business_logic_value
                    multiple_reservation_definition_id: null
                    time_constrained_entity_ids:
                      - 9bdef32f-c39a-3f7c-a3b8-d008e6df4a93
                      - fe03c8ed-7983-3bd7-98ff-5ab10237d364
                    date_from: 1671926400
                    date_until: 1990742400
                    date_from_string: '2022-12-25T00:00:00+00:00'
                    date_until_string: '2033-01-31T00:00:00+00:00'
                    created_at: null
                    updated_at: null
                    slots_duration: 15
                properties:
                  data:
                    type: object
                    properties:
                      id:
                        type: string
                        example: 401b6c55-106e-390c-8823-9d570090a550
                      friendly_name:
                        type: string
                        example: 'Appointment with Mrs Adams'
                      definition:
                        type: object
                        properties:
                          business_logic_key:
                            type: string
                            example: business_logic_value
                      multiple_reservation_definition_id:
                        type: string
                        example: null
                      time_constrained_entity_ids:
                        type: array
                        example:
                          - 9bdef32f-c39a-3f7c-a3b8-d008e6df4a93
                          - fe03c8ed-7983-3bd7-98ff-5ab10237d364
                        items:
                          type: string
                      date_from:
                        type: integer
                        example: 1671926400
                      date_until:
                        type: integer
                        example: 1990742400
                      date_from_string:
                        type: string
                        example: '2022-12-25T00:00:00+00:00'
                      date_until_string:
                        type: string
                        example: '2033-01-31T00:00:00+00:00'
                      created_at:
                        type: string
                        example: null
                      updated_at:
                        type: string
                        example: null
                      slots_duration:
                        type: integer
                        example: 15
      tags:
        - Reservations
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                friendly_name:
                  type: string
                  description: 'A friendly name for the reservation. Must not be greater than 250 characters.'
                  example: 'Monday appointmentment with Mr. Evans'
                  nullable: false
                definition:
                  type: object
                  description: 'Any JSON for reservation business logic data.'
                  example: null
                  nullable: true
                  properties: {  }
                availability_time_constrained_entity_groups:
                  type: array
                  description: 'Time constrained entity groups to include in availability queries. A calculation session may contain several time constained entity groups.'
                  example:
                    - []
                  items:
                    type: object
                    properties:
                      time_constrained_entity_ids:
                        type: array
                        description: 'Ids of the the time constrained entities consisting the group. Must be a valid UUID.'
                        example:
                          - 7ffc9296-b393-3f30-9b1f-bf73ac24f443
                        items:
                          type: string
                    required:
                      - time_constrained_entity_ids
                reservation_time_constrained_entity_ids:
                  type: array
                  description: 'Ids of the time constrain entities this reservation refers to. Must be a valid UUID.'
                  example:
                    - f3443b07-8e87-3534-818a-0d2894fe4e21
                  items:
                    type: string
                minute_of_day_from:
                  type: integer
                  description: 'The minute of day the reservation starts. First minute of day is 0. For example 420 means the time constraint starts at 07:00 (the first second of 420th minute). The value must be a multiple of client time step in minutes. Must be at least 0. Must not be greater than 1439.'
                  example: 420
                  nullable: false
                minute_of_day_until:
                  type: integer
                  description: 'The minute of day the specific reservation ends. Last minute of day is 1439. For example 479 means the time constraint ends at 08:00 (the last second of 479th minute). The value plus 1, must be a multiple of client time step in minutes. Must be at least 0. Must not be greater than 1439.'
                  example: 479
                  nullable: false
                date_from:
                  type: integer
                  description: 'Unix timestamp (in seconds) UTC of the begining of the day the time constraint starts. For example start of day Tuesday, 09th of January 2024 is 1704758400.'
                  example: 1704758400
                  nullable: false
                date_until:
                  type: integer
                  description: 'Unix timestamp (in seconds) UTC of the begining of the day the time constraint ends. For example start of day Tuesday, 09th of January 2024 is 1704758400. Ignored when recurrence type is 0 (no recurrence). Required in any other case. This field is required unless <code>recurrence_type</code> is in <code>0</code>.'
                  example: 1704758400
                  nullable: true
                recurrence_type:
                  type: integer
                  description: 'No recurrence: 0, Daily: 1, Weekly: 2, Monthly: 3. Must be at least 0. Must not be greater than 3.'
                  example: 2
                  nullable: false
                recurrence_interval:
                  type: integer
                  description: 'Interval of the recurrence. Ignored when recurrence_type is 0 (No recurrence). For example Daily recurrence with interval 2, means every other day. For example Weekly recurrence with interval 1, means every week. For example Monthly recurrence with interval 12, means every year. Meaningless to have interval 0 for recurrence Daily, Weekly or Monthly. This field is required unless <code>recurrence_type</code> is in <code>0</code>. Must be at least 0.'
                  example: 2
                  nullable: false
                recurrence_days_of_month:
                  type: array
                  description: 'First day of month is 1. These values are meaningful only for Monthly recurrence type, ignored when recurrence_type is 0 (No recurrence), 1 (Daily) or 2 (Weekly). Must be at least 1. Must not be greater than 31.'
                  example:
                    - 20
                  items:
                    type: integer
                recurrence_ordinal:
                  type: array
                  description: 'Week days ordinal: first, second, third, fourth, last. These values are meaningful only for Monthly recurrence type, ignored when recurrence_type is 0 (No recurrence), 1 (Daily) or 2 (Weekly).'
                  example:
                    - third
                  items:
                    type: string
                    enum:
                      - first
                      - second
                      - third
                      - fourth
                      - last
                recurrence_week_days:
                  type: array
                  description: 'Week days: monday, tuesday, etc. These values are meaningful only for: a) Monthly recurrence type with some Ordinal or b) Weekly recurrence type. Ignored when recurrence_type is 0 (No recurrence), 1 (Daily).'
                  example:
                    - tuesday
                  items:
                    type: string
                    enum:
                      - monday
                      - tuesday
                      - wednesday
                      - thursday
                      - friday
                      - saturday
                      - sunday
              required:
                - friendly_name
                - availability_time_constrained_entity_groups
                - reservation_time_constrained_entity_ids
                - minute_of_day_from
                - minute_of_day_until
                - date_from
                - recurrence_type
  '/api/reservations/{id}':
    get:
      summary: Get
      operationId: get
      description: 'Get reservation by id'
      parameters: []
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  data:
                    id: 4b0c7887-75d7-3b3c-8e91-d876a1a950e2
                    friendly_name: 'Appointment with Mrs Adams'
                    definition:
                      business_logic_key: business_logic_value
                    multiple_reservation_definition_id: null
                    time_constrained_entity_ids:
                      - f8f26826-3db3-37a7-ae2d-003c0064a78d
                      - 872bbffd-72e4-3ccf-929a-51b1e5cf2581
                    date_from: 1671926400
                    date_until: 1990742400
                    date_from_string: '2022-12-25T00:00:00+00:00'
                    date_until_string: '2033-01-31T00:00:00+00:00'
                    created_at: null
                    updated_at: null
                    slots_duration: 15
                properties:
                  data:
                    type: object
                    properties:
                      id:
                        type: string
                        example: 4b0c7887-75d7-3b3c-8e91-d876a1a950e2
                      friendly_name:
                        type: string
                        example: 'Appointment with Mrs Adams'
                      definition:
                        type: object
                        properties:
                          business_logic_key:
                            type: string
                            example: business_logic_value
                      multiple_reservation_definition_id:
                        type: string
                        example: null
                      time_constrained_entity_ids:
                        type: array
                        example:
                          - f8f26826-3db3-37a7-ae2d-003c0064a78d
                          - 872bbffd-72e4-3ccf-929a-51b1e5cf2581
                        items:
                          type: string
                      date_from:
                        type: integer
                        example: 1671926400
                      date_until:
                        type: integer
                        example: 1990742400
                      date_from_string:
                        type: string
                        example: '2022-12-25T00:00:00+00:00'
                      date_until_string:
                        type: string
                        example: '2033-01-31T00:00:00+00:00'
                      created_at:
                        type: string
                        example: null
                      updated_at:
                        type: string
                        example: null
                      slots_duration:
                        type: integer
                        example: 15
      tags:
        - Reservations
    delete:
      summary: Delete
      operationId: delete
      description: 'Delete reservation by id'
      parameters: []
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  data:
                    id: 69a3d122-08fb-3172-8190-994e650eb251
                    friendly_name: 'Appointment with Mrs Adams'
                    definition:
                      business_logic_key: business_logic_value
                    multiple_reservation_definition_id: null
                    time_constrained_entity_ids:
                      - 870a71e2-3a4b-3ecc-a65a-2c02b1a77e76
                      - aa7eaa51-3b03-3b0d-91ba-44d47df87c3b
                    date_from: 1671926400
                    date_until: 1990742400
                    date_from_string: '2022-12-25T00:00:00+00:00'
                    date_until_string: '2033-01-31T00:00:00+00:00'
                    created_at: null
                    updated_at: null
                    slots_duration: 15
                properties:
                  data:
                    type: object
                    properties:
                      id:
                        type: string
                        example: 69a3d122-08fb-3172-8190-994e650eb251
                      friendly_name:
                        type: string
                        example: 'Appointment with Mrs Adams'
                      definition:
                        type: object
                        properties:
                          business_logic_key:
                            type: string
                            example: business_logic_value
                      multiple_reservation_definition_id:
                        type: string
                        example: null
                      time_constrained_entity_ids:
                        type: array
                        example:
                          - 870a71e2-3a4b-3ecc-a65a-2c02b1a77e76
                          - aa7eaa51-3b03-3b0d-91ba-44d47df87c3b
                        items:
                          type: string
                      date_from:
                        type: integer
                        example: 1671926400
                      date_until:
                        type: integer
                        example: 1990742400
                      date_from_string:
                        type: string
                        example: '2022-12-25T00:00:00+00:00'
                      date_until_string:
                        type: string
                        example: '2033-01-31T00:00:00+00:00'
                      created_at:
                        type: string
                        example: null
                      updated_at:
                        type: string
                        example: null
                      slots_duration:
                        type: integer
                        example: 15
      tags:
        - Reservations
    parameters:
      -
        in: path
        name: id
        description: 'The id of the reservation.'
        example: 0ce149e5-caed-4143-a3ea-4359799d53ea
        required: true
        schema:
          type: uuid
  /api/reservations/batch:
    post:
      summary: 'Batch Create'
      operationId: batchCreate
      description: "Batch store reservations.\nReturns the successfully created reservations (may be empty if silence_no_availability_exceptions is true)."
      parameters: []
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  data:
                    -
                      id: 0adcf4d1-5e2a-3c1b-852e-dd611f453099
                      friendly_name: 'Appointment with Mrs Adams'
                      definition:
                        business_logic_key: business_logic_value
                      multiple_reservation_definition_id: null
                      time_constrained_entity_ids:
                        - d1eb1890-5cd1-39ba-a780-6f70f0e9063c
                        - 28293398-5aec-3110-8e94-9bee393101d8
                      date_from: 1671926400
                      date_until: 1990742400
                      date_from_string: '2022-12-25T00:00:00+00:00'
                      date_until_string: '2033-01-31T00:00:00+00:00'
                      created_at: null
                      updated_at: null
                      slots_duration: 15
                    -
                      id: 5016d31c-87e9-3093-b959-e3513369e22a
                      friendly_name: 'Appointment with Mrs Adams'
                      definition:
                        business_logic_key: business_logic_value
                      multiple_reservation_definition_id: null
                      time_constrained_entity_ids:
                        - ecc69ea0-db55-3d42-9e7d-935455fb2b66
                        - b36a898e-d05e-380a-94a8-b1ab33192d81
                      date_from: 1671926400
                      date_until: 1990742400
                      date_from_string: '2022-12-25T00:00:00+00:00'
                      date_until_string: '2033-01-31T00:00:00+00:00'
                      created_at: null
                      updated_at: null
                      slots_duration: 15
                properties:
                  data:
                    type: array
                    example:
                      -
                        id: 0adcf4d1-5e2a-3c1b-852e-dd611f453099
                        friendly_name: 'Appointment with Mrs Adams'
                        definition:
                          business_logic_key: business_logic_value
                        multiple_reservation_definition_id: null
                        time_constrained_entity_ids:
                          - d1eb1890-5cd1-39ba-a780-6f70f0e9063c
                          - 28293398-5aec-3110-8e94-9bee393101d8
                        date_from: 1671926400
                        date_until: 1990742400
                        date_from_string: '2022-12-25T00:00:00+00:00'
                        date_until_string: '2033-01-31T00:00:00+00:00'
                        created_at: null
                        updated_at: null
                        slots_duration: 15
                      -
                        id: 5016d31c-87e9-3093-b959-e3513369e22a
                        friendly_name: 'Appointment with Mrs Adams'
                        definition:
                          business_logic_key: business_logic_value
                        multiple_reservation_definition_id: null
                        time_constrained_entity_ids:
                          - ecc69ea0-db55-3d42-9e7d-935455fb2b66
                          - b36a898e-d05e-380a-94a8-b1ab33192d81
                        date_from: 1671926400
                        date_until: 1990742400
                        date_from_string: '2022-12-25T00:00:00+00:00'
                        date_until_string: '2033-01-31T00:00:00+00:00'
                        created_at: null
                        updated_at: null
                        slots_duration: 15
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                          example: 0adcf4d1-5e2a-3c1b-852e-dd611f453099
                        friendly_name:
                          type: string
                          example: 'Appointment with Mrs Adams'
                        definition:
                          type: object
                          properties:
                            business_logic_key:
                              type: string
                              example: business_logic_value
                        multiple_reservation_definition_id:
                          type: string
                          example: null
                        time_constrained_entity_ids:
                          type: array
                          example:
                            - d1eb1890-5cd1-39ba-a780-6f70f0e9063c
                            - 28293398-5aec-3110-8e94-9bee393101d8
                          items:
                            type: string
                        date_from:
                          type: integer
                          example: 1671926400
                        date_until:
                          type: integer
                          example: 1990742400
                        date_from_string:
                          type: string
                          example: '2022-12-25T00:00:00+00:00'
                        date_until_string:
                          type: string
                          example: '2033-01-31T00:00:00+00:00'
                        created_at:
                          type: string
                          example: null
                        updated_at:
                          type: string
                          example: null
                        slots_duration:
                          type: integer
                          example: 15
      tags:
        - Reservations
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                silence_no_availability_exceptions:
                  type: boolean
                  description: 'Defines if no availability exceptions that may happen in one of the reservation creations should be ignored and just skip the creation of this particular reservation. Defaults to false.'
                  example: false
                  nullable: false
                reservations:
                  type: array
                  description: 'JSON array time constraints.'
                  example:
                    - []
                  items:
                    type: object
                    properties:
                      friendly_name:
                        type: string
                        description: 'A friendly name for the reservation. Must not be greater than 250 characters.'
                        example: 'Monday appointment with Mr. Evans'
                        nullable: false
                      definition:
                        type: object
                        description: 'Any JSON for reservation business logic data.'
                        example: null
                        nullable: true
                        properties: {  }
                      availability_time_constrained_entity_groups:
                        type: array
                        description: 'Time constrained entity groups to include in availability queries. A calculation session may contain several time constained entity groups.'
                        example:
                          - []
                        items:
                          type: object
                          properties:
                            time_constrained_entity_ids:
                              type: array
                              description: 'Ids of the the time constrained entities consisting the group. Must be a valid UUID.'
                              example:
                                - 33d86057-9cf2-3e5c-9163-862d17f73043
                              items:
                                type: string
                          required:
                            - time_constrained_entity_ids
                      reservation_time_constrained_entity_ids:
                        type: array
                        description: 'Ids of the time constrain entities this reservation refers to. Must be a valid UUID.'
                        example:
                          - 5cf0993d-ca7c-3691-a9aa-c30c12a95aa7
                        items:
                          type: string
                      minute_of_day_from:
                        type: integer
                        description: 'The minute of day the reservation starts. First minute of day is 0. For example 420 means the time constraint starts at 07:00 (the first second of 420th minute). The value must be a multiple of client time step in minutes. Must be at least 0. Must not be greater than 1439.'
                        example: 420
                        nullable: false
                      minute_of_day_until:
                        type: integer
                        description: 'The minute of day the specific reservation ends. Last minute of day is 1439. For example 479 means the time constraint ends at 08:00 (the last second of 479th minute). The value plus 1, must be a multiple of client time step in minutes. Must be at least 0. Must not be greater than 1439.'
                        example: 479
                        nullable: false
                      date_from:
                        type: integer
                        description: 'Unix timestamp (in seconds) UTC of the beginning of the day the time constraint starts. For example start of day Tuesday, 09th of January 2024 is 1704758400.'
                        example: 1704758400
                        nullable: false
                      date_until:
                        type: integer
                        description: 'Unix timestamp (in seconds) UTC of the beginning of the day the time constraint ends. For example start of day Tuesday, 09th of January 2024 is 1704758400. Ignored when recurrence type is 0 (no recurrence). Required in any other case. This field is required unless <code>reservations.*.recurrence_type</code> is in <code>0</code>.'
                        example: 1704758400
                        nullable: true
                      recurrence_type:
                        type: integer
                        description: 'No recurrence: 0, Daily: 1, Weekly: 2, Monthly: 3. Must be at least 0. Must not be greater than 3.'
                        example: 2
                        nullable: false
                      recurrence_interval:
                        type: integer
                        description: 'Interval of the recurrence. Ignored when recurrence_type is 0 (No recurrence). For example Daily recurrence with interval 2, means every other day. For example Weekly recurrence with interval 1, means every week. For example Monthly recurrence with interval 12, means every year. Meaningless to have interval 0 for recurrence Daily, Weekly or Monthly. This field is required unless <code>reservations.*.recurrence_type</code> is in <code>0</code>. Must be at least 0.'
                        example: 2
                        nullable: false
                      recurrence_days_of_month:
                        type: array
                        description: 'First day of month is 1. These values are meaningful only for Monthly recurrence type, ignored when recurrence_type is 0 (No recurrence), 1 (Daily) or 2 (Weekly). Must be at least 1. Must not be greater than 31.'
                        example:
                          - 25
                        items:
                          type: integer
                      recurrence_ordinal:
                        type: array
                        description: 'Week days ordinal: first, second, third, fourth, last. These values are meaningful only for Monthly recurrence type, ignored when recurrence_type is 0 (No recurrence), 1 (Daily) or 2 (Weekly).'
                        example:
                          - fourth
                        items:
                          type: string
                          enum:
                            - first
                            - second
                            - third
                            - fourth
                            - last
                      recurrence_week_days:
                        type: array
                        description: 'Week days: monday, tuesday, etc. These values are meaningful only for: a) Monthly recurrence type with some Ordinal or b) Weekly recurrence type. Ignored when recurrence_type is 0 (No recurrence), 1 (Daily).'
                        example:
                          - monday
                        items:
                          type: string
                          enum:
                            - monday
                            - tuesday
                            - wednesday
                            - thursday
                            - friday
                            - saturday
                            - sunday
                    required:
                      - friendly_name
                      - availability_time_constrained_entity_groups
                      - reservation_time_constrained_entity_ids
                      - minute_of_day_from
                      - minute_of_day_until
                      - date_from
                      - recurrence_type
              required:
                - reservations
    delete:
      summary: 'Batch Delete'
      operationId: batchDelete
      description: "Batch Delete reservations by id's"
      parameters:
        -
          in: query
          name: ids
          description: "ID's of the reservations to be deleted, should belong to the user's client invoking the request. Comma separated."
          example: '9cf1e85e-80d3-469e-a7e3-caee10ad29fc,9cdbaa83-4cb5-4e9f-ae1c-9dff8fe16f57'
          required: true
          schema:
            type: string
            description: "ID's of the reservations to be deleted, should belong to the user's client invoking the request. Comma separated."
            example: '9cf1e85e-80d3-469e-a7e3-caee10ad29fc,9cdbaa83-4cb5-4e9f-ae1c-9dff8fe16f57'
            nullable: false
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  number_of_reservations_deleted: 2
                properties:
                  number_of_reservations_deleted:
                    type: integer
                    example: 2
                    description: 'The number of the deleted reservations.'
                    enum: []
                required:
                  - number_of_reservations_deleted
      tags:
        - Reservations
  /api/time-constrained-entities:
    get:
      summary: Index
      operationId: index
      description: 'Get-search time constrained entities. Pagination - searching to be supported.'
      parameters:
        -
          in: query
          name: query
          description: 'Any text-query to match in name field. Must not be greater than 250 characters.'
          example: 'Mrs Adams'
          required: false
          schema:
            type: string
            description: 'Any text-query to match in name field. Must not be greater than 250 characters.'
            example: 'Mrs Adams'
            nullable: true
        -
          in: query
          name: page_number
          description: 'Page number for pagination. First page is 1. Default: 1. Must be at least 1.'
          example: 1
          required: false
          schema:
            type: integer
            description: 'Page number for pagination. First page is 1. Default: 1. Must be at least 1.'
            example: 1
            nullable: false
        -
          in: query
          name: page_size
          description: 'Page size for pagination. Default: 10. Must be at least 1. Must not be greater than 50.'
          example: 10
          required: false
          schema:
            type: integer
            description: 'Page size for pagination. Default: 10. Must be at least 1. Must not be greater than 50.'
            example: 10
            nullable: false
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  data:
                    -
                      id: ac748001-fb28-3ac5-a10d-1b0f6476f6ce
                      name: 'Country banking holidays'
                      time_constraints:
                        -
                          id: 8d008bd4-3046-38d3-b577-f10bcc26654b
                          name: Christmas
                          date_from: 1671926400
                          date_until: 1990742400
                          is_working: false
                          minute_of_day_from: 0
                          minute_of_day_until: 1439
                          order: 1
                          recurrence_type: 3
                          recurrence_interval: 12
                          recurrence_days_of_month:
                            - 25
                            - 26
                          recurrence_ordinal: []
                          recurrence_week_days: []
                        -
                          id: c0b6c8c3-2d2f-3d79-b5b8-f22a41e92daa
                          name: 'New Years day'
                          date_from: 1671926400
                          date_until: 1990742400
                          is_working: false
                          minute_of_day_from: 0
                          minute_of_day_until: 1439
                          order: 1
                          recurrence_type: 3
                          recurrence_interval: 12
                          recurrence_days_of_month:
                            - 1
                          recurrence_ordinal: []
                          recurrence_week_days: []
                      created_at: 1763010484
                      updated_at: 1763096884
                    -
                      id: 2b68798c-1da7-3c24-8d3c-b4292c599a09
                      name: 'Country banking holidays'
                      time_constraints:
                        -
                          id: 06fb5fb3-b5e2-3310-b5dc-bc1e9d31390a
                          name: Christmas
                          date_from: 1671926400
                          date_until: 1990742400
                          is_working: false
                          minute_of_day_from: 0
                          minute_of_day_until: 1439
                          order: 1
                          recurrence_type: 3
                          recurrence_interval: 12
                          recurrence_days_of_month:
                            - 25
                            - 26
                          recurrence_ordinal: []
                          recurrence_week_days: []
                        -
                          id: 2ff75c81-93a2-38db-a1a2-5d3fac8d1585
                          name: 'New Years day'
                          date_from: 1671926400
                          date_until: 1990742400
                          is_working: false
                          minute_of_day_from: 0
                          minute_of_day_until: 1439
                          order: 1
                          recurrence_type: 3
                          recurrence_interval: 12
                          recurrence_days_of_month:
                            - 1
                          recurrence_ordinal: []
                          recurrence_week_days: []
                      created_at: 1763010484
                      updated_at: 1763096884
                  meta:
                    total: 43
                    page_number: 2
                    page_size: 10
                properties:
                  data:
                    type: array
                    example:
                      -
                        id: ac748001-fb28-3ac5-a10d-1b0f6476f6ce
                        name: 'Country banking holidays'
                        time_constraints:
                          -
                            id: 8d008bd4-3046-38d3-b577-f10bcc26654b
                            name: Christmas
                            date_from: 1671926400
                            date_until: 1990742400
                            is_working: false
                            minute_of_day_from: 0
                            minute_of_day_until: 1439
                            order: 1
                            recurrence_type: 3
                            recurrence_interval: 12
                            recurrence_days_of_month:
                              - 25
                              - 26
                            recurrence_ordinal: []
                            recurrence_week_days: []
                          -
                            id: c0b6c8c3-2d2f-3d79-b5b8-f22a41e92daa
                            name: 'New Years day'
                            date_from: 1671926400
                            date_until: 1990742400
                            is_working: false
                            minute_of_day_from: 0
                            minute_of_day_until: 1439
                            order: 1
                            recurrence_type: 3
                            recurrence_interval: 12
                            recurrence_days_of_month:
                              - 1
                            recurrence_ordinal: []
                            recurrence_week_days: []
                        created_at: 1763010484
                        updated_at: 1763096884
                      -
                        id: 2b68798c-1da7-3c24-8d3c-b4292c599a09
                        name: 'Country banking holidays'
                        time_constraints:
                          -
                            id: 06fb5fb3-b5e2-3310-b5dc-bc1e9d31390a
                            name: Christmas
                            date_from: 1671926400
                            date_until: 1990742400
                            is_working: false
                            minute_of_day_from: 0
                            minute_of_day_until: 1439
                            order: 1
                            recurrence_type: 3
                            recurrence_interval: 12
                            recurrence_days_of_month:
                              - 25
                              - 26
                            recurrence_ordinal: []
                            recurrence_week_days: []
                          -
                            id: 2ff75c81-93a2-38db-a1a2-5d3fac8d1585
                            name: 'New Years day'
                            date_from: 1671926400
                            date_until: 1990742400
                            is_working: false
                            minute_of_day_from: 0
                            minute_of_day_until: 1439
                            order: 1
                            recurrence_type: 3
                            recurrence_interval: 12
                            recurrence_days_of_month:
                              - 1
                            recurrence_ordinal: []
                            recurrence_week_days: []
                        created_at: 1763010484
                        updated_at: 1763096884
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                          example: ac748001-fb28-3ac5-a10d-1b0f6476f6ce
                        name:
                          type: string
                          example: 'Country banking holidays'
                        time_constraints:
                          type: array
                          example:
                            -
                              id: 8d008bd4-3046-38d3-b577-f10bcc26654b
                              name: Christmas
                              date_from: 1671926400
                              date_until: 1990742400
                              is_working: false
                              minute_of_day_from: 0
                              minute_of_day_until: 1439
                              order: 1
                              recurrence_type: 3
                              recurrence_interval: 12
                              recurrence_days_of_month:
                                - 25
                                - 26
                              recurrence_ordinal: []
                              recurrence_week_days: []
                            -
                              id: c0b6c8c3-2d2f-3d79-b5b8-f22a41e92daa
                              name: 'New Years day'
                              date_from: 1671926400
                              date_until: 1990742400
                              is_working: false
                              minute_of_day_from: 0
                              minute_of_day_until: 1439
                              order: 1
                              recurrence_type: 3
                              recurrence_interval: 12
                              recurrence_days_of_month:
                                - 1
                              recurrence_ordinal: []
                              recurrence_week_days: []
                          items:
                            type: object
                            properties:
                              id:
                                type: string
                                example: 8d008bd4-3046-38d3-b577-f10bcc26654b
                              name:
                                type: string
                                example: Christmas
                              date_from:
                                type: integer
                                example: 1671926400
                              date_until:
                                type: integer
                                example: 1990742400
                              is_working:
                                type: boolean
                                example: false
                              minute_of_day_from:
                                type: integer
                                example: 0
                              minute_of_day_until:
                                type: integer
                                example: 1439
                              order:
                                type: integer
                                example: 1
                              recurrence_type:
                                type: integer
                                example: 3
                              recurrence_interval:
                                type: integer
                                example: 12
                              recurrence_days_of_month:
                                type: array
                                example:
                                  - 25
                                  - 26
                                items:
                                  type: integer
                              recurrence_ordinal:
                                type: array
                                example: []
                              recurrence_week_days:
                                type: array
                                example: []
                        created_at:
                          type: integer
                          example: 1763010484
                        updated_at:
                          type: integer
                          example: 1763096884
                  meta:
                    type: object
                    properties:
                      total:
                        type: integer
                        example: 43
                      page_number:
                        type: integer
                        example: 2
                      page_size:
                        type: integer
                        example: 10
      tags:
        - 'Time constrained entities'
    post:
      summary: Create
      operationId: create
      description: 'Store time constrained entity'
      parameters: []
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  data:
                    id: 7715a7bb-ba23-3b05-9152-e5120d2d70c7
                    name: 'Country banking holidays'
                    time_constraints:
                      -
                        id: dae674de-9f75-3b2b-b3c5-578b09f471cc
                        name: Christmas
                        date_from: 1671926400
                        date_until: 1990742400
                        is_working: false
                        minute_of_day_from: 0
                        minute_of_day_until: 1439
                        order: 1
                        recurrence_type: 3
                        recurrence_interval: 12
                        recurrence_days_of_month:
                          - 25
                          - 26
                        recurrence_ordinal: []
                        recurrence_week_days: []
                      -
                        id: db14e343-b9c1-3f2e-8c7d-77db2ebf6e6c
                        name: 'New Years day'
                        date_from: 1671926400
                        date_until: 1990742400
                        is_working: false
                        minute_of_day_from: 0
                        minute_of_day_until: 1439
                        order: 1
                        recurrence_type: 3
                        recurrence_interval: 12
                        recurrence_days_of_month:
                          - 1
                        recurrence_ordinal: []
                        recurrence_week_days: []
                    created_at: 1763010484
                    updated_at: 1763096884
                properties:
                  data:
                    type: object
                    properties:
                      id:
                        type: string
                        example: 7715a7bb-ba23-3b05-9152-e5120d2d70c7
                      name:
                        type: string
                        example: 'Country banking holidays'
                      time_constraints:
                        type: array
                        example:
                          -
                            id: dae674de-9f75-3b2b-b3c5-578b09f471cc
                            name: Christmas
                            date_from: 1671926400
                            date_until: 1990742400
                            is_working: false
                            minute_of_day_from: 0
                            minute_of_day_until: 1439
                            order: 1
                            recurrence_type: 3
                            recurrence_interval: 12
                            recurrence_days_of_month:
                              - 25
                              - 26
                            recurrence_ordinal: []
                            recurrence_week_days: []
                          -
                            id: db14e343-b9c1-3f2e-8c7d-77db2ebf6e6c
                            name: 'New Years day'
                            date_from: 1671926400
                            date_until: 1990742400
                            is_working: false
                            minute_of_day_from: 0
                            minute_of_day_until: 1439
                            order: 1
                            recurrence_type: 3
                            recurrence_interval: 12
                            recurrence_days_of_month:
                              - 1
                            recurrence_ordinal: []
                            recurrence_week_days: []
                        items:
                          type: object
                          properties:
                            id:
                              type: string
                              example: dae674de-9f75-3b2b-b3c5-578b09f471cc
                            name:
                              type: string
                              example: Christmas
                            date_from:
                              type: integer
                              example: 1671926400
                            date_until:
                              type: integer
                              example: 1990742400
                            is_working:
                              type: boolean
                              example: false
                            minute_of_day_from:
                              type: integer
                              example: 0
                            minute_of_day_until:
                              type: integer
                              example: 1439
                            order:
                              type: integer
                              example: 1
                            recurrence_type:
                              type: integer
                              example: 3
                            recurrence_interval:
                              type: integer
                              example: 12
                            recurrence_days_of_month:
                              type: array
                              example:
                                - 25
                                - 26
                              items:
                                type: integer
                            recurrence_ordinal:
                              type: array
                              example: []
                            recurrence_week_days:
                              type: array
                              example: []
                      created_at:
                        type: integer
                        example: 1763010484
                      updated_at:
                        type: integer
                        example: 1763096884
      tags:
        - 'Time constrained entities'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                  description: 'A friendly name for the entity. Must not be greater than 250 characters.'
                  example: 'Country banking holidays'
                  nullable: false
                time_constraints:
                  type: array
                  description: 'JSON array time constraints.'
                  example:
                    - []
                  items:
                    type: object
                    properties:
                      id:
                        type: string
                        description: 'A valid UUID for the specific time constraint. Must be a valid UUID.'
                        example: 1be149e5-caed-4143-a3ea-4359799d53ea
                        nullable: false
                      order:
                        type: integer
                        description: 'The order priority the specific time constraint is considered in availability calculation. The lower the number the higher the priority. Must be at least 1.'
                        example: 1
                        nullable: false
                      name:
                        type: string
                        description: 'The name of the time constraint.'
                        example: 'Days off between Christmas and New Years day or Afternoon shift'
                        nullable: false
                      is_working:
                        type: boolean
                        description: 'A flag indicating if the specific time constraint is considered as working or non-working.'
                        example: true
                        nullable: false
                      minute_of_day_from:
                        type: integer
                        description: 'The minute of day the specific time constraint starts. First minute of day is 0. For example 420 means the time constraint starts at 07:00 (the first second of 420th minute). The value must be a multiple of client time step in minutes. Must be at least 0. Must not be greater than 1439.'
                        example: 420
                        nullable: false
                      minute_of_day_until:
                        type: integer
                        description: 'The minute of day the specific time constraint ends. Last minute of day is 1439. For example 479 means the time constraint ends at 08:00 (the last second of 479th minute). The value plus 1, must be a multiple of client time step in minutes. Must be at least 0. Must not be greater than 1439.'
                        example: 479
                        nullable: false
                      date_from:
                        type: integer
                        description: 'Unix timestamp (in seconds) UTC of the begining of the day the time constraint starts. For example start of day Tuesday, 09th of January 2024 is 1704758400.'
                        example: 1704758400
                        nullable: false
                      date_until:
                        type: integer
                        description: 'Unix timestamp (in seconds) UTC of the begining of the day the time constraint ends. For example start of day Tuesday, 09th of January 2024 is 1704758400. Ignored when recurrence type is 0 (no recurrence). Required in any other case. This field is required unless <code>time_constraints.*.recurrence_type</code> is in <code>0</code>.'
                        example: 1704758400
                        nullable: true
                      recurrence_type:
                        type: integer
                        description: 'No recurrence: 0, Daily: 1, Weekly: 2, Monthly: 3. Must be at least 0. Must not be greater than 3.'
                        example: 2
                        nullable: false
                      recurrence_interval:
                        type: integer
                        description: 'Interval of the recurrence. Ignored when recurrence_type is 0 (No recurrence). For example Daily recurrence with interval 2, means every other day. For example Weekly recurrence with interval 1, means every week. For example Monthly recurrence with interval 12, means every year. Meaningless to have interval 0 for recurrence Daily, Weekly or Monthly. This field is required unless <code>time_constraints.*.recurrence_type</code> is in <code>0</code>. Must be at least 0.'
                        example: 2
                        nullable: false
                      recurrence_days_of_month:
                        type: array
                        description: 'First day of month is 1. These values are meaningful only for Monthly recurrence type, ignored when recurrence_type is 0 (No recurrence), 1 (Daily) or 2 (Weekly). Must be at least 1. Must not be greater than 31.'
                        example:
                          - 19
                        items:
                          type: integer
                      recurrence_ordinal:
                        type: array
                        description: 'Week days ordinal: first, second, third, fourth, last. These values are meaningful only for Monthly recurrence type, ignored when recurrence_type is 0 (No recurrence), 1 (Daily) or 2 (Weekly).'
                        example:
                          - last
                        items:
                          type: string
                          enum:
                            - first
                            - second
                            - third
                            - fourth
                            - last
                      recurrence_week_days:
                        type: array
                        description: 'Week days: monday, tuesday, etc. These values are meaningful only for: a) Monthly recurrence type with some Ordinal or b) Weekly recurrence type. Ignored when recurrence_type is 0 (No recurrence), 1 (Daily).'
                        example:
                          - tuesday
                        items:
                          type: string
                          enum:
                            - monday
                            - tuesday
                            - wednesday
                            - thursday
                            - friday
                            - saturday
                            - sunday
                    required:
                      - id
                      - order
                      - name
                      - is_working
                      - minute_of_day_from
                      - minute_of_day_until
                      - date_from
                      - recurrence_type
              required:
                - name
                - time_constraints
  '/api/time-constrained-entities/{id}':
    get:
      summary: Get
      operationId: get
      description: 'Get a time constrained entity by id'
      parameters: []
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  data:
                    id: d16f5e54-73d3-3485-a903-49922dbb465d
                    name: 'Country banking holidays'
                    time_constraints:
                      -
                        id: a5bf4c37-9cd4-383b-9e17-6027fd4d5101
                        name: Christmas
                        date_from: 1671926400
                        date_until: 1990742400
                        is_working: false
                        minute_of_day_from: 0
                        minute_of_day_until: 1439
                        order: 1
                        recurrence_type: 3
                        recurrence_interval: 12
                        recurrence_days_of_month:
                          - 25
                          - 26
                        recurrence_ordinal: []
                        recurrence_week_days: []
                      -
                        id: b3daf7db-ba77-36cf-b2a4-3e21bc9a669d
                        name: 'New Years day'
                        date_from: 1671926400
                        date_until: 1990742400
                        is_working: false
                        minute_of_day_from: 0
                        minute_of_day_until: 1439
                        order: 1
                        recurrence_type: 3
                        recurrence_interval: 12
                        recurrence_days_of_month:
                          - 1
                        recurrence_ordinal: []
                        recurrence_week_days: []
                    created_at: 1763010484
                    updated_at: 1763096884
                properties:
                  data:
                    type: object
                    properties:
                      id:
                        type: string
                        example: d16f5e54-73d3-3485-a903-49922dbb465d
                      name:
                        type: string
                        example: 'Country banking holidays'
                      time_constraints:
                        type: array
                        example:
                          -
                            id: a5bf4c37-9cd4-383b-9e17-6027fd4d5101
                            name: Christmas
                            date_from: 1671926400
                            date_until: 1990742400
                            is_working: false
                            minute_of_day_from: 0
                            minute_of_day_until: 1439
                            order: 1
                            recurrence_type: 3
                            recurrence_interval: 12
                            recurrence_days_of_month:
                              - 25
                              - 26
                            recurrence_ordinal: []
                            recurrence_week_days: []
                          -
                            id: b3daf7db-ba77-36cf-b2a4-3e21bc9a669d
                            name: 'New Years day'
                            date_from: 1671926400
                            date_until: 1990742400
                            is_working: false
                            minute_of_day_from: 0
                            minute_of_day_until: 1439
                            order: 1
                            recurrence_type: 3
                            recurrence_interval: 12
                            recurrence_days_of_month:
                              - 1
                            recurrence_ordinal: []
                            recurrence_week_days: []
                        items:
                          type: object
                          properties:
                            id:
                              type: string
                              example: a5bf4c37-9cd4-383b-9e17-6027fd4d5101
                            name:
                              type: string
                              example: Christmas
                            date_from:
                              type: integer
                              example: 1671926400
                            date_until:
                              type: integer
                              example: 1990742400
                            is_working:
                              type: boolean
                              example: false
                            minute_of_day_from:
                              type: integer
                              example: 0
                            minute_of_day_until:
                              type: integer
                              example: 1439
                            order:
                              type: integer
                              example: 1
                            recurrence_type:
                              type: integer
                              example: 3
                            recurrence_interval:
                              type: integer
                              example: 12
                            recurrence_days_of_month:
                              type: array
                              example:
                                - 25
                                - 26
                              items:
                                type: integer
                            recurrence_ordinal:
                              type: array
                              example: []
                            recurrence_week_days:
                              type: array
                              example: []
                      created_at:
                        type: integer
                        example: 1763010484
                      updated_at:
                        type: integer
                        example: 1763096884
      tags:
        - 'Time constrained entities'
    put:
      summary: Update
      operationId: update
      description: 'Update a time constrained entity by id'
      parameters: []
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  data:
                    id: 27106427-cbd1-3f3d-8189-c397bd64a486
                    name: 'Country banking holidays'
                    time_constraints:
                      -
                        id: 2eb19669-9297-3bc0-a893-b8a92258449b
                        name: Christmas
                        date_from: 1671926400
                        date_until: 1990742400
                        is_working: false
                        minute_of_day_from: 0
                        minute_of_day_until: 1439
                        order: 1
                        recurrence_type: 3
                        recurrence_interval: 12
                        recurrence_days_of_month:
                          - 25
                          - 26
                        recurrence_ordinal: []
                        recurrence_week_days: []
                      -
                        id: f3359500-6b56-34fe-aae3-db43d38798df
                        name: 'New Years day'
                        date_from: 1671926400
                        date_until: 1990742400
                        is_working: false
                        minute_of_day_from: 0
                        minute_of_day_until: 1439
                        order: 1
                        recurrence_type: 3
                        recurrence_interval: 12
                        recurrence_days_of_month:
                          - 1
                        recurrence_ordinal: []
                        recurrence_week_days: []
                    created_at: 1763010484
                    updated_at: 1763096884
                properties:
                  data:
                    type: object
                    properties:
                      id:
                        type: string
                        example: 27106427-cbd1-3f3d-8189-c397bd64a486
                      name:
                        type: string
                        example: 'Country banking holidays'
                      time_constraints:
                        type: array
                        example:
                          -
                            id: 2eb19669-9297-3bc0-a893-b8a92258449b
                            name: Christmas
                            date_from: 1671926400
                            date_until: 1990742400
                            is_working: false
                            minute_of_day_from: 0
                            minute_of_day_until: 1439
                            order: 1
                            recurrence_type: 3
                            recurrence_interval: 12
                            recurrence_days_of_month:
                              - 25
                              - 26
                            recurrence_ordinal: []
                            recurrence_week_days: []
                          -
                            id: f3359500-6b56-34fe-aae3-db43d38798df
                            name: 'New Years day'
                            date_from: 1671926400
                            date_until: 1990742400
                            is_working: false
                            minute_of_day_from: 0
                            minute_of_day_until: 1439
                            order: 1
                            recurrence_type: 3
                            recurrence_interval: 12
                            recurrence_days_of_month:
                              - 1
                            recurrence_ordinal: []
                            recurrence_week_days: []
                        items:
                          type: object
                          properties:
                            id:
                              type: string
                              example: 2eb19669-9297-3bc0-a893-b8a92258449b
                            name:
                              type: string
                              example: Christmas
                            date_from:
                              type: integer
                              example: 1671926400
                            date_until:
                              type: integer
                              example: 1990742400
                            is_working:
                              type: boolean
                              example: false
                            minute_of_day_from:
                              type: integer
                              example: 0
                            minute_of_day_until:
                              type: integer
                              example: 1439
                            order:
                              type: integer
                              example: 1
                            recurrence_type:
                              type: integer
                              example: 3
                            recurrence_interval:
                              type: integer
                              example: 12
                            recurrence_days_of_month:
                              type: array
                              example:
                                - 25
                                - 26
                              items:
                                type: integer
                            recurrence_ordinal:
                              type: array
                              example: []
                            recurrence_week_days:
                              type: array
                              example: []
                      created_at:
                        type: integer
                        example: 1763010484
                      updated_at:
                        type: integer
                        example: 1763096884
      tags:
        - 'Time constrained entities'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                  description: 'A friendly name for the entity. Must not be greater than 250 characters.'
                  example: 'Country banking holidays'
                  nullable: false
                time_constraints:
                  type: array
                  description: 'JSON array time constraints.'
                  example:
                    - []
                  items:
                    type: object
                    properties:
                      id:
                        type: string
                        description: 'A valid UUID for the specific time constraint. Must be a valid UUID.'
                        example: 1be149e5-caed-4143-a3ea-4359799d53ea
                        nullable: false
                      order:
                        type: integer
                        description: 'The order priority the specific time constraint is considered in availability calculation. The lower the number the higher the priority. Must be at least 1.'
                        example: 1
                        nullable: false
                      name:
                        type: string
                        description: 'The name of the time constraint.'
                        example: 'Days off between Christmas and New Years day or Afternoon shift'
                        nullable: false
                      is_working:
                        type: boolean
                        description: 'A flag indicating if the specific time constraint is considered as working or non-working.'
                        example: true
                        nullable: false
                      minute_of_day_from:
                        type: integer
                        description: 'The minute of day the specific time constraint starts. First minute of day is 0. For example 420 means the time constraint starts at 07:00 (the first second of 420th minute). The value must be a multiple of client time step in minutes. Must be at least 0. Must not be greater than 1439.'
                        example: 420
                        nullable: false
                      minute_of_day_until:
                        type: integer
                        description: 'The minute of day the specific time constraint ends. Last minute of day is 1439. For example 479 means the time constraint ends at 08:00 (the last second of 479th minute). The value plus 1, must be a multiple of client time step in minutes. Must be at least 0. Must not be greater than 1439.'
                        example: 479
                        nullable: false
                      date_from:
                        type: integer
                        description: 'Unix timestamp (in seconds) UTC of the begining of the day the time constraint starts. For example start of day Tuesday, 09th of January 2024 is 1704758400.'
                        example: 1704758400
                        nullable: false
                      date_until:
                        type: integer
                        description: 'Unix timestamp (in seconds) UTC of the begining of the day the time constraint ends. For example start of day Tuesday, 09th of January 2024 is 1704758400. Ignored when recurrence type is 0 (no recurrence). Required in any other case. This field is required unless <code>time_constraints.*.recurrence_type</code> is in <code>0</code>.'
                        example: 1704758400
                        nullable: true
                      recurrence_type:
                        type: integer
                        description: 'No recurrence: 0, Daily: 1, Weekly: 2, Monthly: 3. Must be at least 0. Must not be greater than 3.'
                        example: 2
                        nullable: false
                      recurrence_interval:
                        type: integer
                        description: 'Interval of the recurrence. Ignored when recurrence_type is 0 (No recurrence). For example Daily recurrence with interval 2, means every other day. For example Weekly recurrence with interval 1, means every week. For example Monthly recurrence with interval 12, means every year. Meaningless to have interval 0 for recurrence Daily, Weekly or Monthly. This field is required unless <code>time_constraints.*.recurrence_type</code> is in <code>0</code>. Must be at least 0.'
                        example: 2
                        nullable: false
                      recurrence_days_of_month:
                        type: array
                        description: 'First day of month is 1. These values are meaningful only for Monthly recurrence type, ignored when recurrence_type is 0 (No recurrence), 1 (Daily) or 2 (Weekly). Must be at least 1. Must not be greater than 31.'
                        example:
                          - 12
                        items:
                          type: integer
                      recurrence_ordinal:
                        type: array
                        description: 'Week days ordinal: first, second, third, fourth, last. These values are meaningful only for Monthly recurrence type, ignored when recurrence_type is 0 (No recurrence), 1 (Daily) or 2 (Weekly).'
                        example:
                          - fourth
                        items:
                          type: string
                          enum:
                            - first
                            - second
                            - third
                            - fourth
                            - last
                      recurrence_week_days:
                        type: array
                        description: 'Week days: monday, tuesday, etc. These values are meaningful only for: a) Monthly recurrence type with some Ordinal or b) Weekly recurrence type. Ignored when recurrence_type is 0 (No recurrence), 1 (Daily).'
                        example:
                          - thursday
                        items:
                          type: string
                          enum:
                            - monday
                            - tuesday
                            - wednesday
                            - thursday
                            - friday
                            - saturday
                            - sunday
                    required:
                      - id
                      - order
                      - name
                      - is_working
                      - minute_of_day_from
                      - minute_of_day_until
                      - date_from
                      - recurrence_type
              required:
                - name
                - time_constraints
    delete:
      summary: Delete
      operationId: delete
      description: 'Delete a time constrained entity by id'
      parameters: []
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  data:
                    id: 7d7f7b8d-3a47-3fba-a21f-1327ec36bee3
                    name: 'Country banking holidays'
                    time_constraints:
                      -
                        id: 7d6302c8-1daa-3ad5-8959-65235e44c61b
                        name: Christmas
                        date_from: 1671926400
                        date_until: 1990742400
                        is_working: false
                        minute_of_day_from: 0
                        minute_of_day_until: 1439
                        order: 1
                        recurrence_type: 3
                        recurrence_interval: 12
                        recurrence_days_of_month:
                          - 25
                          - 26
                        recurrence_ordinal: []
                        recurrence_week_days: []
                      -
                        id: 586f3d99-f547-3dd4-96e6-931384e5fa6e
                        name: 'New Years day'
                        date_from: 1671926400
                        date_until: 1990742400
                        is_working: false
                        minute_of_day_from: 0
                        minute_of_day_until: 1439
                        order: 1
                        recurrence_type: 3
                        recurrence_interval: 12
                        recurrence_days_of_month:
                          - 1
                        recurrence_ordinal: []
                        recurrence_week_days: []
                    created_at: 1763010484
                    updated_at: 1763096884
                properties:
                  data:
                    type: object
                    properties:
                      id:
                        type: string
                        example: 7d7f7b8d-3a47-3fba-a21f-1327ec36bee3
                      name:
                        type: string
                        example: 'Country banking holidays'
                      time_constraints:
                        type: array
                        example:
                          -
                            id: 7d6302c8-1daa-3ad5-8959-65235e44c61b
                            name: Christmas
                            date_from: 1671926400
                            date_until: 1990742400
                            is_working: false
                            minute_of_day_from: 0
                            minute_of_day_until: 1439
                            order: 1
                            recurrence_type: 3
                            recurrence_interval: 12
                            recurrence_days_of_month:
                              - 25
                              - 26
                            recurrence_ordinal: []
                            recurrence_week_days: []
                          -
                            id: 586f3d99-f547-3dd4-96e6-931384e5fa6e
                            name: 'New Years day'
                            date_from: 1671926400
                            date_until: 1990742400
                            is_working: false
                            minute_of_day_from: 0
                            minute_of_day_until: 1439
                            order: 1
                            recurrence_type: 3
                            recurrence_interval: 12
                            recurrence_days_of_month:
                              - 1
                            recurrence_ordinal: []
                            recurrence_week_days: []
                        items:
                          type: object
                          properties:
                            id:
                              type: string
                              example: 7d6302c8-1daa-3ad5-8959-65235e44c61b
                            name:
                              type: string
                              example: Christmas
                            date_from:
                              type: integer
                              example: 1671926400
                            date_until:
                              type: integer
                              example: 1990742400
                            is_working:
                              type: boolean
                              example: false
                            minute_of_day_from:
                              type: integer
                              example: 0
                            minute_of_day_until:
                              type: integer
                              example: 1439
                            order:
                              type: integer
                              example: 1
                            recurrence_type:
                              type: integer
                              example: 3
                            recurrence_interval:
                              type: integer
                              example: 12
                            recurrence_days_of_month:
                              type: array
                              example:
                                - 25
                                - 26
                              items:
                                type: integer
                            recurrence_ordinal:
                              type: array
                              example: []
                            recurrence_week_days:
                              type: array
                              example: []
                      created_at:
                        type: integer
                        example: 1763010484
                      updated_at:
                        type: integer
                        example: 1763096884
      tags:
        - 'Time constrained entities'
    parameters:
      -
        in: path
        name: id
        description: 'The id of the time constrained entity.'
        example: 0ce149e5-caed-4143-a3ea-4359799d53ea
        required: true
        schema:
          type: uuid
  /api/users/current:
    get:
      summary: Current
      operationId: current
      description: 'Get current logged in user'
      parameters: []
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  data:
                    id: null
                    name: sdm@dataverse.gr
                    email: sdm@dataverse.gr
                    created_at: '2025-11-13T05:08:04.000000Z'
                    updated_at: '2025-11-14T05:08:04.000000Z'
                    client_id: 9d6e003c-cc06-4b91-b5df-5b68e21efafe
                    client: null
                properties:
                  data:
                    type: object
                    properties:
                      id:
                        type: string
                        example: null
                      name:
                        type: string
                        example: sdm@dataverse.gr
                      email:
                        type: string
                        example: sdm@dataverse.gr
                      created_at:
                        type: string
                        example: '2025-11-13T05:08:04.000000Z'
                      updated_at:
                        type: string
                        example: '2025-11-14T05:08:04.000000Z'
                      client_id:
                        type: string
                        example: 9d6e003c-cc06-4b91-b5df-5b68e21efafe
                      client:
                        type: string
                        example: null
      tags:
        - Users
tags:
  -
    name: Authentication
    description: "\nAPIs for user authentication"
  -
    name: 'Availability calculation sessions'
    description: "\nAPIs for managing availability calculation sessions.\n\nYou can query for availability for one or more time constrained entity groups.\nA time constrained entity group, is a group of time constrained entities which form a meaningful business logic entity.\nFor example, to get the availability of a person in a location (business logic entity) you may need to include several time constrained entities:\n\na) Person's specific days off.\n\nb) Location specific holidays\n\nc) Banking holidays of the country\n\nd) Common working hours of a country\n\nAll the above time constrained entities (prioritized) combined together form a meaningful time constrained entity group.\n\n\nIn case you want to query availability of multiple business logic entities combined, ie: a PERSON with some EQUIPMENT, then you need form two time constrained entities groups:\n\na) For the person\n\nb) For the equipment"
  -
    name: Reservations
    description: "\nAPIs for managing reservations"
  -
    name: 'Time constrained entities'
    description: "\nAPIs for managing time constrained entities"
  -
    name: Users
    description: "\nAPIs for users"
components:
  securitySchemes:
    default:
      type: http
      scheme: bearer
      description: 'Your token is generated by dataverse and sent to you. Alternatively, you can use Create api token call to generate a token using your test username-password credentials and your domain.'
security:
  -
    default: []
