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

Create a Client in VETtrak for a given Client Surname, Given Name and Date of Birth. 

AddClientAfterCheck checks if the given client details represents an existing client in the VETtrak database. If it does, the existing client is returned. If no matching client exists, a new client record is created and populated with the available details. 

AddClientAfterCheck can be used to ensure a client exists in VETtrak, before proceeding with other functions. 

Clients must be linked to a division. If you do not specify a division, the client is linked to the Root Division. 

If VETtrak's security settings are configured to use email addresses for usernames, you should specify the "email" parameter (otherwise the client will have no username and not be able to log in), and there must be no other clients with a username matching that email address. 

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 = "Checks whether a client with the specified surname, given name and date of birth exists, and adds it if it doesn't exist")]
public TAuthClie AddClientAfterCheck(string sToken, string sClie_Surname, string sClie_Given, DateTime xsdClie_DOB, int? divisionId, string email);
Parameters 
Description 
string sToken 
String containing a Token. 
string sClie_Surname 
String containing the Surname of the Client. Cannot be empty. Maximum length 50 characters. 
string sClie_Given 
String containing the Given Name of the Client. Maximum length 50 characters. Leave empty for a single name client. 
DateTime xsdClie_DOB 
DateTime containing the Date of Birth of the Client. Cannot be Null. 
int? divisionId 
Optional ID of division to link client to. Specify null or 0 to default to the root division. 
string email 
Email address for new client. If this function creates a new client, and VETtrak's security settings are configured to use email addresses for usernames, this parameter should be specified and must be unique. 

TAuthClie : an Authenticated Client.

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

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.