# Get available time slots

## OpenAPI Specification

```yaml
openapi: 3.0.1
info:
  title: ''
  description: ''
  version: 1.0.0
paths:
  /warehouses/{id}/available_slots:
    get:
      summary: Get available time slots
      deprecated: false
      description: |
        Returns available booking slots for a warehouse on a given date.
        Optionally filter by a specific dock.
      operationId: getAvailableSlots
      tags:
        - LoadingCalendar API/Warehouses
        - Warehouses
      parameters:
        - name: id
          in: path
          description: Warehouse ID
          required: true
          example: 0
          schema:
            type: integer
        - name: date
          in: query
          description: Date to check availability (YYYY-MM-DD)
          required: true
          schema:
            type: string
            format: date
            examples:
              - '2026-02-15'
        - name: duration
          in: query
          description: Required duration in minutes
          required: true
          schema:
            type: integer
            examples:
              - 60
            enum:
              - 15
              - 30
              - 45
              - 60
              - 90
              - 120
              - 180
              - 240
            x-apidog-enum:
              - value: 15
                name: ''
                description: ''
              - value: 30
                name: ''
                description: ''
              - value: 45
                name: ''
                description: ''
              - value: 60
                name: ''
                description: ''
              - value: 90
                name: ''
                description: ''
              - value: 120
                name: ''
                description: ''
              - value: 180
                name: ''
                description: ''
              - value: 240
                name: ''
                description: ''
        - name: dock_id
          in: query
          description: Filter to a specific dock
          required: false
          schema:
            type: integer
      responses:
        '200':
          description: Available time slots
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AvailableSlotsResponse'
          headers: {}
          x-apidog-name: ''
        '400':
          description: Invalid request parameters
          content:
            application/json:
              schema:
                type: object
                properties:
                  errors:
                    type: array
                    items:
                      type: string
                      examples:
                        - Parameter is missing
                    examples:
                      - - Parameter is missing
                x-apidog-refs: {}
                x-apidog-orders:
                  - errors
                x-apidog-ignore-properties: []
              example:
                errors:
                  - Invalid or missing date parameter
          headers: {}
          x-apidog-name: BadRequest
        '401':
          description: Authentication failed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                errors:
                  - Invalid API key
          headers: {}
          x-apidog-name: Unauthorized
        '404':
          description: Resource not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  errors:
                    type: array
                    items:
                      type: string
                      examples:
                        - Not found
                    examples:
                      - - Not found
                x-apidog-refs: {}
                x-apidog-orders:
                  - errors
                x-apidog-ignore-properties: []
              example:
                errors:
                  - Not found
          headers: {}
          x-apidog-name: NotFound
      security:
        - BearerAuth: []
          x-apidog:
            required: true
            schemeGroups:
              - id: i_6kBsbotcGUS0KwsdQp9
                schemeIds:
                  - BearerAuth
            use:
              id: i_6kBsbotcGUS0KwsdQp9
      x-apidog-folder: LoadingCalendar API/Warehouses
      x-apidog-status: released
      x-run-in-apidog: https://app.eu.apidog.com/web/project/361044/apis/api-4047023-run
components:
  schemas:
    AvailableSlotsResponse:
      type: object
      properties:
        warehouse_id:
          type: integer
        date:
          type: string
          format: date
        duration:
          type: integer
        slots:
          type: array
          items:
            type: object
            properties:
              dock_id:
                type: integer
              dock_name:
                type: string
              available_times:
                type: array
                items:
                  type: string
                  format: time
                  examples:
                    - '09:00'
                  description: HH:MM format
                description: List of available times in HH:MM format
            x-apidog-orders:
              - dock_id
              - dock_name
              - available_times
            x-apidog-ignore-properties: []
      x-apidog-orders:
        - warehouse_id
        - date
        - duration
        - slots
      x-apidog-ignore-properties: []
      x-apidog-folder: ''
    ErrorResponse:
      type: object
      properties:
        errors:
          type: array
          items:
            type: string
          examples:
            - - Access forbidden
      x-apidog-orders:
        - errors
      x-apidog-ignore-properties: []
      x-apidog-folder: ''
  securitySchemes:
    BearerAuth:
      type: bearer
      scheme: bearer
      description: API key obtained from the Developers section
servers:
  - url: https://loadingcalendar-staging.herokuapp.com/api/v1
    description: Testing Env
  - url: https://www.loadingcalendar.com/api/v1
    description: Prod Env
security: []

```