curl --request POST \
--url https://api.royalti.io/revenue/bulk \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"revenues": [
{
"title": "<string>",
"amount": 123,
"currency": "<string>",
"source": "<string>",
"transactionDate": "2023-11-07T05:31:56Z",
"artist": "<string>",
"asset": "<string>",
"product": "<string>",
"splits": [
{}
],
"metadata": {},
"memo": "<string>"
}
]
}
'{
"message": "Bulk revenue creation completed",
"createdRevenues": [
"Revenue One",
"Revenue Two"
],
"processedCount": 3,
"totalAmount": 7500.25,
"errors": [
"Invalid currency for Revenue Three"
]
}Create Bulk Revenues
curl --request POST \
--url https://api.royalti.io/revenue/bulk \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"revenues": [
{
"title": "<string>",
"amount": 123,
"currency": "<string>",
"source": "<string>",
"transactionDate": "2023-11-07T05:31:56Z",
"artist": "<string>",
"asset": "<string>",
"product": "<string>",
"splits": [
{}
],
"metadata": {},
"memo": "<string>"
}
]
}
'{
"message": "Bulk revenue creation completed",
"createdRevenues": [
"Revenue One",
"Revenue Two"
],
"processedCount": 3,
"totalAmount": 7500.25,
"errors": [
"Invalid currency for Revenue Three"
]
}/revenue/bulk endpoint allows creation of multiple revenue records simultaneously.
Method:POST
Request Payload:
| Parameter | Type | Description |
|---|---|---|
| revenues | array | Array of revenue objects |
const response = await fetch('https://api.royalti.io/revenue/bulk', {
method: 'POST',
headers: {
'Authorization': `Bearer ${token}`,
'Content-Type': 'application/json'
},
body: JSON.stringify({
"revenues": [
{
"title": "sample-title",
"amount": 1,
"currency": "sample-currency",
"source": "sample-source",
"transactionDate": "2024-01-21T12:00:00Z",
"artist": "sample-artist",
"asset": "sample-asset",
"product": "sample-product",
"splits": [
{}
],
"metadata": {},
"memo": "sample-memo"
}
]
})
});
const data = await response.json();
console.log(data);
JWT Authorization header using the Bearer scheme. Format: "Bearer {token}"
Show child attributes