curl --request GET \
--url https://api.royalti.io/expense/{id} \
--header 'Authorization: Bearer <token>'{
"totalItems": "3,",
"Expenses": [
{
"id": "e980dd73-e902-4eda-9754-f8add109f712",
"expenseableId": "499d9b7d-1a37-4cf5-ba1f-0301b492d521",
"expenseableType": "asset",
"title": "Expense Oct",
"type": null,
"transactionDate": "2024-10-17",
"currency": "USD",
"amount": 10,
"amountUSD": 10,
"conversionRate": 1,
"memo": "Memo",
"files": [
"https://storage.googleapis.com/royalti-uploads/Royalti Demo/202410/Expense/undefined/Leonardo_Phoenix_Create_a_serene_and_organized_workspace_with_0 (1).jpg"
],
"createdAt": "2024-10-17T11:00:40.130Z",
"updatedAt": "2024-10-17T11:00:40.130Z",
"Artist": null
}
],
"totalPages": 1,
"currentPage": 1,
"filteredItems": 3
}Get Expense
curl --request GET \
--url https://api.royalti.io/expense/{id} \
--header 'Authorization: Bearer <token>'{
"totalItems": "3,",
"Expenses": [
{
"id": "e980dd73-e902-4eda-9754-f8add109f712",
"expenseableId": "499d9b7d-1a37-4cf5-ba1f-0301b492d521",
"expenseableType": "asset",
"title": "Expense Oct",
"type": null,
"transactionDate": "2024-10-17",
"currency": "USD",
"amount": 10,
"amountUSD": 10,
"conversionRate": 1,
"memo": "Memo",
"files": [
"https://storage.googleapis.com/royalti-uploads/Royalti Demo/202410/Expense/undefined/Leonardo_Phoenix_Create_a_serene_and_organized_workspace_with_0 (1).jpg"
],
"createdAt": "2024-10-17T11:00:40.130Z",
"updatedAt": "2024-10-17T11:00:40.130Z",
"Artist": null
}
],
"totalPages": 1,
"currentPage": 1,
"filteredItems": 3
}/expense/{id} endpoint retrieves detailed information about a specific expense record.
Method:GET
Path Parameter:
| Parameter | Type | Description |
|---|---|---|
| id | string | The unique identifier of the expense record |
const response = await fetch('https://api.royalti.io/expense/example-id', {
method: 'GET',
headers: {
'Authorization': `Bearer ${token}`,
},
});
const data = await response.json();
console.log(data);
JWT Authorization header using the Bearer scheme. Format: "Bearer {token}"
Expense ID