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

> **/product/{id}**

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

## Description

**/product/{id}**

**Description:**
The `/product/{id}` endpoint allows updating the details of a specific product identified by its unique ID.

**Method:**
`PUT`

**Path Parameter:**

| Parameter | Type   | Description                           |
| --------- | ------ | ------------------------------------- |
| id        | string | The unique identifier of the product. |

**Request Payload:**

| Parameter     | Type    | Description                                |
| ------------- | ------- | ------------------------------------------ |
| catalogNumber | string  | The updated catalog number of the product. |
| title         | string  | The updated title of the product.          |
| displayArtist | string  | The updated display artist.                |
| type          | string  | The updated product type.                  |
| format        | string  | The updated format.                        |
| version       | string  | The updated version.                       |
| releaseDate   | string  | The updated release date.                  |
| takedownDate  | string  | The updated takedown date.                 |
| status        | string  | The updated status.                        |
| distribution  | string  | The updated distribution.                  |
| label         | string  | The updated label.                         |
| externalId    | string  | The updated external ID.                   |
| explicit      | boolean | Whether the content is explicit.           |
| mainGenre     | array   | Updated main genres.                       |
| subGenre      | array   | Updated sub genres.                        |
| contributors  | array   | Contributors information                   |
| metadata      | object  | Updated metadata.                          |
| artists       | array   | Updated artists.                           |
| assets        | array   | Updated assets.                            |
| media         | array   | Updated media.                             |
| upc           | string  | The updated UPC.                           |
| split         | array   | Updated split information.                 |
| file          | string  | for uploading media file                   |

## Code Examples

