curl --request POST \
--url https://api.royalti.io/split/match \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"territory": "NG",
"dsp": "spotify",
"date": "2023-06-01"
}
'{
"count": 1,
"splits": [
{
"id": "550e8400-e29b-41d4-a716-446655440000",
"name": "Nigerian Split",
"type": "Publishing",
"startDate": "2023-01-01T00:00:00.000Z",
"endDate": "2023-12-31T23:59:59.999Z",
"conditions": [
{
"mode": "include",
"territories": [
"NG",
"GH",
"KE"
],
"dsps": [
"spotify",
"apple"
]
}
],
"SplitShares": [
{
"TenantUserId": "550e8400-e29b-41d4-a716-446655440001",
"Share": 60,
"TenantUser": {
"firstName": "John",
"lastName": "Doe",
"ipi": null
}
}
]
}
]
}/split/match
curl --request POST \
--url https://api.royalti.io/split/match \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"territory": "NG",
"dsp": "spotify",
"date": "2023-06-01"
}
'{
"count": 1,
"splits": [
{
"id": "550e8400-e29b-41d4-a716-446655440000",
"name": "Nigerian Split",
"type": "Publishing",
"startDate": "2023-01-01T00:00:00.000Z",
"endDate": "2023-12-31T23:59:59.999Z",
"conditions": [
{
"mode": "include",
"territories": [
"NG",
"GH",
"KE"
],
"dsps": [
"spotify",
"apple"
]
}
],
"SplitShares": [
{
"TenantUserId": "550e8400-e29b-41d4-a716-446655440001",
"Share": 60,
"TenantUser": {
"firstName": "John",
"lastName": "Doe",
"ipi": null
}
}
]
}
]
}/split/match endpoint finds splits that match the specified criteria. It allows filtering splits by territory, DSP, usage type, and date.
Method:POST
Request Body:
The request body should be a JSON object with any of the following properties. At least one property must be provided.
| Parameter | Type | Required | Description |
|---|---|---|---|
| territory | string | No | ISO 3166-1 alpha-2 country code (e.g., ‘US’, ‘NG’) |
| dsp | string | No | Digital Service Provider identifier |
| usageType | string | No | Type of usage |
| date | string | No | Date in ISO 8601 format (e.g., ‘2023-01-15’) |
| [customDimension] | string | No | Any custom dimension key-value pair |
const response = await fetch('https://api.royalti.io/split/match', {
method: 'POST',
headers: {
'Authorization': `Bearer ${token}`,
'Content-Type': 'application/json'
},
body: JSON.stringify({
"territory": "NG",
"dsp": "spotify",
"usageType": "stream",
"date": "2023-06-01"
})
});
const data = await response.json();
console.log(data);
JWT Authorization header using the Bearer scheme. Format: "Bearer {token}"