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

Gets a list of staff members that are associated with a client in various ways. 

This will return staff that are associated with the client through classes, enrolments, contracts and/or events, where those things overlap the specified date range and, optionally, the staff member is assigned with a particular type and/or the status of the enrolments and contracts are of specified types. 

The results are represented in a list of TClieStaffLinks, one per staff member that is linked in any way. Each one contains the staff member itself in a TClie. Each one also contains a list of TStaffLink that describes each way that this staff member is linked to the client. 

A token is passed for authentication. If the authentication fails, or other errors occur, no data will be 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 staff members associated with a client in various ways")]
public TAuthClieStaffLinksList GetStaffForClient(string token, string clientCode, bool includeClasses, bool includeEnrolments, bool includeContracts, bool includeEvents, DateTime startDate, DateTime endDate, string staffType, List<int> statusTypes);
Parameters 
Description 
string token 
Mandatory string containing a token. 
string clientCode 
The code of the client to get staff members for. 
bool includeClasses 
If true, includes the staff members assigned to any of the client's classes where the class overlaps the start and end dates 
bool includeEnrolments 
If true, includes the staff members assigned to any of the client's enrolments where the enrolment overlaps the start and end dates and, if the staff type is specified, the staff member is assigned to the enrolment with that staff type 
bool includeContracts 
If true, includes the staff members assigned to any of the client's contracts where the contract overlaps the start and end dates and, if the staff type is specified, the staff member is assigned to the contract with that staff type 
bool includeEvents 
If true, includes the staff members assigned to any of the client's events where the event overlaps the start and end dates 
DateTime startDate 
The start date of the range in which to consider classes, enrolments, contracts and events 
DateTime endDate 
The end date of the range in which to consider classes, enrolments, contracts and events 
string staffType 
Optional string of the staff type to consider. If this is specified, only contracts and enrolments where the staff member is assigned with this type are considered. A list of valid staff types can be obtained by calling GetStaffTypes. Pass an empty or null string to ignore staff type 
List<int> statusTypes 
Optional list of status types to consider. If this is specified, only enrolments or contracts with a status type that is in the specified list are considered. If the list is not specified or is empty, all enrolment and contract statuses are considered. Each item in the list can be one of the following integers:
  • 0: Active
  • 1: Completed
  • 9: Cancelled 

TAuthClieStaffLinksList containing the staff members that are associated with this client and match the criteria

Copyright (c) VETtrak 2022. All rights reserved.