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

# Consultar inventario por depósito

> Devuelve el inventario de un depósito específico con filtros por categoría, tipo y cantidades.



## OpenAPI

````yaml /api-reference/openapi.json get /api/v1/inventory
openapi: 3.1.0
info:
  title: La Pyme API
  description: >-
    Resources and workflows for purchases, sales, inventory, contacts, products,
    reports, and settings.
  version: 1.0.0
  contact:
    name: La Pyme Support
    email: hola@lapyme.com.ar
  license:
    name: Proprietary
    url: https://lapyme.com.ar/terminos
servers:
  - url: https://api.lapyme.com.ar
    description: Servidor de producción
security:
  - bearerAuth: []
tags:
  - name: API
    description: Public API operations for La Pyme integrations.
paths:
  /api/v1/inventory:
    get:
      tags:
        - API
      summary: Consultar inventario por depósito
      description: >-
        Devuelve el inventario de un depósito específico con filtros por
        categoría, tipo y cantidades.
      operationId: listApiInventory
      parameters:
        - name: warehouse_id
          in: query
          description: ID del depósito a consultar
          required: true
          schema:
            type: string
            format: uuid
        - name: cursor
          in: query
          description: Valor de next_cursor recibido en la respuesta anterior
          required: false
          schema:
            type: string
        - name: limit
          in: query
          description: Cantidad máxima de resultados por respuesta
          required: false
          schema:
            type: integer
            minimum: 1
            maximum: 100
            default: 50
        - name: query
          in: query
          description: Texto de búsqueda por producto, SKU, código de barras o variante
          required: false
          schema:
            type: string
        - name: search
          in: query
          description: Alias de query
          required: false
          schema:
            type: string
        - name: category_ids
          in: query
          description: IDs de categorías. Puede repetirse o enviarse separada por comas.
          required: false
          schema:
            type: array
            items:
              type: string
              format: uuid
          style: form
          explode: true
        - name: product_types
          in: query
          description: Tipos de producto. Puede repetirse o enviarse separada por comas.
          required: false
          schema:
            type: array
            items:
              $ref: '#/components/schemas/ApiSharedEnum5c962a8637'
          style: form
          explode: true
        - name: available_rule
          in: query
          description: Regla para el filtro de stock disponible
          required: false
          schema:
            $ref: '#/components/schemas/ApiSharedEnuma4e4082638'
        - name: available_amount
          in: query
          description: Cantidad exacta cuando availableRule=equal
          required: false
          schema:
            type: number
        - name: available_min
          in: query
          description: Cantidad mínima cuando availableRule=between
          required: false
          schema:
            type: number
        - name: available_max
          in: query
          description: Cantidad máxima cuando availableRule=between
          required: false
          schema:
            type: number
        - name: on_hand_rule
          in: query
          description: Regla para el filtro de stock físico
          required: false
          schema:
            $ref: '#/components/schemas/ApiSharedEnuma4e4082638'
        - name: on_hand_amount
          in: query
          description: Cantidad exacta cuando onHandRule=equal
          required: false
          schema:
            type: number
        - name: on_hand_min
          in: query
          description: Cantidad mínima cuando onHandRule=between
          required: false
          schema:
            type: number
        - name: on_hand_max
          in: query
          description: Cantidad máxima cuando onHandRule=between
          required: false
          schema:
            type: number
        - name: reserved_rule
          in: query
          description: Regla para el filtro de stock reservado
          required: false
          schema:
            $ref: '#/components/schemas/ApiSharedEnuma4e4082638'
        - name: reserved_amount
          in: query
          description: Cantidad exacta cuando reservedRule=equal
          required: false
          schema:
            type: number
        - name: reserved_min
          in: query
          description: Cantidad mínima cuando reservedRule=between
          required: false
          schema:
            type: number
        - name: reserved_max
          in: query
          description: Cantidad máxima cuando reservedRule=between
          required: false
          schema:
            type: number
        - name: incoming_rule
          in: query
          description: Regla para el filtro de stock entrante
          required: false
          schema:
            $ref: '#/components/schemas/ApiSharedEnuma4e4082638'
        - name: incoming_amount
          in: query
          description: Cantidad exacta cuando incomingRule=equal
          required: false
          schema:
            type: number
        - name: incoming_min
          in: query
          description: Cantidad mínima cuando incomingRule=between
          required: false
          schema:
            type: number
        - name: incoming_max
          in: query
          description: Cantidad máxima cuando incomingRule=between
          required: false
          schema:
            type: number
      responses:
        '200':
          description: Inventario obtenido exitosamente
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiInventoryListResponse'
        '400':
          description: Parámetros inválidos
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorEnvelope'
              examples:
                default:
                  summary: INVALID_REQUEST
                  value:
                    request_id: req_inventory_1
                    error:
                      code: INVALID_REQUEST
                      message: Invalid parameters for querying inventory
                      retryable: false
                      type: invalid_request_error
                      details: []
        '401':
          description: API key faltante o inválida
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorEnvelope'
              examples:
                default:
                  summary: AUTHENTICATION_REQUIRED
                  value:
                    request_id: req_inventory_1
                    error:
                      code: AUTHENTICATION_REQUIRED
                      message: API key is required in the Authorization header
                      retryable: false
                      type: invalid_request_error
                      details: []
        '403':
          description: Scopes insuficientes
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorEnvelope'
              examples:
                default:
                  summary: FORBIDDEN
                  value:
                    request_id: req_inventory_1
                    error:
                      code: FORBIDDEN
                      message: Your API key does not have permission for this operation
                      retryable: false
                      type: invalid_request_error
                      details: []
        '404':
          description: Depósito no encontrado
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorEnvelope'
              examples:
                default:
                  summary: NOT_FOUND
                  value:
                    request_id: req_inventory_1
                    error:
                      code: NOT_FOUND
                      message: Warehouse not found
                      retryable: false
                      type: invalid_request_error
                      details: []
        '429':
          description: Límite de solicitudes excedido para la organización
          headers:
            Retry-After:
              description: Segundos a esperar antes de volver a intentar la solicitud.
              schema:
                type: string
                example: '30'
            X-RateLimit-Limit:
              description: Límite de la ventana activa.
              schema:
                type: string
                example: '5000'
            X-RateLimit-Remaining:
              description: Solicitudes restantes en la ventana activa.
              schema:
                type: string
                example: '0'
            X-RateLimit-Reset:
              description: Segundos restantes hasta el reset de la ventana activa.
              schema:
                type: string
                example: '30'
            RateLimit-Limit:
              description: Límite de la ventana activa en formato estándar.
              schema:
                type: string
                example: '5000'
            RateLimit-Remaining:
              description: Solicitudes restantes en la ventana activa en formato estándar.
              schema:
                type: string
                example: '0'
            RateLimit-Reset:
              description: >-
                Segundos hasta el reset de la ventana activa en formato
                estándar.
              schema:
                type: string
                example: '30'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorEnvelope'
              examples:
                default:
                  summary: RATE_LIMITED
                  value:
                    request_id: req_rate_limit_1
                    error:
                      type: rate_limit_error
                      code: RATE_LIMITED
                      message: >-
                        The organization request limit was reached. Try again
                        later.
                      retryable: true
                      details: []
        '500':
          description: Error interno del servidor
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorEnvelope'
              examples:
                default:
                  summary: INTERNAL_ERROR
                  value:
                    request_id: req_inventory_1
                    error:
                      code: INTERNAL_ERROR
                      message: Could not query inventory
                      retryable: false
                      type: invalid_request_error
                      details: []
      x-codeSamples:
        - lang: typescript
          label: La Pyme SDK
          source: |
            import { Lapyme } from "lapyme";

            const lapyme = new Lapyme({
              bearerAuth: process.env["LAPYME_API_KEY"] ?? "",
            });

            const inventory = await lapyme.inventory.listInventory({
              warehouseId: "9c692e8b-0f9a-4f7c-8b99-061a2eb188ae",
              limit: 20,
              query: "remera",
            });