<CodeGroup>
  ```javascript Node.js theme={null}
  const response = await fetch('https://api.royalti.io/product/example-id', {
    method: 'PUT',
    headers: {
      'Authorization': `Bearer ${token}`,
      'Content-Type': 'application/json'
    },
    body: JSON.stringify({})
  });

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

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

  response = requests.put(
    'https://api.royalti.io/product/example-id',
    headers={
      'Authorization': f'Bearer {token}'
    },
    json={}
  )

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

  ```bash cURL theme={null}
  curl -X PUT https://api.royalti.io/product/example-id \
    -H "Authorization: Bearer YOUR_TOKEN" \
    -H "Content-Type: application/json" \
    -d '{}'

  ```
</CodeGroup>


## OpenAPI

````yaml put /product/{id}
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/{id}:
    put:
      tags:
        - Product
      summary: Update Product
      description: >-
        **/product/{id}**


        **Description:**

        The `/product/{id}` endpoint allows updating the details of a specific
        product identified by its unique ID.


        **Method:**

        `PUT`


        **Path Parameter:**


        | Parameter | Type | Description |

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

        | id | string | The unique identifier of the product. |


        **Request Payload:**


        | Parameter | Type | Description |

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

        | catalogNumber | string | The updated catalog number of the product. |

        | title | string | The updated title of the product. |

        | displayArtist | string | The updated display artist. |

        | type | string | The updated product type. |

        | format | string | The updated format. |

        | version | string | The updated version. |

        | releaseDate | string | The updated release date. |

        | takedownDate | string | The updated takedown date. |

        | status | string | The updated status. |

        | distribution | string | The updated distribution. |

        | label | string | The updated label. |

        | externalId | string | The updated external ID. |

        | explicit | boolean | Whether the content is explicit. |

        | mainGenre | array | Updated main genres. |

        | subGenre | array | Updated sub genres. |

        | contributors | array | Contributors information |

        | metadata | object | Updated metadata. |

        | artists | array | Updated artists. |

        | assets | array | Updated assets. |

        | media | array | Updated media. |

        | upc | string | The updated UPC. |

        | split | array | Updated split information. |

        | file | string | for uploading media file |
      parameters:
        - name: id
          in: path
          required: true
          description: Product ID
          schema:
            type: string
      requestBody:
        required: true
        content:
          multipart/form-data:
            schema:
              allOf:
                - $ref: '#/components/schemas/CreateProductRequest'
                - type: object
                  properties:
                    file:
                      type: string
                      format: binary
                      description: Uploaded file
                    assets:
                      type: array
                      items:
                        type: object
                    media:
                      type: string
            encoding:
              file:
                contentType: application/octet-stream
              assets:
                contentType: application/json
                explode: false
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/CreateProductRequest'
                - type: object
                  properties:
                    file:
                      type: string
                      format: binary
                      description: Uploaded file
                    assets:
                      type: array
                      items:
                        type: object
                    media:
                      type: string
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                  product:
                    type: object
              example:
                message: Product updated successfully
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - bearerAuth: []
components:
  schemas:
    CreateProductRequest:
      type: object
      required:
        - title
      properties:
        title:
          type: string
          description: Product title
          minLength: 1
          maxLength: 255
          example: Summer Vibes
        id:
          type: string
          description: Custom product identifier
          maxLength: 100
          example: PROD-001
        upc:
          type: string
          description: Universal Product Code (auto-generated if not provided)
          pattern: ^[0-9]{12}$
          example: '123456789012'
        catalogNumber:
          type: string
          description: Catalog number for the product
          maxLength: 100
          example: CAT-2024-001
        catalog:
          type: string
          description: '**DEPRECATED** Use catalogNumber instead'
          deprecated: true
          maxLength: 100
        externalId:
          type: string
          description: External system identifier
          maxLength: 100
          example: EXT-12345
        displayArtist:
          type: string
          description: Display name for the artist(s)
          maxLength: 255
          example: John Doe feat. Jane Smith
        type:
          type: string
          enum:
            - Audio
            - Video
            - Ringtone
          default: Audio
          description: Product type
          example: Audio
        version:
          type: string
          description: Product version or variant
          maxLength: 100
          example: Deluxe Edition
        explicit:
          type: string
          enum:
            - explicit
            - clean
          description: Whether the product contains explicit content
          example: clean
        releaseDate:
          type: string
          format: date
          description: Product release date
          example: '2024-06-15'
        takedownDate:
          type: string
          format: date
          description: Date when product should be taken down
          example: '2024-12-31'
        mainGenre:
          type: string
          description: Primary genre
          maxLength: 100
          example: Pop
        subGenre:
          type: string
          description: Secondary genre
          maxLength: 100
          example: Dance Pop
        status:
          type: string
          enum:
            - Live
            - Taken Down
            - Scheduled
            - Pending
            - Error
          description: Product status
          default: Pending
        distribution:
          type: object
          description: Distribution settings and preferences
          additionalProperties: true
        contributors:
          type: array
          description: List of contributors and their roles
          items:
            type: object
            properties:
              name:
                type: string
                maxLength: 255
              role:
                type: string
                maxLength: 100
              share:
                type: number
                minimum: 0
                maximum: 100
            required:
              - name
              - role
        metadata:
          type: object
          description: Additional product metadata
          additionalProperties: true
        chartHistory:
          type: array
          items:
            type: object
            properties:
              chart:
                type: string
                description: Chart name (e.g., Billboard Hot 100)
              position:
                type: integer
                description: Chart position
              date:
                type: string
                format: date
                description: Date of chart position
          description: Historical chart positions for the product
          example:
            - chart: Billboard Hot 100
              position: 10
              date: '2024-01-15'
        totalTracks:
          type: integer
          minimum: 1
          description: Total number of tracks on the product
          example: 12
        totalDiscs:
          type: integer
          minimum: 1
          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 (e.g., Deluxe, Remastered, Anniversary)
          example: Deluxe Edition
        reissue:
          type: boolean
          description: Whether this product is a reissue of a previous release
          default: false
          example: false
        originalReleaseDate:
          type: string
          format: date
          description: Original release date (for reissues)
          example: '2020-06-15'
        recordingLocation:
          type: string
          maxLength: 255
          description: Recording studio/location
          example: Abbey Road Studios, London
        masteringLocation:
          type: string
          maxLength: 255
          description: Mastering studio/location
          example: Sterling Sound, New York
        producer:
          type: array
          items:
            type: string
          description: Producer name(s)
          example:
            - Max Martin
            - Shellback
        engineer:
          type: array
          items:
            type: string
          description: Engineer name(s)
          example:
            - John Smith
            - Jane Doe
        sequenceNumber:
          type: integer
          description: Sequence number in a series or discography
          example: 5
        parentReleaseId:
          type: string
          format: uuid
          description: Parent release ID for variants or deluxe editions
          example: 550e8400-e29b-41d4-a716-446655440000
        language:
          type: string
          maxLength: 10
          description: Primary language code (ISO 639-1)
          example: en
        c_line_year:
          type: integer
          minimum: 1900
          maximum: 2100
          description: Copyright line year (©)
          example: 2024
        p_line_year:
          type: integer
          minimum: 1900
          maximum: 2100
          description: Phonogram line year (℗)
          example: 2024
        artists:
          type: array
          description: Associated artists with their roles
          items:
            oneOf:
              - type: string
                description: Artist ID (defaults to primary)
              - type: object
                properties:
                  id:
                    type: string
                    description: Artist identifier
                  type:
                    type: string
                    enum:
                      - primary
                      - featuring
                    default: primary
                    description: Artist role type
                required:
                  - id
          example:
            - id: artist-123
              type: primary
            - id: artist-456
              type: featuring
        assets:
          type: array
          description: Associated media assets (tracks, videos)
          items:
            oneOf:
              - type: string
                description: JSON string representation of asset
              - type: object
                properties:
                  asset:
                    type: string
                    description: Asset identifier
                  number:
                    type: integer
                    minimum: 1
                    description: Track/asset number
                required:
                  - asset
          example:
            - asset: asset-789
              number: 1
            - asset: asset-790
              number: 2
    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}"

````