> ## 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.

# Get Inventory

> Get inventory details for a product variant by location.



## OpenAPI

````yaml get /inventories/{productVariantId}/{locationId}
openapi: 3.1.0
info:
  title: Inventories API
  description: API for managing inventories
  version: v1
servers:
  - url: https://api.loopreturns.com/api/v1
security: []
tags:
  - name: Inventories
    description: Operations related to managing inventories
paths:
  /inventories/{productVariantId}/{locationId}:
    get:
      tags:
        - Inventories
      summary: Get Inventory
      description: Get inventory details for a product variant by location.
      operationId: getInventory
      parameters:
        - in: path
          name: productVariantId
          schema:
            type: integer
            examples:
              - 653985747439023600
          required: true
          description: The unique identifier for the product variant, created by Loop.
        - in: path
          name: locationId
          schema:
            type: integer
            examples:
              - 631923350119788400
          required: true
          description: The unique identifier for the location, created by Loop.
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InventoryResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthorizedResponse'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFoundResponse'
      security:
        - read: []
components:
  schemas:
    InventoryResponse:
      type: object
      properties:
        available_count:
          type: integer
          format: int64
          description: The number of `product_variant`s available at `location`.
          examples:
            - 42
        product_variant:
          type: array
          items:
            $ref: '#/components/schemas/ProductVariantResponseData'
          description: The details associated with the inventory's `product_variant`.
        location:
          type: array
          items:
            $ref: '#/components/schemas/LocationResponseData'
          description: The details associated with the inventory's `location`.
    UnauthorizedResponse:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
              examples:
                - '401'
            http_code:
              type: string
              examples:
                - GEN-UNAUTHORIZED
            message:
              type: string
              examples:
                - Unauthorized.
    NotFoundResponse:
      type: object
      properties:
        code:
          type: string
          examples:
            - '404'
        http_code:
          type: string
          examples:
            - GEN-NOT-FOUND
        message:
          type: string
          examples:
            - >-
              The inventory could not be found. Please verify that the provided
              id is correct.
    ProductVariantResponseData:
      type: object
      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
      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:
          type: array
          description: The address of the location.
          items:
            $ref: '#/components/schemas/AddressResponseData'
    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
          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
          maxLength: 100
          description: The city in which the address is located.
          examples:
            - Townsville
        region:
          type: string
          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
          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)

````