curl --request PUT \
--url https://api.royalti.io/revenue/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"title": "<string>",
"amount": 123,
"currency": "<string>",
"source": "streaming",
"transactionDate": "2023-11-07T05:31:56Z",
"splits": [
{}
],
"metadata": {},
"memo": "<string>"
}
'{
"message": "Revenue updated successfully"
}Update Revenue
curl --request PUT \
--url https://api.royalti.io/revenue/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"title": "<string>",
"amount": 123,
"currency": "<string>",
"source": "streaming",
"transactionDate": "2023-11-07T05:31:56Z",
"splits": [
{}
],
"metadata": {},
"memo": "<string>"
}
'{
"message": "Revenue updated successfully"
}/revenue/{id} endpoint allows updating details of a specific revenue record.
Method:PUT
Path Parameter:
| Parameter | Type | Description |
|---|---|---|
| id | string | The unique identifier of the revenue record |
| Parameter | Type | Description |
|---|---|---|
| title | string | Updated title/description |
| amount | number | Updated revenue amount |
| currency | string | Updated currency |
| source | string | Updated revenue source |
| transactionDate | string | Updated transaction date |
| splits | array | Updated split information |
| metadata | object | Updated metadata |
| memo | string | Updated notes |
const response = await fetch('https://api.royalti.io/revenue/example-id', {
method: 'PUT',
headers: {
'Authorization': `Bearer ${token}`,
'Content-Type': 'application/json'
},
body: JSON.stringify({
"title": "sample-title",
"amount": 1,
"currency": "sample-currency",
"source": "sample-source",
"transactionDate": "2024-01-21T12:00:00Z",
"splits": [
{}
],
"metadata": {},
"memo": "sample-memo"
})
});
const data = await response.json();
console.log(data);
JWT Authorization header using the Bearer scheme. Format: "Bearer {token}"
Revenue ID