Wex Health and Benefits APIs

Sections

Theme switcher

Replace Employee

Header Parameters

X-Request-Idstring

Optional correlation ID for distributed tracing.

Idempotency-Keystring Required

Required client-generated UUID v4 used to deduplicate retried mutating requests (POST, PUT, PATCH, DELETE). Requests without this header are rejected with 400 Bad Request. The first successful (2xx) response is cached for 24h and replays of the same key return the cached response without re-executing the operation.

Authorizationstring

Path Parameters

idstring Required

Employee record external identifier (UUID v4).

Body Parameters

employee_numberstring Required

Unique employee number within the employer.

Max length
100
first_namestring Required

Employee's first name.

Max length
255
last_namestring Required

Employee's last name.

Max length
255
middle_namestring | null

Employee's middle name.

Max length
255
emailstring Required

Employee's email address.

Max length
255
date_of_birthstring | null

Date of birth (YYYY-MM-DD).

ssnstring | null

US Social Security Number.

genderstring | null

Self-reported gender of the employee.

partner_idstring Required

Partner identifier for cross-domain lookups.

Max length
100
employer_idstring Required

Employer identifier for cross-domain lookups.

Max length
100
employment_infoobject

Employment information sub-object for employee creation and full update.

Show child attributes

addressesarray

Employee postal addresses. Replaces the entire collection when supplied; omit this field or send an empty array to clear all addresses. null is not accepted. If one or more entries are supplied, at most one entry per type (HOME, WORK, MAILING), and at most one entry may be flagged as is_primary: true.

Max items
3

Show child attributes

phone_numbersarray

Employee phone numbers. Replaces the entire list when supplied; omit this field or send an empty array to clear all phone numbers. null is not accepted.

Max items
20

Show child attributes

versioninteger Required

Current version for optimistic concurrency. The request is rejected with 409 Conflict if it does not match the persisted version.

Minimum
1
Maximum
2147483647

Response

200
Object

OK – Employee record updated

Response Attributes

employee_idstring Required

Unique identifier for the employee record (UUID v4).

employee_numberstring Required

Unique employee number within the employer.

Max length
100
first_namestring Required

Employee's first name.

Max length
255
last_namestring Required

Employee's last name.

Max length
255
middle_namestring | null

Employee's middle name.

Max length
255
emailstring Required

Employee's email address.

Max length
255
date_of_birthstring | null

Date of birth (YYYY-MM-DD). Direct identifier — handled as restricted data.

ssnstring | null

US Social Security Number. Direct identifier — handled as restricted data.

genderstring | null

Self-reported gender of the employee.

employment_infoobject | null

Employment information for an employee.

Show child attributes

addressesarray Required

Employee postal addresses. Always present; may be an empty array when no addresses are on file. When one or more entries are present, at most one entry per type (HOME, WORK, MAILING), and at most one entry is flagged as is_primary: true.

Max items
3

Show child attributes

partner_idstring Required

Partner identifier for cross-domain lookups.

Max length
100
employer_idstring Required

Employer identifier for cross-domain lookups.

Max length
100
versioninteger Required

Monotonically increasing version used for optimistic concurrency control on PUT/PATCH. Always returned.

Minimum
1
Maximum
2147483647
phone_numbersarray

Employee phone numbers. Returned only when the request specifies expand=PHONE_NUMBERS; otherwise, this property is omitted. When returned, the value is an array and may be empty.

Max items
20

Show child attributes

400
Object

Bad Request – Validation failed. The errors map keys mirror the snake_case JSON property names used in the request payload.

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.

Show child attributes

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 | 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.

403
Object

Forbidden – Insufficient permissions.

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.

404
Object

Not Found – Employee record does not exist.

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.

409
Object

Conflict – Returned for duplicate-record conflicts and optimistic concurrency version mismatches. See duplicate_record and version_conflict examples.

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.

500
Object

Internal Server 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.

default
Object

Internal Server 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?

PUT

/

Select
1

Response

Was this section helpful?