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 and contact details.
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
| Method | Url |
|---|---|
PUT | /v1.0/users/:user_id/spousal-profile |
Path Parameters
The unique identifier of the user whose spousal profile is being saved.
Request Body
Given this is a PUT, when a property is omitted, it will be defaulted to null.
The spouse's occupation.
Object containing the spouse's personal information. See the personal info object.
Object containing the spouse's contact details. See the contact info object.
Sample Request
bashCopied1curl -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 "contact_info": {12 "email": "jane.doe@example.com",13 "phone_number": "+1-555-555-5556"14 }15}'
Response
Unique identifier of the saved profile.
Version number of the saved profile.
Sample Response
jsonCopied1{2 "id": "550e8400-e29b-41d4-a716-446655440000",3 "version": 14}
Errors
400: invalid request body403: you're not allowed to save the profile