> ## Documentation Index
> Fetch the complete documentation index at: https://docs.flextell.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Get a warehouse



## OpenAPI

````yaml https://dev.flextell.ai/docs/api.json get /v1/warehouses/{id}
openapi: 3.1.0
info:
  title: Flextell API
  version: 0.0.1
  description: '## Flextell API'
servers:
  - url: https://dev.flextell.ai/api
security:
  - oauth2: []
  - bearer: []
paths:
  /v1/warehouses/{id}:
    get:
      tags:
        - Warehouse
      summary: Get a warehouse
      operationId: warehouse.show
      parameters:
        - name: id
          in: path
          required: true
          description: The warehouse identifier
          schema:
            type: integer
        - name: id
          in: query
          required: true
          description: The warehouse identifier.
          schema:
            type: integer
            minimum: 1
        - name: X-Tenant
          in: header
          required: true
          description: >-
            Tenant identifier. Send the Tenant ID in the `X-Tenant` header to
            scope API requests to a specific tenant.
          schema:
            type: number
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: string
                  data:
                    $ref: '#/components/schemas/WarehouseResource'
                required:
                  - success
                  - data
        '401':
          $ref: '#/components/responses/AuthenticationException'
        '403':
          $ref: '#/components/responses/AuthorizationException'
        '404':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: string
                  data:
                    type: object
                    properties:
                      message:
                        type: string
                        const: Warehouse not found
                    required:
                      - message
                required:
                  - success
                  - data
        '422':
          $ref: '#/components/responses/ValidationException'
components:
  schemas:
    WarehouseResource:
      type: object
      properties:
        id:
          type: integer
        tenant_id:
          type: integer
        code:
          type:
            - string
            - 'null'
        name:
          type: string
        description:
          type:
            - string
            - 'null'
        country:
          anyOf:
            - $ref: '#/components/schemas/RelatedCountryResource'
            - type: 'null'
        city:
          anyOf:
            - $ref: '#/components/schemas/RelatedCityResource'
            - type: 'null'
        district:
          anyOf:
            - $ref: '#/components/schemas/RelatedDistrictResource'
            - type: 'null'
        postal_code:
          type:
            - string
            - 'null'
        address:
          type:
            - string
            - 'null'
        latitude:
          type:
            - string
            - 'null'
        longitude:
          type:
            - string
            - 'null'
        contact_fullname:
          type:
            - string
            - 'null'
        contact_email:
          type:
            - string
            - 'null'
        contact_phone:
          type:
            - string
            - 'null'
        is_active:
          type: string
        is_default:
          type: string
        created_at:
          type:
            - string
            - 'null'
          format: date-time
        updated_at:
          type:
            - string
            - 'null'
          format: date-time
      required:
        - id
        - tenant_id
        - code
        - name
        - description
        - country
        - city
        - district
        - postal_code
        - address
        - latitude
        - longitude
        - contact_fullname
        - contact_email
        - contact_phone
        - is_active
        - is_default
        - created_at
        - updated_at
      title: WarehouseResource
    RelatedCountryResource:
      type: object
      properties:
        id:
          type: integer
        name:
          type: string
      required:
        - id
        - name
      title: RelatedCountryResource
    RelatedCityResource:
      type: object
      properties:
        id:
          type: integer
        name:
          type: string
      required:
        - id
        - name
      title: RelatedCityResource
    RelatedDistrictResource:
      type: object
      properties:
        id:
          type: integer
        name:
          type: string
      required:
        - id
        - name
      title: RelatedDistrictResource
  responses:
    AuthenticationException:
      description: Unauthenticated
      content:
        application/json:
          schema:
            type: object
            properties:
              message:
                type: string
                description: Error overview.
            required:
              - message
    AuthorizationException:
      description: Authorization error
      content:
        application/json:
          schema:
            type: object
            properties:
              message:
                type: string
                description: Error overview.
            required:
              - message
    ValidationException:
      description: Validation error
      content:
        application/json:
          schema:
            type: object
            properties:
              message:
                type: string
                description: Errors overview.
              errors:
                type: object
                description: A detailed description of each field that failed validation.
                additionalProperties:
                  type: array
                  items:
                    type: string
            required:
              - message
              - errors
  securitySchemes:
    oauth2:
      type: oauth2
      flows:
        authorizationCode:
          authorizationUrl: https://dev.flextell.ai/oauth/authorize
          tokenUrl: https://dev.flextell.ai/oauth/token
          scopes:
            '*': all
    bearer:
      type: http
      scheme: bearer

````