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

Enrol a Client in a Web Occurrence. 

A Client Web Enrolment is created which links the Web Client to the Occurrence. 

A Web Occurrence ID (iOccu_ID) is passed as a parameter. To be valid, a Web Occurrence ID must :

  • be a published Occurrence,
  • have at least one vacancy.
 

Previous to version 4.3.6, a valid web occurrence could not have started before today. That condition has been dropped, so that it is now possible to enrol in any valid web occurrence, regardless of its start or end dates. 

The web developer can re-impose the previous restriction, if desired, according to business rules. 

Details of the Web Client (sSurname, sGiven Name, DOB and sCode) are supplied as parameters. The parameter, sSurname, must be non-empty. 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. 

This function is used to create a web enrolment by an individual. If a person is to be enrolled under an employer web enrolment, don't use this function. Instead, use AddWebEmployee after the employer enrolment has been made. 

Web enrolments added by this function are available in the Client tab under the occurrence in the Process Web Enrolments manager in VETtrak, so that they can be processed, possibly matched with an existing client (with or without updating the existing client), and turned into full enrolments. Alternatively, they can be processed automatically by calling the ProcessWebEnrolment function. 

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

Requires a valid registration key entry for the Short Courses 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 = "Enrols a client with the specified details into a new web enrolment linked to the specified occurrence ID")]
public TAuthID AddClientWebEnrolment(string sToken, int iOccu_ID, string sSurname, string sGiven, string sCode, DateTime? xsdDOB, string sDescription, int? referralId);
Parameters 
Description 
string sToken 
String Token. 
int iOccu_ID 
Integer ID of Web Occurrence. 
string sSurname 
String containing the Client's Surname. Mandatory. Maximum length 50 characters. 
string sGiven 
String containing the Client's Given Name. Maximum length 50 characters. Leave empty for a single name client. 
string sCode 
String containing the Client's suspected VETtrak Code. If unknown, enter an empty string. Maximum length 10 characters. 
DateTime? xsdDOB 
DateTime containing the Client's Date of Birth. 
string sDescription 
String - description or notes for Web Enrolment. 
int? referralId 
Integer - ID of referral source for this enrolment. Call GetReferralSources to get a list of referral sources that can be used. Specify null or 0 for no referral source 

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

Copyright (c) VETtrak 2022. All rights reserved.