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

Deletes units from an enrolment. 

An Enrolment ID (enrolmentId) is passed as a parameter. This should be the ID of a client enrolment. This can be sourced from functions such as GetEnrolmentsForClient or GetEnrolmentsForOccurrence

The parameter unitCodes is a List of strings, indicating the codes of the units to delete from the enrolment. This can be obtained using function such as GetUnitsForEnrolment

The reason parameter will be recorded in the deletion log. 

An error will occur if any units specified do not exist on the enrolment. An error will occur if any units specified have any result (other than Not Yet Started). 

A token is passed for authentication. If the authentication fails, or other errors occur, no units are deleted. 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 = "Deletes the specified units from the existing enrolment ID")]
public TAuthenticate DeleteUnitsFromEnrolment(string token, int enrolmentId, List<string> unitCodes, string reason);
Parameters 
Description 
string token 
String containing a token. 
int enrolmentId 
Integer ID of the Client Enrolment. 
List<string> unitCodes 
List of strings, which are the codes of the units to delete from the enrolment. 
string reason 
Reason for the deletion. This is recorded in the deletion log. 

TAuthenticate : an Authenticate Object containing the result of the update.

Copyright (c) VETtrak 2022. All rights reserved.