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

# Update Bulk Product Splits

> **/product/bulksplits**

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

## Description

**/product/bulksplits**

**Description:**
The `/product/bulksplits` endpoint allows updating splits for multiple products simultaneously.

**Method:**
`PATCH`

**Request Payload:**

| Parameter | Type  | Description                               |
| --------- | ----- | ----------------------------------------- |
| updates   | array | An array of product split update objects. |

## Code Examples

<CodeGroup>
  ```javascript Node.js theme={null}
  const response = await fetch('https://api.royalti.io/product/bulksplits', {
    method: 'PUT',
    headers: {
      'Authorization': `Bearer ${token}`,
      'Content-Type': 'application/json'
    },
    body: JSON.stringify({
      "updates": [
        {
          "productId": "sample-productId",
          "split": [
            {
              "user": "sample-user",
              "share": 1
            }
          ]
        }
      ]
    })
  });

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

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

  response = requests.put(
    'https://api.royalti.io/product/bulksplits',
    headers={
      'Authorization': f'Bearer {token}'
    },
    json={"updates":[{"productId":"sample-productId","split":[{"user":"sample-user","share":1}]}]}
  )

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

  ```bash cURL theme={null}
  curl -X PUT https://api.royalti.io/product/bulksplits \
    -H "Authorization: Bearer YOUR_TOKEN" \
    -H "Content-Type: application/json" \
    -d '{"updates":[{"productId":"sample-productId","split":[{"user":"sample-user","share":1}]}]}'

  ```
</CodeGroup>


## OpenAPI

````yaml put /product/bulksplits
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:
  /product/bulksplits:
    put:
      tags:
        - Product
      summary: Update Bulk Product Splits
      description: >-
        **/product/bulksplits**


        **Description:**

        The `/product/bulksplits` endpoint allows updating splits for multiple
        products simultaneously.


        **Method:**

        `PATCH`


        **Request Payload:**


        | Parameter | Type | Description |

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

        | updates | array | An array of product split update objects. |
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                updates:
                  type: array
                  items:
                    type: object
                    properties:
                      productId:
                        type: string
                      split:
                        type: array
                        items:
                          type: object
                          properties:
                            user:
                              type: string
                            share:
                              type: integer
              required:
                - updates
      responses:
        '201':
          description: Product created successfully
          headers:
            X-Deprecation-Warning:
              description: List of deprecated fields used in the request
              schema:
                type: string
              example: >-
                The following fields are deprecated: catalog. Please use their
                new equivalents.
            X-Catalog-Deprecation:
              description: Specific deprecation warning for catalog field
              schema:
                type: string
              example: >-
                The "catalog" field is deprecated. Please use "catalogNumber"
                instead.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProductResponse'
        '400':
          description: Bad request - validation errors or malformed data
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                missing_title:
                  summary: Missing required title field
                  value:
                    error: Title is required
                    code: BAD_REQUEST
                invalid_assets:
                  summary: Invalid asset data format
                  value:
                    error: Invalid asset data format
                    code: BAD_REQUEST
        '401':
          description: Unauthorized - invalid or missing authentication
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden - insufficient permissions for tenant
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - bearerAuth: []
components:
  schemas:
    ProductResponse:
      type: object
      properties:
        id:
          type: string
          description: Unique product identifier
          example: prod_123456
        title:
          type: string
          description: Product title
          example: Summer Vibes
        displayArtist:
          type: string
          description: Display artist name
          example: John Doe feat. Jane Smith
        upc:
          type: string
          description: Universal Product Code
          example: '123456789012'
        catalogNumber:
          type: string
          description: Catalog number
          example: CAT-2024-001
        type:
          type: string
          enum:
            - Audio
            - Video
            - Ringtone
          example: Audio
        format:
          type: string
          enum:
            - Single
            - EP
            - Album
            - LP
          description: Product format (auto-determined by asset count)
          example: Single
        explicit:
          type: string
          enum:
            - explicit
            - clean
          example: clean
        releaseDate:
          type: string
          format: date
          example: '2024-06-15'
        takedownDate:
          type: string
          format: date
          nullable: true
          example: null
        mainGenre:
          type: string
          example: Pop
        subGenre:
          type: string
          example: Dance Pop
        status:
          type: string
          example: active
        version:
          type: string
          example: Deluxe Edition
        label:
          type: string
          description: Record label (from artist defaults)
          example: Indie Records
        copyright:
          type: string
          description: Copyright information (from artist defaults)
          example: 2024 John Doe
        publisher:
          type: string
          description: Publisher information (from artist defaults)
          example: Music Publishing Co.
        media:
          type: array
          description: Associated media files (artwork, etc.)
          items:
            type: object
            properties:
              id:
                type: string
              url:
                type: string
                format: uri
              type:
                type: string
              mimetype:
                type: string
        artists:
          type: array
          description: Associated artists
          items:
            type: object
            properties:
              id:
                type: string
              name:
                type: string
              type:
                type: string
                enum:
                  - primary
                  - featuring
        assets:
          type: array
          description: Associated media assets
          items:
            type: object
            properties:
              id:
                type: string
              title:
                type: string
              isrc:
                type: string
              number:
                type: integer
        distribution:
          type: object
          description: Distribution settings
          additionalProperties: true
        contributors:
          type: array
          description: Contributors list
          items:
            type: object
        metadata:
          type: object
          description: Additional metadata
          additionalProperties: true
        chartHistory:
          type: array
          items:
            type: object
            properties:
              chart:
                type: string
              position:
                type: integer
              date:
                type: string
                format: date
          description: Historical chart positions
        totalTracks:
          type: integer
          description: Total number of tracks on the product
          example: 12
        totalDiscs:
          type: integer
          description: Total number of discs in the product
          example: 1
        packageType:
          type: string
          description: Physical/digital package type
          example: Digital Album
        edition:
          type: string
          description: Edition designation
          example: Deluxe Edition
        reissue:
          type: boolean
          description: Whether this product is a reissue
        originalReleaseDate:
          type: string
          format: date
          description: Original release date (for reissues)
        recordingLocation:
          type: string
          description: Recording studio/location
        masteringLocation:
          type: string
          description: Mastering studio/location
        producer:
          type: array
          items:
            type: string
          description: Producer name(s)
        engineer:
          type: array
          items:
            type: string
          description: Engineer name(s)
        sequenceNumber:
          type: integer
          description: Sequence number in a series
        parentReleaseId:
          type: string
          format: uuid
          description: Parent release ID for variants
        language:
          type: string
          description: Primary language code (ISO 639-1)
          example: en
        c_line_year:
          type: integer
          description: Copyright line year (©)
          example: 2024
        p_line_year:
          type: integer
          description: Phonogram line year (℗)
          example: 2024
        createdAt:
          type: string
          format: date-time
          description: Creation timestamp
          example: '2024-08-25T10:30:00Z'
        updatedAt:
          type: string
          format: date-time
          description: Last update timestamp
          example: '2024-08-25T10:30:00Z'
    ErrorResponse:
      type: object
      properties:
        error:
          type: string
          description: Error message
          example: Title is required
        code:
          type: string
          description: Error code
          example: BAD_REQUEST
        details:
          type: object
          description: Additional error details
          additionalProperties: true
      required:
        - error
        - code
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: >-
        JWT Authorization header using the Bearer scheme. Format: "Bearer
        {token}"

````