Gets a list of occurrences that a staff member is associated with in various ways.
This will return occurrences that a staff member is associated with through the occurrence itself and/or the occurrence's classes. The occurrence and/or the occurrence's classes dates must overlap the specified date range to be included. For the occurrence itself, you can optionally only include staff members when the staff member is assigned with a particular type.
The results are represented in a list of TOccuStaffLinks, one per occurrence that is linked in any way. Each one contains the occurrence itself in a TOccu. Each one also contains a list of TStaffLink that describes each way that the occurrence is linked to this staff member.
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.
Requires a valid registration key entry for the Short Courses 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.
[WebMethod(Description = "Gets a list of occurrences that a staff member is associated with in various ways")] public TAuthOccuStaffLinksList GetOccurrencesForStaff(string token, string staffClientCode, bool includeClasses, bool includeOccurrence, DateTime startDate, DateTime endDate, string staffType);
Parameters |
Description |
string token |
Mandatory string containing a token. |
string staffClientCode |
The client code of the staff member to get occurrences for. |
bool includeClasses |
If true, includes the occurrences where the staff member is assigned to any of the occurrence's classes where the class overlaps the start and end dates |
bool includeOccurrence |
If true, includes the occurrences that the staff member is assigned to, and the occurrence overlaps the start and end dates, and, if the staff type is specified, the staff member is assigned to the occurrence with that staff type |
string staffType |
Optional string of the staff type to consider. If this is specified, only occurrences to which 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 |
TAuthOccuStaffLinksList containing the occurrences that the staff member is associated with and match the criteria
Copyright (c) VETtrak 2022. All rights reserved.
|