curl --request GET \
--url https://api.example.com/api/categories{
"data": [
{
"id": "<string>",
"userId": "<string>",
"name": "<string>",
"type": "<string>",
"isFixed": true,
"color": "<string>",
"icon": "<string>",
"parentId": "<string>",
"createdAt": "<string>",
"updatedAt": "<string>",
"deletedAt": "<string>"
}
],
"meta": {
"total": 123,
"page": 123,
"limit": 123,
"totalPages": 123
}
}Retrieve all categories for the authenticated user with optional filtering and pagination
curl --request GET \
--url https://api.example.com/api/categories{
"data": [
{
"id": "<string>",
"userId": "<string>",
"name": "<string>",
"type": "<string>",
"isFixed": true,
"color": "<string>",
"icon": "<string>",
"parentId": "<string>",
"createdAt": "<string>",
"updatedAt": "<string>",
"deletedAt": "<string>"
}
],
"meta": {
"total": 123,
"page": 123,
"limit": 123,
"totalPages": 123
}
}GET /api/categories
parentId indicating hierarchical relationships.
Authorization: Bearer <token> header.
INCOME - Only income categoriesEXPENSE - Only expense categoriesBOTH - Only categories marked as bothboth (lowercase) - Returns all categories regardless of typeINCOME, EXPENSE, or BOTH)parentId field to reconstruct the hierarchy on the client:
parentId: nullparentId set to their parent’s UUIDGET /api/categories?type=EXPENSE&page=1&limit=10
{
"data": [
{
"id": "cat-parent-uuid",
"userId": "user-uuid",
"name": "Entertainment",
"type": "EXPENSE",
"isFixed": false,
"color": "#E74C3C",
"icon": "film",
"parentId": null,
"createdAt": "2026-01-15T08:00:00.000Z",
"updatedAt": "2026-01-15T08:00:00.000Z",
"deletedAt": null
},
{
"id": "cat-child-uuid",
"userId": "user-uuid",
"name": "Streaming Services",
"type": "EXPENSE",
"isFixed": true,
"color": "#9B59B6",
"icon": "tv",
"parentId": "cat-parent-uuid",
"createdAt": "2026-01-15T08:05:00.000Z",
"updatedAt": "2026-01-15T08:05:00.000Z",
"deletedAt": null
}
],
"meta": {
"total": 2,
"page": 1,
"limit": 10,
"totalPages": 1
}
}
GET /api/categories?type=EXPENSE
GET /api/categories?type=both
GET /api/categories?type=INCOME&page=2&limit=20