Client relations
get info
request
GET /api/v2/clients/1000000513/relations HTTP/1.1
response
HTTP/1.1 200 OK
{
"client" : {
"id" : 1000000513,
"familyName" : "-",
"firstName" : "Екатерина",
"patronymicName" : "-"
},
"relations" : {
"Законный представитель" : {
"masters" : null,
"slaves" : null
},
"Контактное лицо" : {
"masters" : null,
"slaves" : null
},
"Владелец дисконтной карты" : {
"masters" : {
"10051" : {
"id" : 1000000509,
"familyName" : "-",
"firstName" : "Виктория",
"patronymicName" : "-"
}
},
"slaves" : {
"10052" : {
"id" : 1000000504,
"familyName" : "-",
"firstName" : "Элина",
"patronymicName" : "-"
},
"10053" : {
"id" : 1000000490,
"familyName" : "-",
"firstName" : "Аракс",
"patronymicName" : "-"
}
}
},
"Discount card owner" : {
"masters" : null,
"slaves" : null
},
"Какой-то тип связи" : {
"masters" : null,
"slaves" : null
}
}
}
create
request
POST /api/v2/clients/1000000495/relations HTTP/1.1
{
"targetClientId" : 1000000496,
"type" : "Владелец дисконтной карты",
"master" : true
}
response
HTTP/1.1 200 OK