beneficiaries
- base
- localhost
- dev
- prod
/v2/private/purchase/aa/beneficiaries
http://localhost:1350/v2/private/purchase/aa/beneficiaries
https://dev.everdays.com/v2/private/purchase/aa/beneficiaries
https://everdays.com/v2/private/purchase/aa/beneficiaries
Available Methods​
- POST
POST /v2/private/purchase/aa/beneficiaries​
This endpoint is used to submit the list of beneficiares the user has added. The entire list of beneficiaries should be submitted in the params each time.
The endpoint will attempt to find any existing users based on the information provided for beneficiaries, and add any existing users to the array. Those not found will have new users created with the provided information.
NOTE
Once users have been created for beneficiaries, the only editable field will be relationship as all other fields belong on the user object itself. (Don't think it makes sense for one user to be able to edit another user's info like that)
Params​
| Param | Type | Description |
|---|---|---|
| beneficiaries | Array | An array of beneficiaries (include all) |
{
firstName: String,
lastName: String,
relationship: String Enum - ['spouse', 'mother', 'father', 'daughter', 'son', 'brother', 'sister', 'cousin', 'aunt', 'uncle', 'grandfather', 'grandmother', 'grandchild', 'niece', 'nephew'],
email: String,
phone: Number,
profile: String, // See rq-api
newBeneficiary?: Boolean, // Please include when adding a new beneficiary
wasEdited?: Boolean // Please include when editing a beneficiary
}
body: {
beneficiaries: [
{
name: {
first: "Bob",
last: "Bobson"
}
email: "bobbobson@bobson.com",
phone: 8085558085,
profile: "", // See rq-api
relationship: "child",
newBeneficiary: true
},
];
}
Returns​
The entire user object with an updated beneficiares array.
user: {
purchase: {
aa: {
beneficiaries: [
{
name: {
first: "Bob",
last: "Bobson"
}
email: "bobbobson@bobson.com",
phone: 8085558085,
profile: "", // See rq-api
relationship: "child",
},
];
}
}
}
info
For more detailed information about each value in insurance, please refer to the user model docs.