Adds a new relationship to the client in a client web enrolment.
[WebMethod(Description = "Adds a relationship for a web client")] public TAuthID AddWebClientRelationship(string token, int webEnrolId, TClieRelationship clieRelationship);
Parameters |
Description |
string token |
String containing an authentication token. |
int webEnrolId |
Integer ID of the web enrolment to add the relationship to. |
TClieRelationship clieRelationship |
TClieRelationship containing the client relationship details to add. |
TAuthID containing the ID of the new (temporary) web client relationship.
The webEnrolId parameter must be the ID of an existing web enrolment, which was returned from AddClientWebEnrolment. The client enrolling in this web enrolment will be the client that 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 when the web enrolment is processed. If there's one existing client with the matching name and specified contact details, that existing client will be attached to the relationship, instead of creating a new client, and any new contact details updated.
If a new client is created for the "to" client, it will not be able to login by default.
When processing the web enrolment, if the web client and "to" client are matched to existing clients, and the relationship already exists, a duplicate relationship is not created.
A TAuthID is returned - if successful, it contains the ID of the new (temporary) web 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.
|