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

# List Inventories

> Retrieve a list of inventories. The list can be filtered, sorted, and paginated using the parameters below.



## OpenAPI

````yaml get /inventories
openapi: 3.1.0
info:
  title: Inventories API
  description: >-
    API for managing inventories


    ### Resource identifier format


    Resource identifiers (the `id` field and related global-identifier fields)
    are returned as JSON

    integers by default. To receive them as strings instead, send the

    `X-Loop-Global-Identifier-Type: string` request header.
  version: v1
servers:
  - url: https://api.loopreturns.com/api/v1
security: []
tags:
  - name: Inventories
    description: Operations related to managing inventories
paths:
  /inventories:
    get:
      tags:
        - Inventories
      summary: List Inventories
      description: >-
        Retrieve a list of inventories. The list can be filtered, sorted, and
        paginated using the parameters below.
      operationId: listInventories
      parameters:
        - name: location_id
          in: query
          description: >-
            The list returned will contain only inventories associated with the
            specified location.
          required: false
          schema:
            type: integer
        - name: product_variant_id
          in: query
          description: >-
            The list returned will contain only inventories containing the
            specified product variant.
          required: false
          schema:
            type: integer
        - name: limit
          in: query
          description: The maximum number of inventories returned.
          required: false
          schema:
            type: integer
            maximum: 250
            default: 50
        - name: sort_order
          in: query
          description: The sort order for the results.
          required: false
          schema:
            type: string
            enum:
              - asc
              - desc
            default: asc
        - name: cursor
          in: query
          description: The cursor to return the next page of results.
          required: false
          schema:
            type: string
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                required:
                  - inventories
                properties:
                  inventories:
                    type: array
                    items:
                      $ref: '#/components/schemas/InventoryResponse'
                    description: An array of inventories.
                  next_page_url:
                    type:
                      - string
                      - 'null'
                  previous_page_url:
                    type:
                      - string
                      - 'null'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthorizedResponse'
      security:
        - read: []
components:
  schemas:
    InventoryResponse:
      type: object
      properties:
        available_count:
          type:
            - integer
            - 'null'
          format: int64
          description: The number of `product_variant`s available at `location`.
          examples:
            - 42
        product_variant:
          description: The details associated with the inventory's `product_variant`.
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/ProductVariantResponseData'
        location:
          description: The details associated with the inventory's `location`.
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/LocationResponseData'
    UnauthorizedResponse:
      type: object
      required:
        - errors
      properties:
        errors:
          type: string
          description: The message describing why the request was not authorized.
          examples:
            - Unauthorized.
    ProductVariantResponseData:
      type: object
      required:
        - id
        - name
      properties:
        id:
          type: integer
          format: int64
          description: The unique identifier for the product variant, created by Loop.
          examples:
            - 674353902539857400
        external_id:
          type:
            - string
            - 'null'
          maxLength: 100
          description: >-
            The identifier used by an external source to identify the product
            variant.
          examples:
            - ex4mpl3-pr0duct-v4r14nt
        sku:
          type:
            - string
            - 'null'
          maxLength: 255
          description: The SKU of the product variant.
          examples:
            - EXAMPLEPRODUCT-VAR-1
        name:
          type: string
          maxLength: 255
          description: The name of the product variant.
          examples:
            - Example Product
        weight_grams:
          type:
            - integer
            - 'null'
          description: The weight of the product variant in grams.
          examples:
            - 444
        barcode:
          type:
            - string
            - 'null'
          maxLength: 255
          description: The barcode of the product variant.
          examples:
            - 23141001200513
    LocationResponseData:
      type: object
      required:
        - id
        - name
        - status
        - address
      properties:
        id:
          type: integer
          format: int64
          description: The unique identifier for the location, created by Loop.
          examples:
            - 680118439701923300
        external_id:
          type:
            - string
            - 'null'
          maxLength: 100
          description: The identifier used by an external source to identify the location.
          examples:
            - main-warehouse
        name:
          type: string
          maxLength: 45
          description: The name of the location.
          examples:
            - Main Warehouse
        status:
          type: string
          description: The status of the location.
          enum:
            - active
            - inactive
        address:
          $ref: '#/components/schemas/AddressResponseData'
          description: The address of the location.
    AddressResponseData:
      type: object
      properties:
        name:
          type:
            - string
            - 'null'
          maxLength: 100
          description: The name of the address.
          examples:
            - Main Warehouse
        company:
          type:
            - string
            - 'null'
          maxLength: 100
          description: The name of the company residing at the address.
          examples:
            - Universal Exports
        address1:
          type:
            - string
            - 'null'
          maxLength: 125
          description: Line 1 of the address.
          examples:
            - 1234 Example Street
        address2:
          type:
            - string
            - 'null'
          maxLength: 125
          description: Line 2 of the address.
          examples:
            - Unit 19
        city:
          type:
            - string
            - 'null'
          maxLength: 100
          description: The city in which the address is located.
          examples:
            - Townsville
        region:
          type:
            - string
            - 'null'
          maxLength: 100
          description: The state or region in which the address is located.
          examples:
            - Louisiana
        postal_code:
          type:
            - string
            - 'null'
          maxLength: 16
          description: The postal code associated with the address.
          examples:
            - 90210
        country_code:
          type:
            - string
            - 'null'
          maxLength: 2
          description: The country code associated with the address.
          examples:
            - US
  securitySchemes:
    read:
      type: apiKey
      in: header
      name: X-Authorization
      description: 'API Scope: "Inventory (read)"'
      x-scope: Inventory (Read)

````