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

# Get Products

> **/product/**

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

## Description

**/product/**

**Description:**
The `/product/` endpoint retrieves a list of products based on specified criteria. Users can filter the results using query parameters such as search query, pagination, sorting options, and product type.

**Method:**
`GET`

**Query Parameters:**

| Parameter               | Type    | Description                                                    |
| ----------------------- | ------- | -------------------------------------------------------------- |
| q *(Optional)*          | string  | Search query to filter products.                               |
| artist *(Optional)*     | string  | Filter by artist ID(s). Comma-separated for multiple.          |
| type *(Optional)*       | string  | Filter by product type.                                        |
| statistics *(Optional)* | boolean | Whether to include statistical data. Default: false            |
| splits *(Optional)*     | boolean | Whether to include splits information. Default: false          |
| role *(Optional)*       | string  | Filter by role.                                                |
| user *(Optional)*       | string  | Filter by user ID.                                             |
| page *(Optional)*       | integer | Page number for pagination. Default: 1                         |
| size *(Optional)*       | integer | Number of products per page. Default: 10                       |
| attributes *(Optional)* | string  | Comma-separated list of attributes to include in the response. |
| asset *(Optional)*      | string  | Filter by asset ID.                                            |
| sort *(Optional)*       | string  | Field to sort by. Default: 'updatedAt'                         |
| order *(Optional)*      | string  | Sort order ('asc' or 'desc'). Default: 'desc'                  |

## Code Examples

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

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

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

  response = requests.get(
    'https://api.royalti.io/product/',
    headers={
      'Authorization': f'Bearer {token}'
    },
  )

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

  ```bash cURL theme={null}
  curl -X GET https://api.royalti.io/product/ \
    -H "Authorization: Bearer YOUR_TOKEN" \

  ```
</CodeGroup>


## OpenAPI

````yaml get /product/
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/:
    get:
      tags:
        - Product
      summary: Get Products
      description: >-
        **/product/**


        **Description:**

        The `/product/` endpoint retrieves a list of products based on specified
        criteria. Users can filter the results using query parameters such as
        search query, pagination, sorting options, and product type.


        **Method:**

        `GET`


        **Query Parameters:**


        | Parameter | Type | Description |

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

        | q _(Optional)_ | string | Search query to filter products. |

        | artist _(Optional)_ | string | Filter by artist ID(s). Comma-separated
        for multiple. |

        | type _(Optional)_ | string | Filter by product type. |

        | statistics _(Optional)_ | boolean | Whether to include statistical
        data. Default: false |

        | splits _(Optional)_ | boolean | Whether to include splits information.
        Default: false |

        | role _(Optional)_ | string | Filter by role. |

        | user _(Optional)_ | string | Filter by user ID. |

        | page _(Optional)_ | integer | Page number for pagination. Default: 1 |

        | size _(Optional)_ | integer | Number of products per page. Default: 10
        |

        | attributes _(Optional)_ | string | Comma-separated list of attributes
        to include in the response. |

        | asset _(Optional)_ | string | Filter by asset ID. |

        | sort _(Optional)_ | string | Field to sort by. Default: 'updatedAt' |

        | order _(Optional)_ | string | Sort order ('asc' or 'desc'). Default:
        'desc' |
      parameters:
        - name: q
          in: query
          required: false
          description: Search query to filter products
          schema:
            type: string
        - name: page
          in: query
          required: false
          description: Page number for pagination
          schema:
            type: integer
            default: 1
        - name: size
          in: query
          required: false
          description: Number of products per page
          schema:
            type: integer
            default: 10
        - name: sort
          in: query
          required: false
          description: >
            Field to sort by. Standard fields include any product attribute
            (e.g., title, upc, releaseDate, updatedAt).


            When `statistics=true`, additional sortable fields become available:

            - `splits` - Number of splits associated with the product

            - `assets` - Number of assets (tracks) associated with the product

            - `count` - Total stream/sales count from royalty data

            - `royalty` - Total royalty earnings
          schema:
            type: string
            default: updatedAt
            enum:
              - updatedAt
              - createdAt
              - title
              - upc
              - releaseDate
              - catalogNumber
              - displayArtist
              - splits
              - assets
              - count
              - royalty
        - name: order
          in: query
          required: false
          description: Sort order ('asc' or 'desc')
          schema:
            type: string
            enum:
              - asc
              - desc
            default: desc
        - name: artist
          in: query
          required: false
          description: Filter by artist ID(s). Comma-separated for multiple
          schema:
            type: string
        - name: type
          in: query
          required: false
          description: Filter by product type
          schema:
            type: string
        - name: splits
          in: query
          required: false
          description: Whether to include splits information
          schema:
            type: boolean
            default: false
        - name: statistics
          in: query
          required: false
          description: Whether to include statistical data
          schema:
            type: boolean
            default: false
        - name: asset
          in: query
          required: false
          description: Filter by asset ID
          schema:
            type: string
        - name: attributes
          in: query
          required: false
          description: Comma-separated list of attributes to include in the response
          schema:
            type: string
        - name: role
          in: query
          required: false
          description: Filter by role
          schema:
            type: string
        - name: user
          in: query
          required: false
          description: Filter by user ID
          schema:
            type: string
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                  products:
                    type: array
                    items:
                      type: object
                  totalPages:
                    type: integer
                  currentPage:
                    type: integer
                  pageSize:
                    type: integer
              example:
                message: Products retrieved successfully
                products:
                  - id: 437307ed-b268-4ee0-867d-f67816a77ffa
                    title: Mavins sabi girl
                    upc: TEMP437307ed-b26
                    displayArtist: arya star
                    createdAt: '2025-06-24T10:17:43.818Z'
                    updatedAt: '2025-06-24T10:17:43.818Z'
                    type: Audio
                    label: null
                    releaseDate: '2022-02-01T00:00:00.000Z'
                    format: Single
                    version: null
                    takedownDate: '2026-02-01T00:00:00.000Z'
                    status: Live
                    distribution: Example Distribution
                    mainGenre:
                      - Pop
                    subGenre:
                      - Electronic
                    explicit: null
                    Artists:
                      - id: cfbb1259-c087-4118-8e11-f6e72bd60f89
                        artistName: ''
                        type: primary
                      - id: c475576c-4e3f-45d4-846b-b84205b2fac0
                        artistName: NameArt
                        type: primary
                    ProductAssets:
                      - AssetId: 007c9895-14a3-40e3-86c3-56d59787649f
                      - AssetId: a3c06e35-1765-4a2e-8f98-afd61949ff2c
                totalPages: 50
                currentPage: 1
                filteredItems: 10
        '401':
          description: Unauthorized
          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:
    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}"

````