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

Insert a Client. 

Create a new Client record and populate fields Clie_Surname, Clie_Given, Clie_Code, Clie_Username, Clie_Password and DivisionId. Remaining fields will take default values or Null. Note that Clie_Code, Clie_Username and Clie_Password are automatically generated. 

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

Returns an Authenticated Client containing details of the newly created Client. 

The basic details of the newly created Client, are represented by a TClie. Note that this does not include the Clie_Username and Clie_password properties. To access these properties, call the function GetClientDetails(sClie_Code). 

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

If more detailed information is available for a new client, the procedure would be to create the new client using the AddClient function, then populate a TClieDetail object with the available details and call UpdateClientDetails.

C#
[WebMethod(Description = "Creates a new client with the specified surname and given name")]
public TAuthClie AddClient(string sToken, string sClie_Surname, string sClie_Given, int? divisionId);
Parameters 
Description 
string sToken 
String Token. 
string sClie_Surname 
String Surname of new Client. Maximum length 50 characters. 
string sClie_Given 
String Given Name of new Client. Maximum length 50 characters. Leave empty for a single name client. 
int? divisionId 
Optional ID of division to link client to. Specify null or 0 to default to the root division. 

TAuthClie : an Authenticated Basic Client.

Copyright (c) OzSoft Solutions 2016. All rights reserved.