Skip to main content

Hierarchy

The Hierarchy webservice is referring to the reporting structures in Twinfield.

warning

First use FINDER type HIE web service to request for all reporting structure codes within the organisation. Please click here to go to the finder web service.

Resource location: https://api.<cluster>.twinfield.com/webservices/hierarchies.asmx?wsdl

Load

Use the Load method in order to get information of a particular hierarchy.

public Load : LoadResponse
{
public String hierarchyCode; // The code of the hierarchy for which the information should be read.
}

Bind

Use the Bind method in order to bind accounts to a hierarchy node.

public Bind : BindResponse
{
public Int node; // The node id
public String office; // The office code
public HierarchyAccount Accounts[]; // The dimensions linked to the hierarchy node.
}

public HierarchyAccount
{
public String Type; // The dimension type.
public String Code; // The dimension code.
public HierarchyAccountBalanceType BalanceType; // The balance type of the dimension.
}

public enum HierarchyAccountBalanceType
{
Credit,
Balance,
Debit
}

Unbind

Use the Unbind method in order to unbind accounts from a hierarchy node.

public Unbind : UnbindResponse
{
public Int node; // The node id.
public String office; // The office code.
public HierarchyAccount Accounts[]; // The dimensions linked to the hierarchy node.
}

public HierarchyAccount
{
public String Type; // The dimension type.
public String Code; // The dimension code.
public HierarchyAccountBalanceType BalanceType; // The balance type of the dimension.
}

public enum HierarchyAccountBalanceType
{
Credit,
Balance,
Debit
}

Save

Use the Save method in order to save information of a particular hierarchy.

public Save : SaveResponse
{
public Hierarchy hierarchy[]; // Detailed information of the hierarchy.
}

public Hierarchy
{
public String Code; // The code of the hierarchy.
public String Name; // The name of the hierarchy.
public String Description; // The description of the hierarchy.
public HierarchyNode Rootnode; // The root node of the hierarchy.
public HierarchyAccess AccessRights[]; // The access rights to the hierarchy.
public Int Touched; // The number of times the hierarchy was changed.
}

public HierarchyNode
{
public Int Id; // Internal id.
public String Code; // The code of the hierarchy node.
public String Name; // The name of the hierarchy node.
public String Description; // The description of the hierarchy node.
public HierarchyAccount Accounts[]; // The dimensions linked to the hierarchy node.
publicHierarchyNode ChildNodes[]; // The child nodes of the hierarchy node.
public MessageOfHierarchySaveMessage Messages[];
public Int Touched; // the number of times the hierarchy node was changed.
}

public HierarchyAccount
{
public String Type; // The dimension type.
public String Code; // The dimension code.
public HierarchyAccountBalanceType BalanceType; // The balance type of the dimension.
}

public enum HierarchyAccountBalanceType
{
Credit,
Balance,
Debit
}

public HierarchyAccess
{
public HierarchyAccessType Type; // The access type.
public String OfficeCode; // The code of the office.
public String RoleCode; // The code of the role.
public String UserCode; // The code of the user.
public String Messages[];
public Boolean AccessRightTabAccesible //The access rights tab accessible or not.
}

public enum HierarchyAccessType
{
None,
Use,
Bind,
Edit
}

public MessageOfHierarchySaveMessage
{
public MessageOfHierarchySaveMessageType Type;
public String Text;
public MessageOfHierarchySaveMessageCode Code;
public String Parameters[];
}

public enum MessageOfHierarchySaveMessageType
{
Error,
Warning,
Informational
}

public enum MessageOfHierarchySaveMessageCode
{
Touched,
InvalidCode,
InvalidName,
InvalidDescription,
InvalidNodes,
InvalidAccessRights,
AccessDenied,
DefaultInOffice
}

Hide

Use the Hide method in order to hide a particular hierarchy.

public Hide : HideResponse
{
public String hierarchyCode; // The code of the hierarchy which needs to hide.
}