GET
/
expense
/
Get Expenses
curl --request GET \
  --url https://server26-dot-royalti-project.uc.r.appspot.com/expense/ \
  --header 'Authorization: Bearer <token>'
{
  "message": "Expenses retrieved successfully",
  "expenses": [
    {
      "id": "expense-uuid-123",
      "title": "Mavins sabi girl",
      "type": "product",
      "amount": 100,
      "amountUSD": 100,
      "currency": "USD",
      "transactionDate": "2023-03-14",
      "createdAt": "2023-03-14T10:30:00.000Z",
      "updatedAt": "2023-03-14T10:30:00.000Z"
    }
  ],
  "total": 100,
  "page": 1,
  "size": 10,
  "totalPages": 10,
  "summary": {
    "totalAmount": 25000.5,
    "totalAmountUSD": 25000.5,
    "totalCount": 100,
    "byCurrency": {
      "USD": 20000.3,
      "EUR": 5000.2
    },
    "byType": {
      "product": 15000.25,
      "artist": 7000.15,
      "marketing": 3000.1
    }
  }
}

Authorizations

Authorization
string
header
required

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

Query Parameters

include
string

Comma-separated related entities to include (Artist, Product, Asset)

q
string

Search term to filter expenses by title or type

page
integer
default:1

Page number for pagination (1-based)

size
integer
default:10

Number of items per page

sort
string

Field to sort by

order
enum<string>
default:desc

Sort order ('asc' or 'desc')

Available options:
asc,
desc

Response

200
application/json

Success

The response is of type object.