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

Get all Enrolment Units for an Enrolment, including linked units. 

Returns an Authenticated Enrolment Unit List containing all of the enrolment units for a given enrolment, including appropriate linked unit enrolments. 

Each Enrolment Unit is represented by a TEnun. The collection of Enrolment Units is represented by a List of TEnun

This list will also include any "linked units". When getting units for a client occurrence enrolment, if the occurrence enrolment is linked to any of the client's other enrolments, and the occurrence contains a unit that the other linked enrolment also contains, the enrolled unit from the other linked enrolment will also be included. This allows scenarios such as a client's "master enrolment" (perhaps in a contract) that contains all the units and results the client is doing as part of a qualification, and allow the client to be enrolled in "delivery occurrences" for each block of training that is done that contains just the units being delivered in that block. 

Enrolments can be linked or unlinked within VETtrak, and automatically linked when creating the client occurrence enrolment. 

Note that the ID property of the TEnun object is the enrolment ID of the enrolment that the enrolled unit is directly under (which may be a linked enrolment). It is also possible for the same unit to appear multiple times (with a different enrolment ID) if the same unit is in multiple linked enrolments. 

If you wish to update the results of linked units, you can use the UpdateResultIncludingLinked function. 

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

This function has security level "Restricted". Users that have explicitly been granted permission to the API can use it with any parameters, otherwise, the logged-in client can only access their own data.

C#
[WebMethod(Description = "Gets a list of units for the enrolment with the specified ID, including linked units")]
public TAuthEnunList GetUnitsForEnrolmentIncludingLinked(string token, int enrolmentId);
Parameters 
Description 
string token 
String Token. 
int enrolmentId 
Integer ID of Enrolment. 

TAuthEnunList : an authenticated list of all Enrolment Units for the Enrolment, including linked units.

Copyright (c) VETtrak 2022. All rights reserved.