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

Search for Employers with a name matching a search string. 

Use searchOption to specify how to match the searchString to the employer names. Options are contains search, starts with search, and exact match. 

The sinceDate parameter is optional. If it is specified, only employers created or last modified since the specified date/time are returned. 

The search is NOT case sensitive. 

Returns an Authenticated Employer List containing employers who match the specified criteria. 

Each Employer is represented by a TEmpl. The collection of matching Employers is represented by a List of TEmpl

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

This function has security level "Protected", and can only be accessed by users that have explicitly been granted permission to the API.

C#
[WebMethod(Description = "Gets a list of employers with a name matching the specified search string, optionally since a date")]
public TAuthEmplList SearchForEmployer(string token, string searchString, int searchOption, DateTime? sinceDate);
Parameters 
Description 
string token 
String Token. 
string searchString 
Search string used to match against Employer names. Maximum length 100 characters. 
int searchOption 
Integer indicates how to match the searchString against employer names. Must be one of the following:
  • 0: Contains search. Employers whose name contains the search string will be returned.
  • 1: Starts with search. Employers whose name starts with the search string will be returned.
  • 2: Exact match search. Only the employer whose name exactly matches the search string, if any, will be returned. Since employer names are unique, this option will return a list containing only one employer at most. 
DateTime? sinceDate 
Optional date time. If specified, only employers created or last modified after this date are returned. 

TAuthEmplList : an Authenticated List of matching Employers.

Copyright (c) VETtrak 2022. All rights reserved.