curl --request PUT \
--url https://api.royalti.io/artist/{id}/splits/{type} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"splits": [
{
"TenantUserId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"share": 50
}
]
}
'{
"message": "Splits updated successfully",
"result": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"artistId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"type": "master",
"splits": [
{
"recipientId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"recipientType": "user",
"percentage": 50,
"role": "<string>"
}
],
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}
]
}artist//splits/
curl --request PUT \
--url https://api.royalti.io/artist/{id}/splits/{type} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"splits": [
{
"TenantUserId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"share": 50
}
]
}
'{
"message": "Splits updated successfully",
"result": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"artistId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"type": "master",
"splits": [
{
"recipientId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"recipientType": "user",
"percentage": 50,
"role": "<string>"
}
],
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}
]
}PUT
Path Parameters:
| Parameter | Type | Description |
|---|---|---|
| id | string | The unique identifier of the artist. |
| type | string | The type of splits to update (e.g., ‘default’, ‘mechanical’, etc.) |
{
"splits": [
{
"TenantUserId": "550e8400-e29b-41d4-a716-446655440000",
"share": 60.0
},
{
"TenantUserId": "550e8400-e29b-41d4-a716-446655440001",
"share": 40.0
}
]
}
const response = await fetch('https://api.royalti.io/artist/example-id/splits/example-id', {
method: 'PUT',
headers: {
'Authorization': `Bearer ${token}`,
'Content-Type': 'application/json'
},
body: JSON.stringify({
"splits": [
{
"TenantUserId": "sample-TenantUserId",
"share": 1
}
]
})
});
const data = await response.json();
console.log(data);
JWT Authorization header using the Bearer scheme. Format: "Bearer {token}"
1Show child attributes