> ## 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 by the product variant's `external_id` and the location's `external_id`. If more than one product variant in the shop shares the same `external_id`, this request returns `409 Conflict`.



## OpenAPI

````yaml delete /inventories/external/{variantExternalId}/{locationExternalId}
openapi: 3.1.0
info:
  title: Inventories API
  description: >-
    API for managing inventories.


    Inventory records are identified by a product variant and a location. You
    can

    address a record with Loop global IDs (`productVariantId` and `locationId`)
    or

    with your platform's external IDs (`variantExternalId` and
    `locationExternalId`).


    ### 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/{variantExternalId}/{locationExternalId}:
    delete:
      tags:
        - Inventories
      summary: Delete Inventory by External IDs
      description: >-
        Delete an inventory record identified by the product variant's
        `external_id` and the location's `external_id`. If more than one product
        variant in the shop shares the same `external_id`, this request returns
        `409 Conflict`.
      operationId: deleteInventoryByExternalIds
      parameters:
        - in: path
          name: variantExternalId
          schema:
            type: string
            maxLength: 64
            examples:
              - '4006381333931'
          required: true
          description: The identifier provided as the `external_id` for this variant.
        - in: path
          name: locationExternalId
          schema:
            type: string
            maxLength: 64
            examples:
              - main-warehouse
          required: true
          description: The identifier provided as the `external_id` for this 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'
        '409':
          description: >-
            More than one product variant in the shop matches the provided
            `variantExternalId`.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ConflictResponse'
      security:
        - write: []
components:
  schemas:
    InventoryDeleteByExternalIdsResponse:
      type: object
      required:
        - variant_external_id
        - location_external_id
        - product_variant_id
        - location_id
        - success
      properties:
        variant_external_id:
          type: string
          description: The identifier provided as the `external_id` for this variant.
          examples:
            - '4006381333931'
        location_external_id:
          type: string
          description: The identifier provided as the `external_id` for this location.
          examples:
            - main-warehouse
        product_variant_id:
          type: integer
          format: int64
          description: The unique identifier for the product variant, created by Loop.
          examples:
            - 674353902539857400
        location_id:
          type: integer
          format: int64
          description: The unique identifier for the location, created by Loop.
          examples:
            - 631923350119788400
        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.
    ConflictResponse:
      type: object
      required:
        - message
      properties:
        message:
          type: string
          description: >-
            The message describing that more than one product variant matches
            the provided `variantExternalId`.
          examples:
            - Multiple product variants match the provided external_id.
  securitySchemes:
    write:
      name: X-Authorization
      type: apiKey
      in: header
      description: 'API Scope: "Inventory (write)"'

````