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

# Bulk delete catalog splits

> **Bulk Delete Catalog Splits**

<Note>
  This endpoint requires authentication. Include your Bearer token in the Authorization header.
</Note>

## Description

**Bulk Delete Catalog Splits**

The Bulk Delete Catalog Splits endpoint (`/split/bulk/catalog-splits`) allows users to delete all splits associated with specific assets or products in bulk.

**Method:**\
`DELETE`

**Request Payload:**

The request payload should be a JSON object with an array of asset or product IDs and the type specifying whether they are assets or products.

| Parameter | Type      | Required | Description                                                 |
| --------- | --------- | -------- | ----------------------------------------------------------- |
| ids       | string\[] | Yes      | An array of asset or product IDs (UUIDs)                    |
| type      | string    | Yes      | Either "asset" or "product" to specify the type of entities |

> This request deletes all splits associated with the specified assets or products. For assets, only asset-level splits are deleted (where ProductId is null). For products, all splits associated with the product are deleted.

## Code Examples

<CodeGroup>
  ```javascript Node.js theme={null}
  const response = await fetch('https://api.royalti.io/split/bulk/catalog-splits', {
    method: 'DELETE',
    headers: {
      'Authorization': `Bearer ${token}`,
    },
  });

  const data = await response.json();
  console.log(data);
  ```

  ```python Python theme={null}
  import requests

  response = requests.delete(
    'https://api.royalti.io/split/bulk/catalog-splits',
    headers={
      'Authorization': f'Bearer {token}'
    },
  )

  data = response.json()
  print(data)
  ```

  ```bash cURL theme={null}
  curl -X DELETE https://api.royalti.io/split/bulk/catalog-splits \
    -H "Authorization: Bearer YOUR_TOKEN" \

  ```
</CodeGroup>


## OpenAPI

````yaml delete /split/bulk/catalog-splits
openapi: 3.0.0
info:
  title: Royalti.io API
  description: "# Royalti API\r\n\r\nThis is the Royalti music royalty management platform API server.\r\n\r\n## Overview\r\n\r\nThe Royalti API provides comprehensive music royalty management services including:\r\n- Music publishing and writer management\r\n- Royalty processing and analytics\r\n- DDEX integration for music industry standards\r\n- File processing and pattern recognition\r\n- Payment processing and distribution\r\n\r\n## Authentication\r\n\r\nThe API uses JWT-based authentication with multiple protection levels:\r\n- Public endpoints for basic operations\r\n- Protected endpoints requiring valid JWT tokens\r\n- Admin endpoints for administrative functions\r\n\r\n## Features\r\n\r\n- Multi-dimensional royalty analytics\r\n- CWR (Collective Works Registration) support\r\n- DDEX integration for music metadata\r\n- Advanced file processing with pattern recognition\r\n- Real-time data processing with queue system"
  version: 2.6.0
  contact:
    name: Royalti.io Support
    email: support@royalti.io
    url: https://royalti.io
  license:
    name: Proprietary
    url: https://royalti.io/terms
servers:
  - url: https://api.royalti.io
    description: Production server
  - url: https://api-dev.royalti.io
    description: Development server
  - url: http://localhost:8084
    description: Local development
security:
  - bearerAuth: []
tags:
  - name: Accounting
    description: Accounting and financial transaction operations
  - name: DDEX
    description: DDEX operations (ERN/MEAD, messages, delivery, providers)
  - name: Label
    description: Label management operations
  - name: Internal Webhooks
    description: Internal system webhooks for royalty processing and downloads
  - name: Payment Webhooks
    description: Payment processor webhook endpoints
  - name: Billing Webhooks
    description: Stripe billing and subscription webhooks
  - name: Infrastructure Webhooks
    description: Cloudflare domain and SSL webhooks
  - name: Distribution Webhooks
    description: Digital distribution platform webhooks (FUGA)
paths:
  /split/bulk/catalog-splits:
    delete:
      tags:
        - Splits
      summary: Bulk delete catalog splits
      description: >-
        **Bulk Delete Catalog Splits**


        The Bulk Delete Catalog Splits endpoint (`/split/bulk/catalog-splits`)
        allows users to delete all splits associated with specific assets or
        products in bulk.


        **Method:**  

        `DELETE`


        **Request Payload:**


        The request payload should be a JSON object with an array of asset or
        product IDs and the type specifying whether they are assets or products.


        | Parameter | Type | Required | Description |

        | --- | --- | --- | --- |

        | ids | string[] | Yes | An array of asset or product IDs (UUIDs) |

        | type | string | Yes | Either "asset" or "product" to specify the type
        of entities |


        > This request deletes all splits associated with the specified assets
        or products. For assets, only asset-level splits are deleted (where
        ProductId is null). For products, all splits associated with the product
        are deleted.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                ids:
                  type: array
                  items:
                    type: string
                    format: uuid
                  description: An array of asset or product IDs (UUIDs)
                type:
                  type: string
                  enum:
                    - asset
                    - product
                  description: Type of entities - either "asset" or "product"
              required:
                - ids
                - type
            example:
              ids:
                - d1c5b49e-95fa-4aed-930e-cf314c16a53d
                - e2d6c5af-96gb-5bed-a41f-df425d27b64e
                - f3e7d6bg-a7hc-6cfe-b52g-eg536e38c75f
              type: asset
      responses:
        '200':
          description: Catalog splits deleted successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                  totalProcessed:
                    type: integer
                  totalSplitsDeleted:
                    type: integer
                  failedDeletions:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                        error:
                          type: string
                        splitsDeleted:
                          type: integer
              example:
                message: Asset splits deletion completed.
                totalProcessed: 3
                totalSplitsDeleted: 7
                failedDeletions: []
        '400':
          description: Bad Request - Invalid type or IDs
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                success: false
                error:
                  code: BAD_REQUEST
                  message: Invalid type. Must be either "product" or "asset"
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Some splits could not be deleted
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                  totalProcessed:
                    type: integer
                  totalSplitsDeleted:
                    type: integer
                  failedDeletions:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                        error:
                          type: string
              example:
                message: Asset splits deletion completed.
                totalProcessed: 2
                totalSplitsDeleted: 3
                failedDeletions:
                  - id: invalid-uuid
                    error: No splits found for this asset
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - bearerAuth: []
components:
  schemas:
    Error:
      type: object
      properties:
        success:
          type: boolean
          example: false
        error:
          type: object
          properties:
            code:
              type: string
            message:
              type: string
            details:
              type: array
              items:
                type: string
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: >-
        JWT Authorization header using the Bearer scheme. Format: "Bearer
        {token}"

````