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

Update Details for a Client by passing a TClieDetail object. 

Returns a TAuthenticate object. 

The new Client Details are represented by a TClieDetail parameter (cClient). All properties (except Clie_Username) of cClient are used for the update, so ensure any properties which are to remain unchanged are populated with current values. An exception is the DivisionId - if you set it to 0, it will not change the client's current division. 

If the email address of a client is updated, and that client's username was matching their email address, the client's username will also be updated to match the new email address - this will cause an error if there's already another client with a username matching that new email address. 

If you do not specify or populate UsualAddress or PostalAddress, the AVETMISS 6 address that you specify will be automatically updated into the AVETMISS 7 format address fields as well. 

If you do specify UsualAddress or PostalAddress, those addresses will be automatically populated into the AVETMISS 6 format address fields as well, and anything you've specified for the AVETMISS 6 fields will be ignored. 

It is recommended that you specify UsualAddress and PostalAddress, and do not specify (or leave blank) the Clie_RAddr, Clie_RCity, Clie_RPCode, Stat_RShortName, Clie_PAddr, Clie_PCity, Clie_PPCode and Stat_PShortName fields, in the cClient. 

WARNING: If you use GetClientDetails to get a TClieDetail object, the UsualAddress and PostalAddress fields in it will be populated. If you try to change the address by updating only the Clie_RAddr, Clie_RCity, Clie_RPCode, Stat_RShortName, Clie_PAddr, Clie_PCity, Clie_PPCode or Stat_PShortName fields in that TClieDetail, and then call this function to update it passing in that TClieDetail, your address changes will be ignored (because it will use the UsualAddress and PostalAddress fields in the TClieDetail as the address). You should update UsualAddress and PostalAddress instead. 

Changing the Empl_Identifier or PositionName will create a new client employment record, as primary, and inactivate the existing primary record. Changing the Clie_DateLastAssessed, Clie_Commenced, TerminationDate and/or Clie_Salary will update these details in the client's existing primary employment record (creating one if it does not exist). 

To update Username and/or Password, use the function

 

A token is passed for authentication. If the authentication fails, or other errors occur, no client details are updated. The result of the authentication and update is represented by a TAuthenticate object. 

This function has security level "Restricted". Users that have explicitly been granted permission to the API can use it with any parameters, otherwise, the logged-in client can only access their own data.

C#
[WebMethod(Description = "Updates a client with the information specified")]
public TAuthenticate UpdateClientDetails(string sToken, TClieDetail cClient);
Parameters 
Description 
string sToken 
String Token. 
TClieDetail cClient 
TClieDetail object holding client details to update. 

TAuthenticate : a TAuthenticate Object containing the result of the update.

Copyright (c) VETtrak 2022. All rights reserved.