components:
  schemas:
    ApiSharedEnum5c962a8637:
      type: string
      enum:
        - product
        - combo
        - kit
        - service
    ApiSharedEnuma4e4082638:
      type: string
      enum:
        - equal
        - between
    ApiInventoryListResponse:
      type: object
      properties:
        request_id:
          type: string
        data:
          type: object
          properties:
            warehouse:
              $ref: '#/components/schemas/ApiSharedObjectadcf6da6ce'
            items:
              type: array
              items:
                type: object
                properties:
                  object:
                    type: string
                    const: inventory_item
                  product_id:
                    type: string
                    format: uuid
                  product_name:
                    type: string
                  sku:
                    type: string
                  variant_options:
                    anyOf:
                      - type: object
                        propertyNames:
                          type: string
                        additionalProperties:
                          type: string
                      - type: 'null'
                  option_names:
                    type: array
                    items:
                      type: string
                  category:
                    anyOf:
                      - $ref: '#/components/schemas/ApiSharedObject8aeeceaf0f'
                      - type: 'null'
                  product_type:
                    $ref: '#/components/schemas/ApiSharedEnumff49232140'
                  stock:
                    $ref: '#/components/schemas/ApiSharedObject5884d24e45'
                required:
                  - object
                  - product_id
                  - product_name
                  - sku
                  - variant_options
                  - option_names
                  - category
                  - product_type
                  - stock
                additionalProperties: false
          required:
            - warehouse
            - items
          additionalProperties: false
        has_more:
          type: boolean
        next_cursor:
          anyOf:
            - type: string
            - type: 'null'
        object:
          $ref: '#/components/schemas/ApiSharedEnum8d46e1ec20'
        url:
          type: string
          description: Requested list path.
      required:
        - request_id
        - data
        - has_more
        - next_cursor
        - object
        - url
      additionalProperties: false
    ApiErrorEnvelope:
      type: object
      properties:
        request_id:
          type: string
        error:
          type: object
          properties:
            type:
              type: string
              enum:
                - api_error
                - authentication_error
                - authorization_error
                - business_error
                - external_dependency_error
                - idempotency_error
                - invalid_request_error
                - rate_limit_error
            code:
              type: string
            message:
              type: string
            retryable:
              type: boolean
            details:
              type: array
              items:
                $ref: '#/components/schemas/ApiSharedObjectc671832641'
          required:
            - type
            - code
            - message
            - retryable
            - details
          additionalProperties: false
      required:
        - request_id
        - error
      additionalProperties: false
    ApiSharedObjectadcf6da6ce:
      type: object
      properties:
        object:
          type: string
          const: warehouse
        id:
          type: string
          format: uuid
        name:
          type: string
        address:
          anyOf:
            - type: string
            - type: 'null'
        is_default:
          type: boolean
        is_active:
          type: boolean
      required:
        - object
        - id
        - name
        - address
        - is_default
        - is_active
      additionalProperties: false
    ApiSharedObject8aeeceaf0f:
      type: object
      properties:
        id:
          type: string
          format: uuid
        name:
          type: string
      required:
        - id
        - name
      additionalProperties: false
    ApiSharedEnumff49232140:
      type: string
      enum:
        - product
        - service
        - combo
        - kit
    ApiSharedObject5884d24e45:
      type: object
      properties:
        available:
          type: number
        on_hand:
          type: number
        reserved:
          type: number
        incoming:
          type: number
      required:
        - available
        - on_hand
        - reserved
        - incoming
      additionalProperties: false
    ApiSharedEnum8d46e1ec20:
      type: string
      enum:
        - list
      description: List-envelope discriminator.
    ApiSharedObjectc671832641:
      type: object
      properties:
        code:
          type: string
        message:
          type: string
        field:
          type: string
      required:
        - code
        - message
      additionalProperties: false
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API Key
      description: Incluí tu API key en el header Authorization con el prefijo Bearer.

````