# Get a warehouse

## OpenAPI Specification

```yaml
openapi: 3.0.1
info:
  title: ''
  description: ''
  version: 1.0.0
paths:
  /warehouses/{id}:
    get:
      summary: Get a warehouse
      deprecated: false
      description: Returns a single warehouse with its docks and loading durations.
      operationId: getWarehouse
      tags:
        - LoadingCalendar API/Warehouses
        - Warehouses
      parameters:
        - name: id
          in: path
          description: Warehouse ID
          required: true
          example: 0
          schema:
            type: integer
      responses:
        '200':
          description: Warehouse details
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WarehouseWithDetails'
          headers: {}
          x-apidog-name: ''
        '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: []
      x-apidog-folder: LoadingCalendar API/Warehouses
      x-apidog-status: released
      x-run-in-apidog: https://app.eu.apidog.com/web/project/361044/apis/api-4047022-run
components:
  schemas:
    WarehouseWithDetails:
      allOf:
        - $ref: '#/components/schemas/Warehouse'
        - type: object
          properties:
            docks:
              type: array
              items:
                $ref: '#/components/schemas/Dock'
            loading_durations:
              type: array
              items:
                $ref: '#/components/schemas/LoadingDuration'
          x-apidog-orders:
            - docks
            - loading_durations
          x-apidog-ignore-properties: []
      x-apidog-folder: ''
    LoadingDuration:
      type: object
      properties:
        id:
          type: integer
        description:
          type: string
          examples:
            - Standard unloading
          description: Description to be displayed
        time:
          type: integer
          description: Duration in minutes
          examples:
            - 60
        dock_ids:
          type: array
          items:
            type: integer
          description: Allowed dock ID-s for the duration
      x-apidog-orders:
        - id
        - description
        - time
        - dock_ids
      x-apidog-ignore-properties: []
      x-apidog-folder: ''
    Dock:
      type: object
      properties:
        id:
          type: integer
        name:
          type: string
          examples:
            - Dock A
        description:
          type: string
          nullable: true
        open_from:
          type: string
          format: time
          description: Opening time (HH:MM)
          examples:
            - '08:00'
        open_until:
          type: string
          format: time
          description: Closing time (HH:MM)
          examples:
            - '17:00'
        open_on_weekends:
          type: boolean
      x-apidog-orders:
        - id
        - name
        - description
        - open_from
        - open_until
        - open_on_weekends
      x-apidog-ignore-properties: []
      x-apidog-folder: ''
    Warehouse:
      type: object
      properties:
        id:
          type: integer
        name:
          type: string
          examples:
            - Main Warehouse
        street:
          type: string
          examples:
            - 123 Logistics Ave
        postcode:
          type: string
          examples:
            - '10115'
        city:
          type: string
          examples:
            - Tallinn
        state:
          type: string
          nullable: true
        country:
          type: string
          examples:
            - Estonia
        timezone:
          type: string
          examples:
            - Europe/Tallinn
        lead_time:
          type: integer
          description: Minimum lead time in minutes for bookings
          examples:
            - 24
        slot_interval:
          type: integer
          description: Time slot interval in minutes
          examples:
            - 15
        track_truck_arrivals:
          type: boolean
          description: Truck tracking module
      x-apidog-orders:
        - id
        - name
        - street
        - postcode
        - city
        - state
        - country
        - timezone
        - lead_time
        - slot_interval
        - track_truck_arrivals
      required:
        - track_truck_arrivals
      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: []

```