family
- base
- localhost
- dev
- prod
/v2/private/preneed/family
http://localhost:1350/v2/private/preneed/family
https://dev.everdays.com/v2/private/preneed/family
https://everdays.com/v2/private/preneed/family
Available Methods​
- POST
POST /v2/private/preneed/family​
Adds a family member to the user's preneed.family array, and adds the user to the invited user's othersPlans.
The endpoint will first use the phone number to query the DB and see if the invited user is already existing, otherwise it will create a new shell user.
The endpoint will then add the current user to the invited user's othersPlans if they don't already exist on the array.
Afterwards the invited user will be added to the user's preneed.family array, but if the invited user already exists in the array an error will be thrown.
Params​
| Param | Type | Description | Required? |
|---|---|---|---|
| name | String | The name of the family member to be added | ✅ |
| phone | Number | The phone number of the family member to be added | ✅ |
String | The email address of the family member to be added |
body: {
name: "Family Person",
phone: 8185550101,
email: "family@person.com"
}
Returns​
The entire user object, with preneed.family updated.
Note
The inviteUrl is created during the response and is not saved in the DB.
user: {
...,
preneed: {
...,
family: [
{
_id: "62506066c3508643c5b4b418",
name: {
"first": "Family",
"last": "Person",
"middle": ""
},
image: "https://everdays-next.vercel.app/next-images/logos/everdays-square-logo-full.svg",
phone: 8185550101,
shellEmail: "family@person.com",
inviteUrl: "http://localhost:1350/shortlink/UZreGbBJdc?v=5m"
}
]
}
}
info
For more detailed information about each value in preneed, please refer to the user model docs.