Update relationship
This endpoint allows users to update an existing relationship between two clients.
Path parameters
-
The GUID of the client whose relationship details you want to update.
Body Required
-
This sets the relationship the client specified by the RelatedClientGUID has to the client specified by ClientGUID. For example RelationshipID 3 and 4 are "Parent Child" and "Child Parent" respectively. RelationshipID = 3 would set RelatedClientGUID as the parent and ClientGUID as the child. RelationshipID = 4 would set RelatedClientGUID as the child and ClientGUID as the parent.
To retrieve a comprehensive list of acceptable values and their corresponding formatted values, you may make a request to the designated endpoint: /api/v2/clients/relationships/options
PUT
/api/v2/clients/{ClientGUID}/relationships
curl \
-X PUT https://api.fincalc.co.uk/api/v2/clients/{ClientGUID}/relationships \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{"RelatedClientGUID":"4G0B1C88-6D80-4C17-BB3E-2D68E6D26406","RelationshipID":1}'
Request examples
{
"RelatedClientGUID": "4G0B1C88-6D80-4C17-BB3E-2D68E6D26406",
"RelationshipID": 1
}
Response examples (200)
{
"success": true,
"data": {
"FirstName": "Mark",
"Surname": "Phillips",
"ClientGUID": "3F0B1C88-6D80-4C17-BB3E-1D68E6D26405",
"RelationshipID": 1,
"FormattedValues": {
"ClientGUID": "Mark Phillips",
"RelationshipID": "Spouse"
}
},
"message": "Client relationship updated successfully."
}
Response examples (403)
{
"success": false,
"message": "You do not have permission to edit the client."
}
Response examples (404)
{
"success": false,
"message": "Client not found."
}
Response examples (422)
{
"success": false,
"message": "Validation Error.",
"data": {
"RelatedClientGUID": [
"The related client guid field is required."
],
"RelationshipID": [
"The relationship id field is required."
]
}
}