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

Get the Client for a given Client Code. 

GetClientByCode returns the basic client details (Surname, Given Name and Code) which match the given client code. If there is no match for the given code, the properties of the returned client are empty (= ''). 

GetClientByCode can be used to check if the given code represents a valid client by comparing the given code (sClie_Code) with the Clie_Code property of the returned client. 

ie. If sClie_Code = GetClientByCode(sToken, sClie_Code).Clie.Clie_Code 

then " sClie_Code is a VALID Code" 

else " sClie_Code is an INVALID Code" 

The Client is represented by a TClie

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

C#
[WebMethod(Description = "Gets the client with the specified code")]
public TAuthClie GetClientByCode(string sToken, string sClie_Code);
Parameters 
Description 
string sToken 
String Token. 
string sClie_Code 
String containing the Client Code of the Client. 

TAuthClie : an Authenticated Client. If the Client Code is not valid, the Auth property shows an error and the properties of the returned Client are empty. ( = '')

Does not include data relating to students who decline to have their details published. 

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.

Copyright (c) VETtrak 2022. All rights reserved.