This endpoint requires authentication. Include your Bearer token in the Authorization header.
Code Examples
Authorizations
JWT Authorization header using the Bearer scheme. Format: "Bearer {token}"
Path Parameters
Expense ID
Body
application/json
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"
}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"
}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);
JWT Authorization header using the Bearer scheme. Format: "Bearer {token}"
Expense ID