Skip to main content

family

/v2/private/salesAgent/lead/:id/family

Available Methods​

  • POST

POST /v2/private/salesAgent/lead/:id/family​

This endpoint is used by Sales Agents / Counselors to add/share with family for the lead.

Adds a family member to the lead's cemeteryInfo.family array, and adds the lead 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 lead to the invited user's othersCemeteryPlans if they don't already exist on the array.

Afterwards the invited user will be added to the lead's cemeteryInfo.family array.

info

The user calling this endpoint must be Sales Agent / Counselor or Everdays Admin

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
dateOfBirthDateThe birthDate of the family member to be added The user's
Example request body
body: {
firstName: "Richard",
lastName: "Rider",
phone: 8185550101,
email: "family@person.com",
relationship: "son",
dateOfBirth: "2022-01-30T23:52:45.372+00:00",
}

Returns​

The lead's user object.

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"
}
]
}
}