Adds a new relationship to a client.
[WebMethod(Description = "Adds a relationship for a client")] public TAuthID AddClientRelationship(string token, string clientCode, TClieRelationship clieRelationship);
Parameters |
Description |
string token |
String containing an authentication token. |
string clientCode |
String containing the code of the client to add the relationship to. |
TClieRelationship clieRelationship |
TClieRelationship containing the client relationship details to add. |
TAuthID containing the ID of the new client relationship.
The clientCode parameter must be the code of an existing client, indicating the client the new relationship is "from".
The clieRelationship parameter is a TClieRelationship containing details of the new relationship. Properties are:
The ToClient property is a TRelationshipToClient object with the following properties:
When creating a new "to" client, an automatic data match will be performed. If there's one existing client with the matching name and contact details, that existing client will be attached to the relationship, instead of creating a new client.
If a new client is created for the "to" client, it will not be able to login by default.
If the client relationship already exists, a duplicate is not created.
A TAuthID is returned - if successful, it contains the ID of the new client relationship record.
A token is passed for authentication. If the authentication fails, or other errors occur, no ID is returned. The result of the authentication is represented by a TAuthenticate object.
This function has security level "Protected", and can only be accessed by users that have explicitly been granted permission to the API.
Copyright (c) VETtrak 2022. All rights reserved.
|