Skip to content

Save Spousal Profile

Create or update a user's spousal profile information.

This endpoint creates or updates the spousal profile information for a specific user. It allows setting sensitive personal data.

Please note that all properties are replaced with the values from the request payload. If a property is not specified, it will be replaced with an empty value.

Any change results in a new version.

Endpoint

MethodUrl
PUT/v1.0/users/:user_id/spousal-profile

Path Parameters

user_id
string
required

The unique identifier of the user whose spousal profile is being saved.

Request Body

Warning

Given this is a PUT, when a property is omitted, it will be defaulted to null.

occupation
string

The spouse's occupation.

personal_info
object
required

Object containing the spouse's personal information. See the personal info object.

Sample Request

Copied
1curl -X PUT 'https://api.worklayer.com/v1.0/users/3b31f309-93ad-463a-ad1d-c39cac1c0a3d/spousal-profile' \
2-H 'Authorization: Bearer {token}' \
3-H 'Content-Type: application/json' \
4-d '{
5 "occupation": "Teacher",
6 "personal_info": {
7 "first_name": "Jane",
8 "last_name": "Doe",
9 "date_of_birth": "01/01/1991"
10 }
11}'

Response

id
string

Unique identifier of the saved profile.

version
integer

Version number of the saved profile.

Sample Response

Copied
1{
2 "id": "550e8400-e29b-41d4-a716-446655440000",
3 "version": 1
4}

Errors

  • 400: invalid request body
  • 403: you're not allowed to save the profile
Last updated on December 9, 2024