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

# Get stock levels

> Returns current stock levels for a facility. Requires read:inventory scope.



## OpenAPI

````yaml /openapi-v2.json get /inventory/stock-levels
openapi: 3.0.0
info:
  title: Max AI Public API
  description: API for third-party marketplace apps
  version: '2.0'
  contact: {}
servers:
  - url: https://api.maxcare.ai/v2
security: []
tags: []
paths:
  /inventory/stock-levels:
    get:
      tags:
        - Inventory
      summary: Get stock levels
      description: >-
        Returns current stock levels for a facility. Requires read:inventory
        scope.
      operationId: InventoryPublicController_getStockLevels
      parameters:
        - name: facilityId
          required: true
          in: query
          description: Facility ID to get stock levels for
          schema:
            type: string
        - name: X-Organization-Id
          in: header
          required: true
          schema:
            type: string
          description: Target clinic organization ID
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetStockLevelsSuccessResponse'
        '401':
          description: Invalid or missing API key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublicApiUnauthorizedResponse'
        '403':
          description: Insufficient scope
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublicApiForbiddenResponse'
        '429':
          description: Rate limit exceeded
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublicApiRateLimitResponse'
      security:
        - api-key: []
components:
  schemas:
    GetStockLevelsSuccessResponse:
      type: object
      properties:
        code:
          type: string
          description: Response code
          example: success
        data:
          $ref: '#/components/schemas/StockLevelsResponseData'
      required:
        - code
        - data
    PublicApiUnauthorizedResponse:
      type: object
      properties:
        code:
          type: string
          description: Error code
          example: unauthorized
        message:
          type: string
          description: Human-readable error message
          example: Invalid or missing API key
        trace_id:
          type: string
          description: Trace ID for debugging
          example: 550e8400-e29b-41d4-a716-446655440000
      required:
        - code
        - message
        - trace_id
    PublicApiForbiddenResponse:
      type: object
      properties:
        code:
          type: string
          description: Error code
          example: forbidden
        message:
          type: string
          description: Human-readable error message
          example: Insufficient scope
        trace_id:
          type: string
          description: Trace ID for debugging
          example: 550e8400-e29b-41d4-a716-446655440000
      required:
        - code
        - message
        - trace_id
    PublicApiRateLimitResponse:
      type: object
      properties:
        code:
          type: string
          description: Error code
          example: rate_limit_exceeded
        message:
          type: string
          description: Human-readable error message
          example: Rate limit exceeded. Maximum 1000 requests per 60 seconds.
        trace_id:
          type: string
          description: Trace ID for debugging
          example: 550e8400-e29b-41d4-a716-446655440000
      required:
        - code
        - message
        - trace_id
    StockLevelsResponseData:
      type: object
      properties:
        stockLevels:
          type: array
          items:
            $ref: '#/components/schemas/ExternalStockLevelResponse'
      required:
        - stockLevels
    ExternalStockLevelResponse:
      type: object
      properties:
        productId:
          type: string
          description: Product ID
          example: b4c5d6e7-f8a9-4b0c-1d2e-3f4a5b6c7d8e
        productName:
          type: string
          description: Product name
          example: Botox 100 Units
        productGtin:
          type: string
          description: Product GTIN
          nullable: true
          example: '00814260991517'
        productType:
          type: string
          description: Product type
          enum:
            - medical_device
            - drug
            - supply
            - other
          example: drug
        quantity:
          type: number
          description: Current stock quantity
          example: 24
        updatedAt:
          type: string
          description: Last updated timestamp
          example: '2025-01-20T17:00:00.000Z'
      required:
        - productId
        - productName
        - productGtin
        - productType
        - quantity
        - updatedAt
  securitySchemes:
    api-key:
      scheme: bearer
      bearerFormat: JWT
      type: http
      description: Marketplace API key

````