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

Retrieves a list of enrolled tasks from all enrolments belonging to a client.

C#
[WebMethod(Description = "Retrieves a list of enrolled tasks for a client from all their enrolments")]
public TAuthTaskEnrolmentList GetEnrolledTasksForClient(string token, string clientCode, bool activeEnrolmentsOnly);
Parameters 
Description 
string token 
String containing a token. 
string clientCode 
String client code of the client to retrieve enrolled tasks for. 
bool activeEnrolmentsOnly 
Indicates whether to only return enrolled tasks that are linked to active enrolments. Valid values are:
  • false: Enrolled tasks from all the client's enrolments are retrieved
  • true: Only enrolled tasks from the client's currently active enrolments are retrieved 

TAuthTaskEnrolmentList containing the list of enrolled tasks from the client's enrolments

This function retrieves a list of all enrolled tasks that a single client is enrolled in via any of their enrolments. Enrolled tasks include results. 

The clientCode parameter is the client code of the client to retrieve enrolled tasks for. 

The activeEnrolmentsOnly parameter is a flag to indicate whether only active enrolments should be considered. If false, enrolled tasks from all the client's enrolments are retrieved. If true, only enrolled tasks from the client's currently active enrolments are retrieved. 

Each enrolled task is represented by a TTaskEnrolment object. The list of enrolled tasks is in the returned TAuthTaskEnrolmentList object. 

Use the UpdateEnrolledTask function to update the result of a single enrolled task returned by this function. 

To get a consolidated list of task definitions that the client is enrolled in, use the GetTasksForClient function. 

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

Requires a valid registration key entry for the Tasks feature. 

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.

Copyright (c) VETtrak 2022. All rights reserved.