ASP.NET VETtrak API web services
ContentsIndexHome
PreviousUpNext
VT_API.UpdateClientRelationship Method

Updates an existing client relationship.

C#
[WebMethod(Description = "Updates a relationship for a client")]
public TAuthenticate UpdateClientRelationship(string token, TClieRelationship clieRelationship);
Parameters 
Description 
string token 
String containing an authentication token. 
TClieRelationship clieRelationship 
TClieRelationship containing the client relationship details to update. 

TAuthenticate indicating the result.

The clieRelationship parameter is a TClieRelationship containing updated details of the relationship. Properties are:

  • ClieRelationshipId: Mandatory, must be the ID of an existing client relationship to update. These are returned from GetClientRelationships or AddClientRelationship.
  • RelationshipTypeCode: Optional code of the relationship type. If specified, the relationship type is updated. Refer to TAuthClieRelationshipList for a list. All databases have "EC" for Emergency Contact, and "G" for Parent/Guardian.
  • RelationshipTypeName: Ignored
  • RelationId: Optional ID of the relation. If specified, the relation is updated. Each relationship type has a separately configured list. Refer to TAuthClieRelationshipList for a list.
  • RelationName: Ignored
  • StartDate: Optional start date of relationship. If specified, the start date is updated.
  • EndDate: Optional end date of relationship. If specified, the end date is updated. This can be used to indicate the relationship is no longer active.
  • Description: Optional description of relationship. If specified, the description is updated.
  • ToClient: Optional TRelationshipToClient to use to update the client that the relationship is "to".
 

The optional ToClient property is a TRelationshipToClient object with the following properties, that can be specified if you wish to update the "to" client:

  • ClientCode: Optional client code of the "to" client. If specified, the "to" client on the relationship is changed to the client with the specified code.
  • GivenName: Ignored
  • Surname: Ignored
  • OtherNames: Optional other names of "to" client. If specified, the "to" client's other names will be updated.
  • Email: Optional email address of "to" client. If specified, the "to" client's email will be updated.
  • MobilePhone: Optional mobile phone number of "to" client. If specified, the "to" client's mobile phone number will be updated.
  • HomePhone: Optional home phone number of "to" client. If specified, the "to" client's home phone number will be updated.
 

Note this function cannot create a new client for the "to" client. If you want to update the "to" client to a new client, create the client first using a function such as AddClient, then call this function and specify the new client's client code as the ToClient.ClientCode 

A token is passed for authentication. 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.