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

Get a list of ancestors for a division. This is effectively the path to the division through the division tree. 

Specify the integer ID of a division to get the ancestors for. Returns a list of divisions, each one represented by a TDivision object. The divisions are in order from the Root Division down to the specified division. Note that the specified division is also included in the return value as the last division in the list. 

A token is passed for authentication. If the authentication fails, or other errors occur, the divisions are not 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 the ancestors of a division by ID")]
public TAuthDivisionList GetDivisionAncestors(string token, int divisionId);
Parameters 
Description 
string token 
String containing a token. 
int divisionId 
Integer ID of division to retrieve ancestors for. 

TAuthDivisionList : an Authenticated list of ancestor Divisions.

Copyright (c) VETtrak 2022. All rights reserved.