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

Reserves a Client's place in a Web Occurrence. 

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

A reservation is a type of web enrolment. The Client Web Reservation can be retrieved, updated and deleted like a normal client web enrolment, and takes up a place in the occurrence, except that it is not yet available for processing by a VETtrak user. To "complete" the reservation and turn it into a normal client web enrolment and make it available for processing in VETtrak, use the CompleteWebReservation function. Using a web reservation also allows the user to configure individual occurrences to automatically process web reservations made into them, which will occur when CompleteWebReservation is called. 

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.
 

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 reserved web enrolment by an individual. If a person is to be enrolled under an employer web reservation, don't use this function. Instead, use AddWebEmployee after the employer reservation has been made. 

Web reservations added by this function can be viewed in the Reservations tab under the occurrence in the Process Web Enrolments manager in VETtrak. The user can delete them if they so choose. 

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 = "Reserves a client with the specified details into the specified occurrence ID")]
public TAuthID AddClientWebReservation(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. 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.