Hi Rajanithi,
Creating a relation within an entity profile requires setting up a reference attribute for that relation type and creating refEntity and refRelation objects within the entity payload for that reference attribute. An example of this is individual to location relation type, and the corresponding address reference attribute within individual.
This is what the payload would look like if you were posting an individual with a location. Note the refEntity object, which represents the location's crosswalk, and refRelation, which represents the relation crosswalk. The outcome of this post is the creation of the individual, creation of the location, as well as creation of a relation between the individual and location.
[
{
"type": "configuration/entityTypes/Individual",
"attributes": {
"FirstName": [
{
"value": "Christestfirstname"
}
],
"LastName": [
{
"value": "Christestlastname"
}
],
"Phone": [
{
"value": {
"Status": [
{
"value": "A"
}
],
"Type": [
{
"value": "Business"
}
],
"Number": [
{
"value": "18449122100"
}
]
}
}
],
"Email": [
{
"value": {
"Status": [
{
"value": "A"
}
],
"Type": [
{
"value": "Primary"
}
],
"Email": [
{
"value": "christest@gmail.com"
}
]
}
}
],
"EnterpriseId": [
{
"value": "45454549889888777"
}
],
"Address": [
{
"value": {
"AddressType": [
{
"value": "H"
}
],
"AddressLine1": [
{
"value": "612 E Park St"
}
],
"City": [
{
"value": "Cary"
}
],
"StateProvince": [
{
"value": "NC"
}
],
"Zip": [
{
"value": {
"PostalCode": [
{
"value": "27511"
}
]
}
}
],
"Country": [
{
"value": "US"
}
],
"Status": [
{
"value": "A"
}
]
},
"refEntity": {
"type": "configuration/entityTypes/Location",
"crosswalks": [
{
"type": "configuration/sources/ABCSource",
"value": "3832834832_location"
}
]
},
"refRelation": {
"type": "configuration/relationTypes/IndividualHasAddress",
"crosswalks": [
{
"type": "configuration/sources/ABCSource",
"value": "3832834832_hasAddress_A_H"
}
]
}
}
]
},
"crosswalks": [
{
"type": "configuration/sources/ABCSource",
"value": "3832834832"
}
]
}
]