Wex Health and Benefits APIs

Sections

Theme switcher

Get Documents

Header Parameters

X-Request-Idstring

Optional correlation ID associated with the request, comprised of alphanumeric or hyphen characters up to 36 characters in length.

Max length
36
Pattern
^[A-Za-z0-9-]+$
Authorizationstring

Query Parameters

person_idstring Required

Unique Person Identifier obtained by looking up a Consumer in the Benefits Platform Identity System.

yearinteger

Optional year to filter documents by. When omitted, results across all years are returned.

document_typestring

The type of document to retrieve (ACCOUNT_STATEMENTS, TAX_DOCUMENTS, HSA_SUMMARY). When omitted, returns all document types.

page_sizeinteger

The number of records returned at once. Can be from 1-100, default is 25.

Minimum
1
Maximum
100
Default value
25
pageinteger

The zero-based page number to retrieve. Defaults to 0 (first page).

Default value
0

Response

200
Object

Successfully retrieved documents. Returns empty arrays when the person is not found or has no documents for the given filters.

Response Attributes

pageinteger Required

The current zero-based page number of the paginated results.

page_sizeinteger Required

The number of items returned per page in the results.

Minimum
1
Maximum
100
total_itemsinteger Required

The total number of matching documents across all pages, regardless of document type.

has_nextboolean Required

Indicates if there are additional pages of results in the combined documents collection.

documentsarray Required

A single paginated list of documents for the requested person and filters. Each item includes a document_type field indicating whether it is an account statement, tax document, or HSA summary. When document_type query parameter is specified, only documents of that type are returned. Empty array when no documents match the given filters.

Max items
100

Show child attributes

400
Object

Invalid request parameters. Returned when person_id is empty or year is out of range.

Response Attributes

typestring | null
titlestring | null
statusinteger | null
detailstring | null
instancestring | null
invalid_paramsarray | null

List of invalid parameters that caused the validation error.

Max items
10

Show child attributes

errorsobject

Human-readable validation error messages keyed by field name. Each key maps to one or more error message strings.

validation_errorsobject

Field-level validation errors keyed by field name. Each key maps to one or more structured error details.

401
Object

Unauthorized. Authentication failed.

Response Attributes

typestring | null
titlestring | null
statusinteger | null
detailstring | null
instancestring | null
invalid_paramsarray | null

List of invalid parameters that caused the validation error.

Max items
10

Show child attributes

errorsobject

Human-readable validation error messages keyed by field name. Each key maps to one or more error message strings.

validation_errorsobject

Field-level validation errors keyed by field name. Each key maps to one or more structured error details.

default
Object

Unexpected error.

Response Attributes

typestring | null
titlestring | null
statusinteger | null
detailstring | null
instancestring | null
invalid_paramsarray | null

List of invalid parameters that caused the validation error.

Max items
10

Show child attributes

errorsobject

Human-readable validation error messages keyed by field name. Each key maps to one or more error message strings.

validation_errorsobject

Field-level validation errors keyed by field name. Each key maps to one or more structured error details.

Was this section helpful?

GET

/

Select
1

Response

Was this section helpful?