family
- base
- localhost
- dev
- prod
/v2/private/user/family
http://localhost:1350/v2/private/user/family
https://dev.everdays.com/v2/private/user/family
https://everdays.com/v2/private/user/family
Available Methods​
- POST
POST /v2/private/user/family​
Adds a family member to the user's cemeteryInfo.family array, and adds the user to the invited user's othersCemeteryPlans.
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 othersCemeteryPlans if they don't already exist on the array.
Afterwards the invited user will be added to the user's cemeteryInfo.family array.
Params​
| Param | Type | Description | Required? |
|---|---|---|---|
| firstName | String | The first name of the family member to be added | ✅ |
| lastName | String | The last 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 | ||
| relationship | String | The relationship of the family member to be added |
Example request body
body: {
firstName: "Richard",
lastName: "Rider",
phone: 8185550101,
email: "family@person.com",
relationship: "son"
}
Returns​
The entire user object, with cemeteryInfo.family updated.
Example return object of just user.cemeteryInfo
user: {
...,
"cemeteryInfo": {
"family": [
...,
{
"familyUser": {
"_id": "6529886481c093456636a566",
"name": {
"first": "Richard",
"last": "Rider"
},
"phone": 8185550101,
"shellEmail": "family@person.com"
},
"relationship": "son"
}
]
}
}