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

# Delete Inventory by External IDs

> Delete an inventory record identified using the commerce `external_id` values for the product, variant, and location.



## OpenAPI

````yaml delete /inventories/external/products/{productExternalId}/variants/{variantExternalId}/locations/{locationExternalId}
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/external/products/{productExternalId}/variants/{variantExternalId}/locations/{locationExternalId}:
    delete:
      tags:
        - Inventories
      summary: Delete Inventory by External IDs
      description: >-
        Delete an inventory record identified using the commerce `external_id`
        values for the product, variant, and location.
      operationId: deleteInventoryByExternalIds
      parameters:
        - in: path
          name: productExternalId
          schema:
            type: string
            maxLength: 64
            examples:
              - ex4mpl3-pr0duct
          required: true
          description: The identifier used by an external source to identify the product.
        - in: path
          name: variantExternalId
          schema:
            type: string
            maxLength: 64
            examples:
              - ex4mpl3-pr0duct-v4r14nt
          required: true
          description: >-
            The identifier used by an external source to identify the product
            variant.
        - in: path
          name: locationExternalId
          schema:
            type: string
            maxLength: 64
            examples:
              - ex4mpl3-l0c4t10n
          required: true
          description: The identifier used by an external source to identify the location.
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InventoryDeleteByExternalIdsResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthorizedResponse'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFoundResponse'
      security:
        - write: []
components:
  schemas:
    InventoryDeleteByExternalIdsResponse:
      type: object
      required:
        - product_external_id
        - product_variant_id
        - product_variant_external_id
        - location_id
        - location_external_id
        - success
      properties:
        product_external_id:
          type: string
          description: The identifier used by an external source to identify the product.
          examples:
            - ex4mpl3-pr0duct
        product_variant_id:
          type: integer
          format: int64
          description: The unique identifier for the product variant, created by Loop.
          examples:
            - 674353902539857400
        product_variant_external_id:
          type: string
          description: >-
            The identifier used by an external source to identify the product
            variant.
          examples:
            - ex4mpl3-pr0duct-v4r14nt
        location_id:
          type: integer
          format: int64
          description: The unique identifier for the location, created by Loop.
          examples:
            - 631923350119788400
        location_external_id:
          type: string
          description: The identifier used by an external source to identify the location.
          examples:
            - ex4mpl3-l0c4t10n
        success:
          type: boolean
          description: Whether the inventory was successfully deleted.
          examples:
            - true
    UnauthorizedResponse:
      type: object
      required:
        - errors
      properties:
        errors:
          type: string
          description: The message describing why the request was not authorized.
          examples:
            - Unauthorized.
    NotFoundResponse:
      type: object
      required:
        - message
      properties:
        message:
          type: string
          description: The message describing that the requested resource was not found.
          examples:
            - Resource not found.
  securitySchemes:
    write:
      name: X-Authorization
      type: apiKey
      in: header
      description: 'API Scope: "Inventory (write)"'

````