Wex Health and Benefits APIs

Sections

Theme switcher

Get Election History

Header Parameters

X-Request-Idstring

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

Query Parameters

consumer_idstring Required

Consumer identifier (required).

plan_typearray

Optional filter for one or more plan types. Can be used alone or combined with plan_year_id.

Filter behavior:

  • If provided alone: returns elections for any of the listed plan types across all plan years (within the lookback / future window); multiple values are ORed
  • If combined with plan_year_id: returns elections matching the plan year AND any of the listed plan types (AND + OR)
  • Invalid values (not a supported PlanType) return 400 Bad Request
  • HSA is a valid `PlanType...

Show child attributes

plan_year_idstring

Optional filter for a specific plan year. Can be used alone or combined with plan_type.

Filter behavior:

  • If provided alone: returns all elections for this plan year across all plan types (within the lookback / future window)
  • If combined with plan_type: returns elections matching both filters (AND logic)
include_future_plansboolean

When true, include elections with start_date in the future, in addition to the lookback history window.

Future elections are limited to those with start_date <= (UTC_NOW + 1 year).

When false (default), only elections within the lookback window are returned.

lookback_yearsinteger

Number of 365-day periods to look back from UTC today. Only elections where start_date >= (UTC_NOW - lookback_years * 365 days) are returned. This is fixed 365-day math, not calendar-year subtraction (large values can differ slightly from calendar-year boundaries due to leap days).

Examples (UTC_NOW = 2026-08-21T00:00:00Z):

  • lookback_years: 5 → threshold 2021-08-21T00:00:00Z (UTC_NOW minus 1,825 days)
  • lookback_years: 1 → threshold 2025-08-21T00:00:00Z (UTC_NOW minus 365 days)

Wh...

Minimum
1
Maximum
10
pageinteger

Zero-based page index.

page_sizeinteger

Maximum number of rows to return per page (1-100).

Minimum
1
Maximum
100

Response

200
Object

Election history retrieved

Response Attributes

itemsarray Required

Show child attributes

paginationobject Required

Show child attributes

400
Object

Bad request - invalid parameters

Response Attributes

typestring
titlestring
statusinteger
detailstring
instancestring
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 – Missing or invalid credentials.

Response Attributes

typestring
titlestring
statusinteger
detailstring
instancestring
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.

403
Object

Forbidden – Insufficient permissions.

Response Attributes

typestring
titlestring
statusinteger
detailstring
instancestring
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.

429
Object

Too Many Requests – Rate limit exceeded.

Response Attributes

typestring
titlestring
statusinteger
detailstring
instancestring
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.

500
Object

Internal Server Error.

Response Attributes

typestring
titlestring
statusinteger
detailstring
instancestring
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
titlestring
statusinteger
detailstring
instancestring
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?

Base URL

Production:

Sandbox:

Language Box

GET

/

Select
1

Response

Was this section helpful?