> ## 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 Collection by External ID

> Delete a collection by its commerce `external_id`.



## OpenAPI

````yaml delete /collections/external/{externalId}
openapi: 3.1.0
info:
  title: Collections API
  description: >-
    API for managing collections


    ### 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: Collections
paths:
  /collections/external/{externalId}:
    delete:
      tags:
        - Collections
      summary: Delete Collection by External ID
      description: Delete a collection by its commerce `external_id`.
      operationId: deleteCollectionByExternalId
      parameters:
        - in: path
          name: externalId
          schema:
            type: string
            maxLength: 64
            examples:
              - 564400c7-7a6b-4f29-b6a5-7bb580b2992c
          required: true
          description: >-
            The identifier used by an external source to identify the
            collection.
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CollectionDeleteByExternalIdResponse'
        '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:
    CollectionDeleteByExternalIdResponse:
      type: object
      required:
        - id
        - external_id
        - success
      properties:
        id:
          type: integer
          format: int64
          description: The unique identifier for the collection, created by Loop.
          examples:
            - 23141001200513
        external_id:
          type: string
          description: >-
            The identifier used by an external source to identify the
            collection.
          examples:
            - 564400c7-7a6b-4f29-b6a5-7bb580b2992c
        success:
          type: boolean
          description: Whether the collection was successfully deleted.
          examples:
            - true
    UnauthorizedResponse:
      type: object
      required:
        - errors
      properties:
        errors:
          type: string
          examples:
            - Unauthorized.
    NotFoundResponse:
      type: object
      required:
        - message
      properties:
        message:
          type: string
          examples:
            - Resource not found.
  securitySchemes:
    write:
      name: X-Authorization
      type: apiKey
      in: header
      description: 'API Scope: "Collections (write)"'

````