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

Add an Web Employer Contact. 

A Web Employer Contact is a web client who is a contact person for a company making an Employer Enrolment. 

AddWebEmployerContact creates a web Client who links to the Web Employer and the Employer Web Enrolment. 

A Web Enrolment ID (iWebe_ID) is passed as a parameter. This should be the ID returned by the AddEmployerWebEnrolment function. 

Details of the Web Client (sSurname, sGiven Name, DOB and sCode) are supplied as parameters. If a non-empty string is supplied as sCode, an attempt is made to match the web client details with an existing client record in the VETtrak database. 

AddWebEmployerContact behaves in a similar way to AddWebEmployee, the difference being that the web client generated is flagged as a contact, rather than a student. 

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

Requires a valid registration key entry for the Bookings feature. 

This function has security level "Protected", and can only be accessed by users that have explicitly been granted permission to the API.

C#
[WebMethod(Description = "Adds an employer contact with the specified details to an existing employer web enrolment with the specified web enrolment ID")]
public TAuthID AddWebEmployerContact(string sToken, int iWebe_ID, string sSurname, string sGiven, string sCode, DateTime? xsdDOB);
Parameters 
Description 
string sToken 
String Token. 
int iWebe_ID 
Integer ID of Employer Web Enrolment. 
string sSurname 
String containing the Contact's Surname. Maximum length 50 characters. 
string sGiven 
String containing the Contact's Given Name. Maximum length 50 characters. Leave empty for a single name client. 
string sCode 
String containing the Contact's suspected VETtrak Code. If unknown, enter an empty string. Maximum length 10 characters. 
DateTime? xsdDOB 
DateTime containing the Contact's Date of Birth. If known, is used to aid matching with existing VETtrak clients (to avoid duplication).
If unknown, enter a null date. 

TAuthID : an Authenticated ID object. The ID property holds the ID of the Web Client. If errors occur, and the Web Client if not created, the ID property holds the value BAD_ID = -1.

Copyright (c) VETtrak 2022. All rights reserved.