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

> **Get Revenues**

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

## Description

**Get Revenues**

**Description:**\
The `/revenue/` endpoint retrieves a list of revenue records with filtering, pagination, and inclusion options.

**Method:**\
`GET`

**Query Parameters:**

| Parameter             | Type    | Description                                         |
| --------------------- | ------- | --------------------------------------------------- |
| q *(Optional)*        | string  | Search query to filter revenues                     |
| page *(Optional)*     | integer | Page number for pagination. Default: 1              |
| size *(Optional)*     | integer | Number of revenues per page. Default: 10            |
| sort *(Optional)*     | string  | Field to sort by. Default: 'transactionDate'        |
| order *(Optional)*    | string  | Sort order ('asc' or 'desc'). Default: 'desc'       |
| source *(Optional)*   | string  | Filter by revenue source                            |
| artist *(Optional)*   | string  | Filter by artist ID                                 |
| asset *(Optional)*    | string  | Filter by asset ID                                  |
| product *(Optional)*  | string  | Filter by product ID                                |
| currency *(Optional)* | string  | Filter by currency                                  |
| dateFrom *(Optional)* | string  | Filter revenues from this date                      |
| dateTo *(Optional)*   | string  | Filter revenues to this date                        |
| include *(Optional)*  | string  | Additional data to include (Artist, Asset, Product) |

## Code Examples

<CodeGroup>
  ```javascript Node.js theme={null}
  const response = await fetch('https://api.royalti.io/revenue/', {
    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/revenue/',
    headers={
      'Authorization': f'Bearer {token}'
    },
  )

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

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

  ```
</CodeGroup>


## OpenAPI

````yaml get /revenue/
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:
  /revenue/:
    get:
      tags:
        - Revenue
      summary: Get Revenues
      description: >-
        **Get Revenues**


        **Description:**  

        The `/revenue/` endpoint retrieves a list of revenue records with
        filtering, pagination, and inclusion options.


        **Method:**  

        `GET`


        **Query Parameters:**


        | Parameter | Type | Description |

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

        | q _(Optional)_ | string | Search query to filter revenues |

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

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

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

        | order _(Optional)_ | string | Sort order ('asc' or 'desc'). Default:
        'desc' |

        | source _(Optional)_ | string | Filter by revenue source |

        | artist _(Optional)_ | string | Filter by artist ID |

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

        | product _(Optional)_ | string | Filter by product ID |

        | currency _(Optional)_ | string | Filter by currency |

        | dateFrom _(Optional)_ | string | Filter revenues from this date |

        | dateTo _(Optional)_ | string | Filter revenues to this date |

        | include _(Optional)_ | string | Additional data to include (Artist,
        Asset, Product) |
      parameters:
        - name: q
          in: query
          required: false
          description: Search query to filter revenues
          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 revenues per page
          schema:
            type: integer
            default: 10
        - name: sort
          in: query
          required: false
          description: Field to sort by
          schema:
            type: string
            default: transactionDate
        - name: order
          in: query
          required: false
          description: Sort order ('asc' or 'desc')
          schema:
            type: string
            enum:
              - asc
              - desc
            default: desc
        - name: source
          in: query
          required: false
          description: Filter by revenue source
          schema:
            type: string
            enum:
              - streaming
              - sales
              - licensing
              - sync
              - merchandise
              - live_performance
              - other
        - name: artist
          in: query
          required: false
          description: Filter by artist ID
          schema:
            type: string
        - name: asset
          in: query
          required: false
          description: Filter by asset ID
          schema:
            type: string
        - name: product
          in: query
          required: false
          description: Filter by product ID
          schema:
            type: string
        - name: currency
          in: query
          required: false
          description: Filter by currency
          schema:
            type: string
        - name: dateFrom
          in: query
          required: false
          description: Filter revenues from this date
          schema:
            type: string
            format: date
        - name: dateTo
          in: query
          required: false
          description: Filter revenues to this date
          schema:
            type: string
            format: date
        - name: include
          in: query
          required: false
          description: Additional data to include (Artist, Asset, Product)
          schema:
            type: string
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                  revenues:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                        title:
                          type: string
                        amount:
                          type: number
                        currency:
                          type: string
                        source:
                          type: string
                        transactionDate:
                          type: string
                          format: date-time
                        artist:
                          type: object
                        asset:
                          type: object
                        product:
                          type: object
                        splits:
                          type: array
                          items:
                            type: object
                        createdAt:
                          type: string
                          format: date-time
                        updatedAt:
                          type: string
                          format: date-time
                  total:
                    type: integer
                  page:
                    type: integer
                  size:
                    type: integer
                  totalPages:
                    type: integer
                  summary:
                    type: object
                    properties:
                      totalAmount:
                        type: number
                      totalCount:
                        type: integer
                      byCurrency:
                        type: object
                      bySource:
                        type: object
              example:
                message: Revenues retrieved successfully
                revenues:
                  - id: revenue-uuid-123
                    title: Streaming Revenue - January 2024
                    amount: 2500.5
                    currency: USD
                    source: streaming
                    transactionDate: '2024-01-15T10:30:00Z'
                    createdAt: '2024-01-15T10:30:00Z'
                    updatedAt: '2024-01-15T10:30:00Z'
                total: 150
                page: 1
                size: 10
                totalPages: 15
                summary:
                  totalAmount: 125000.75
                  totalCount: 150
                  byCurrency:
                    USD: 100000.5
                    EUR: 25000.25
                  bySource:
                    streaming: 80000.3
                    sales: 30000.25
                    licensing: 15000.2
        '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}"

````