Get org members financial
GET /api/organizations/{org_id}/members/financial
Get paginated financial data for organization members. Returns financial information (lifetime spend, current budget) for all members within the specified organization. Access is restricted to: - Organization Admins - Organization Owners - Faheem Code members (users with @faheemcode.dev emails) Args: org_id: Organization ID (UUID) page_id: Optional pagination offset encoded as string limit: Maximum items per page (1-100, default 10) email: Optional email filter (case-insensitive partial match) user_id: Authenticated user ID (injected by require_financial_data_access) Returns: OrgMemberFinancialPage: Paginated response with member financial data - items: List of members with user_id, email, lifetime_spend, current_budget, and max_budget - current_page: Current page number (1-indexed) - per_page: Items per page - next_page_id: Offset for next page, or None if no more pages Raises: HTTPException: 401 if user is not authenticated HTTPException: 403 if user lacks access (not admin/owner and not @faheemcode.dev) HTTPException: 400 if page_id is invalid HTTPException: 500 if retrieval fails
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
org_id | path | string | yes | — |
page_id | query | `string | null` | no |
limit | query | integer | no | — |
email | query | `string | null` | no |
X-Org-Id | header | `string | null` | no |
Responses
| Status | Description |
|---|---|
200 | Successful Response |
422 | Validation Error |
Response body
| Field | Type | Required | Description |
|---|---|---|---|
items | OrgMemberFinancialResponse[] | yes | — |
current_page | integer | no | — |
per_page | integer | no | — |
next_page_id | `string | null` | no |
Operation ID: get_org_members_financial_api_organizations__org_id__members_financial_get