User Information

It's possible to retrieve information about the account of the current client user. This is a two-step process. First make a call to the function GetUserRole. The result is a single record of the UserRoles EntitySet. It contains information about the role of the current user. To identify the role of the user and get the internal id of the entity, locate the property which is not null. For every role there is an id field (e.g TravelerId, TransporterId etc.) and the field which is not null contains the internal id of that user. For instance, when the TransporterId property is not null and has a value of 1 the current user has a Transporter role and is known under the internal id of 1. The full Transporter record can be requested by issuing a GET request to:

/Transporters/1

The record contains more interesting information. It contains the userid of the linked account. This is different from the role entity because user accounts are stored separate from the rest of the data. This is an extra security measure. The combination of userid and the appropriate entity id links the two together. The userid can be used to perform account specific task like resetting the password. It can also be used to retrieve specific account information via de AccountsSummary EntitySet. See the Accounts section for more information.

Role only

If you're only interested in the role of the current user you can request this role by executing a GET request to

/GetRole

This returns a single numeric value. This value is part of an enumeration of the different roles in the system. The reference contains the possible values of the Role enumeration. For example, the function returns 3. Looking at the enums a value of 3 corresponds to Transporter. Enums are 0-based.