family
- base
- localhost
- dev
- prod
/v2/private/salesAgent/lead/:id/family
http://localhost:1350/v2/private/salesAgent/lead/:id/family
https://dev.everdays.com/v2/private/salesAgent/lead/:id/family
https://everdays.com/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​
| 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 | |
| dateOfBirth | Date | The 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"
}
]
}
}