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

Add a new Client Event. 

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

The new Client 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 client code 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 not null, it cannot be before EventStart.
  • Complete must be a valid event completed flag, 0 = Not Completed, 1 = Completed.
  • StaffCode can be null. If not null, it must be the code of a valid staff member.
  • EnrolmentId or ContractId can optionally be used to link the event to an enrolment or contract. They can both be null or 0, or one of them set, but not both set. If one of them is set, that enrolment or contract must belong to the client that the event is being attached to.
 

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 a client 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 client event")]
public TAuthID AddClientEvent(string token, TEven eEvent);
Parameters 
Description 
string token 
String Token. 
TEven eEvent 
TEven object containing client 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.