Links another customer to this one with a relationship type (child, partner, parent, sibling, …). Identify the related customer either by 'relatedCustomerId', or by 'idType' and 'idNumber': when no customer of the tenant has that ID number a new customer is created from the given details (first and last name, gender, birth date, email, cell number), with this customer's manager, class and source and the tenant's default inactive status. The opposite relationship is added to the related customer automatically (e.g. adding a child also adds this customer as the child's parent). When 'createDerivedRelationships' is true, implied relationships are added too (e.g. a child is also linked to this customer's partner and parents). Adding a customer that is already related is ignored. Returns the updated customer; the new relationship's 'id' (in 'relatedCustomers') is the 'relationshipId' used to update or remove it. Errors: 400 with error code 40001 when 'relationshipType' is missing, the customer is linked to itself, or neither 'relatedCustomerId' nor 'idType' and 'idNumber' are given; 404 when the customer or the related customer does not exist; 400 with error code 40000 when the caller may not access the customer or the related customer.
| Time | Status | User Agent | |
|---|---|---|---|
Retrieving recent requests… | |||
400Invalid input (40001) or a customer is not accessible (40000)
404Customer or related customer not found