Skip to main content

family

/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​

ParamTypeDescriptionRequired?
firstNameStringThe first name of the family member to be added✅
lastNameStringThe last name of the family member to be added✅
phoneNumberThe phone number of the family member to be added✅
emailStringThe email address of the family member to be added
relationshipStringThe 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"
}
]
}
}