Spending Accounts
Overview
The Spending Accounts API allows developers to retrieve detailed information about financial benefit accounts (such as HSA, FSA, or HRA). This endpoint supports flexible querying, enabling you to view accounts at either a Consumer level or a Plan level.
Key Features
- Dual-Pivot Access: Retrieve data filtered by an individual consumer or all accounts within a specific benefit plan.
- Targeted Filtering: Narrow results by plan_year_id or specific account_type categories.
- Scalable Architecture: Built-in pagination ensures performance even when querying high-volume plans.
Use Cases
- Member Portals: Showing a user all their active spending accounts and available balances.
- Employer Reporting: Listing all consumer accounts associated with a specific corporate benefit plan.
- Year-End Audits: Filtering accounts by plan_year_id to reconcile contributions and spending.
Scopes & Permissions
Scope | Description | Required For |
| Read access to spending account details | GET operations |
Core Concepts
Conditional Requirements
To successfully call this endpoint, your request must include at least one of these identifiers:
consumer_id: Scopes the results to a single person.plan_id: Scopes the results to all participants within a specific plan.
Filtering Logic
account_type: This is an array parameter. You can filter by up to 2 types simultaneously (for example,?account_type=HSA&account_type=MedicalFSA).plan_year_id: Use this to isolate accounts belonging to a specific benefit cycle.
Pagination
The API utilizes zero-based pagination to manage large result sets.
Parameter | Default | Max | Description |
| 0 | - | The page index to return. |
| 20 | 100 | The number of items per page. |
Error Handling
Status Code | Meaning | Cause |
| Bad Request | Missing both consumer_id and plan_id, or providing more than 2 account_type values. |
| Unauthorized | Authentication header is missing or the token has expired. |
| Internal Error | An unexpected server-side error occurred. |
Idempotency
This endpoint uses the GETmethod and is idempotent. Multiple identical requests will return the same data without altering the state of the consumer’s accounts.
Endpoints
/v1/spending-accounts?consumer_id=consumer_id&plan_id=plan_id&plan_year_id=plan_year_id&ac...