Skip to main content
PUT
/
revenue
/
{id}
Update Revenue
curl --request PUT \
  --url https://server26-dot-royalti-project.uc.r.appspot.com/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"
}
This endpoint requires authentication. Include your Bearer token in the Authorization header.

Code Examples

const response = await fetch('https://server26-dot-royalti-project.uc.r.appspot.com/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);

Authorizations

Authorization
string
header
required

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

Path Parameters

id
string
required

Revenue ID

Body

application/json
title
string
amount
number
currency
string
source
enum<string>
Available options:
streaming,
sales,
licensing,
sync,
merchandise,
live_performance,
other
transactionDate
string<date-time>
splits
object[]
metadata
object
memo
string

Response

Success

message
string
revenue
object