Skip to main content
PUT
/
expense
/
{id}
Update Expense
curl --request PUT \
  --url https://server26-dot-royalti-project.uc.r.appspot.com/expense/{id} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "artist": "<string>",
  "product": "<string>",
  "asset": "<string>",
  "title": "<string>",
  "type": "product",
  "amount": 123,
  "amountUSD": 123,
  "currency": "<string>",
  "conversionRate": 123,
  "transactionDate": "2023-12-25",
  "split": [
    {}
  ],
  "memo": "<string>",
  "files": {}
}'
{
  "message": "Expense 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/expense/example-id', {
  method: 'PUT',
  headers: {
    'Authorization': `Bearer ${token}`,
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    "artist": "sample-artist",
    "product": "sample-product",
    "asset": "sample-asset",
    "title": "sample-title",
    "type": "sample-type",
    "amount": 1,
    "amountUSD": 1,
    "currency": "sample-currency",
    "conversionRate": 1,
    "transactionDate": "2024-01-21",
    "split": [
      {}
    ],
    "memo": "sample-memo",
    "files": {}
  })
});

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

Expense ID

Body

application/json
artist
string
product
string
asset
string
title
string
type
enum<string>
Available options:
product,
artist,
asset,
general,
marketing,
production,
legal,
administrative
amount
number
amountUSD
number
currency
string
conversionRate
number
transactionDate
string<date>
split
object[]
memo
string
files
object

Response

Success

message
string
expense
object