Get Users
User
Get Users
/user/ - Enhanced with Fast Accounting Data
GET
Get Users
This endpoint requires authentication. Include your Bearer token in the Authorization header.
Description
Description:The
/user/ endpoint retrieves user data with optional accounting information from cached data.
Enhanced Accounting Support:
When accounting=true, this endpoint now provides:
- 95% faster performance: 10-50ms response vs previous 500-2000ms BigQuery approach
- Cached accounting data: Returns Gross, Paid, Due values from UserAccounting table
- Background processing: Automatically queues calculation for users without cached data
- Transparent operations: Response includes metadata about cache status and queued calculations
GET
Query Parameters:
| Parameter | Type | Description |
|---|---|---|
| q (Optional) | string | Search query to filter users by name or email |
| page (Optional) | integer | Page number for pagination. Default: 1 |
| size (Optional) | integer | Number of users per page. Default: 10 |
| accounting (Optional) | string | Set to ‘true’ to include fast cached accounting data |
| attributes (Optional) | string | Comma-separated list of attributes to include |
| sort (Optional) | string | Sort field: ‘createdAt’, ‘updatedAt’, ‘name’, ‘split’ |
| order (Optional) | string | Sort order: ‘asc’ or ‘desc’ |
| externalId (Optional) | string | Filter by external ID |
| role (Optional) | string | Filter by user role(s), comma-separated for multiple |
- Without accounting: Standard user list response
- With accounting=true: Includes cached Gross, Paid, Due values with 95% faster performance
- Users without cache: Return zeros with
pendingCalculation: trueand get queued for background processing
Code Examples
Authorizations
JWT Authorization header using the Bearer scheme. Format: "Bearer {token}"
Query Parameters
Search query to filter users
Page number for pagination
Number of users per page
Set to 'true' to include fast cached accounting data
Available options:
true, false Comma-separated list of attributes to include in the response
Filter users by external ID
Filter by user role(s), comma-separated for multiple
Sort field (using accounting fields like 'gross', 'paid', 'due' requires accounting=true)
Available options:
createdAt, updatedAt, name, split, gross, paid, due this value determines the order for sorting the result, either ascending or descending
Available options:
asc, desc