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

Retrieves a list of task definitions from all enrolments belonging to a client.

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

TAuthTaskList containing the list of task definitions from the client's enrolments

This function retrieves a consolidated list of all task definitions that a single client is enrolled in via any of their enrolments. 

The clientCode parameter is the client code of the client to retrieve task definitions for. 

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

Each task definition is represented by a TTask object. The list of task definitions is in the returned TAuthTaskList object. 

Note that if the client is enrolled in the same task more than once (in different enrolments), that task definition will only appear once in the results. 

Use the UpdateClientTasks function to update the results of tasks returned by this function (which can update multiple enrolled tasks if the same client has multiple enrolments in the same task). 

To get information about results, use other functions such as GetEnrolledTasksForClient

A token is passed for authentication. If the authentication fails, or other errors occur, no task definitions 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.