Skip to main content
GET
/
royalty
/
period-matrix
Get a sale-month x accounting-month royalty matrix
curl --request GET \
  --url https://api.royalti.io/royalty/period-matrix \
  --header 'Authorization: Bearer <token>'
import requests

url = "https://api.royalti.io/royalty/period-matrix"

headers = {"Authorization": "Bearer <token>"}

response = requests.get(url, headers=headers)

print(response.text)
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};

fetch('https://api.royalti.io/royalty/period-matrix', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
<?php

$curl = curl_init();

curl_setopt_array($curl, [
CURLOPT_URL => "https://api.royalti.io/royalty/period-matrix",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
package main

import (
"fmt"
"net/http"
"io"
)

func main() {

url := "https://api.royalti.io/royalty/period-matrix"

req, _ := http.NewRequest("GET", url, nil)

req.Header.Add("Authorization", "Bearer <token>")

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.get("https://api.royalti.io/royalty/period-matrix")
.header("Authorization", "Bearer <token>")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.royalti.io/royalty/period-matrix")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'

response = http.request(request)
puts response.read_body
{
  "granularity": "month",
  "autoRolledUp": false,
  "periodFilterType": "accounting",
  "truncated": false,
  "results": [
    {
      "AccountingMonth": "2026-05-01",
      "SaleMonth": "2026-04-01",
      "Royalty": 856.2,
      "Count": 82000
    },
    {
      "AccountingMonth": "2026-05-01",
      "SaleMonth": "2026-05-01",
      "Royalty": 2400.55,
      "Count": 243000
    }
  ]
}
{
"status": "error",
"message": "Unauthorized"
}
{
"success": false,
"error": {
"code": "<string>",
"message": "<string>",
"details": [
"<string>"
]
}
}
This endpoint requires authentication. Include your Bearer token in the Authorization header.

Description

Get a sale-month x accounting-month royalty matrix Returns royalty and count bucketed by both sale month and accounting month simultaneously, useful for visualizing reporting lag between when a sale happened and when it was accounted for. Capped at 1000 rows (truncated: true when the cap is hit). Authorization:
  • Required role: user or higher; the royaltyAccess subscription feature is required
  • No additional admin-only gate. Per-member (user = single UUID) requests are scoped to that member’s splits and Count is always 0

Code Examples

const response = await fetch('https://api.royalti.io/royalty/period-matrix', {
  method: 'GET',
  headers: {
    'Authorization': `Bearer ${token}`,
  },
});

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

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

data = response.json()
print(data)
curl -X GET https://api.royalti.io/royalty/period-matrix \
  -H "Authorization: Bearer YOUR_TOKEN" \

Authorizations

Authorization
string
header
required

JWT Authorization header using the Bearer scheme. Format: "Bearer {token}"

Query Parameters

granularity
enum<string>
default:month

Time bucket size. The server auto-switches to quarter (and sets autoRolledUp: true in the response) when the requested window exceeds 24 months, regardless of what is requested here

Available options:
month,
quarter
artists
string

Filters the data by artist. Comma-separated list of artist IDs

user
string<uuid>

Filters the data by user. Specifies a user ID. A single UUID switches the response into per-member (splits-attributed) mode

country
string

Filter the data by country. Comma-separated values

dsp
string

Filters by DSP (Digital Service Provider). Comma-separated values

start
string<date>

Start date of the period (YYYY-MM-DD format). Also used to decide whether to auto-roll up to quarterly granularity

end
string<date>

End date of the period (YYYY-MM-DD format)

type
string

Filters by sale type. Comma-separated values

aggregator
string

Filters by aggregator. Comma-separated values

table_name
string

Filters by data source table name. Comma-separated values for multiple tables

upc
string

Filters by UPC (Universal Product Code). Comma-separated values

isrc
string

Filters by ISRC (International Standard Recording Code). Comma-separated values

periodFilterType
enum<string>
default:accounting

Selects which axis the row-set is scoped by. Both AccountingMonth and SaleMonth are always returned on every row regardless. Defaults to accounting

Available options:
accounting,
sale

Response

Successfully retrieved the period matrix

granularity
enum<string>
Available options:
month,
quarter
autoRolledUp
boolean
periodFilterType
enum<string>
Available options:
sale,
accounting
truncated
boolean

True when the result set hit the 1000-row cap

results
object[]