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

Add a new Employer Event. 

Returns a TAuthID object containing the EventID of the new event. 

The new Employer Event details are represented by a TEven parameter (eEvent). 

The following properties of the eEvent parameter, and restrictions on their values, are used for the update:

  • Identifier must be a valid employer identifier to attach the event to.
  • EventName must be a valid event name. A list of these names can be obtained from the Name property in each TEventType in the list returned by GetEventTypes.
  • EventStart must be a valid date.
  • EventFinish can be null. If it is not null, it cannot be before EventStart.
  • Complete must be a valid event completed flag, 0 = Not Completed, 1 = Completed.
  • StaffCode can be null or empty. If not null or empty, it must be the code of a valid staff member.
 

The EventID property of the eEvent parameter is ignored, as the new event will have an EventID generated. The EventType property is also ignored, as it is assumed to be an employer event. 

A token is passed for authentication. If the authentication fails, or other errors occur, no event details are updated. The result of the authentication and update is represented by a TAuthenticate object. 

Requires a valid registration key entry for the Event Management feature. 

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 = "Adds a new employer event")]
public TAuthID AddEmployerEvent(string token, TEven eEvent);
Parameters 
Description 
string token 
String Token. 
TEven eEvent 
TEven object containing employer event details to add. 

TAuthID : an authenticate object containing the results of the add and the EventID of the new event.

Copyright (c) VETtrak 2022. All rights reserved.