Skip to main content
Skip table of contents

Web Service API - Basics

Almost all requests via the web service require a valid ticket. You can obtain this by calling the "Login" method.

The web service knows which user the ticket belongs to. If a ticket is not used for 30 minutes, it is automatically deleted, and the client must log in to the web service again. If a method is called with the ticket, the timer is reset to 30 minutes.

Method call

All web service API methods are called using http/POST.

Structure

Each web service API method has the same basic structure. An object of type Request<T> is passed as the body. This returns an object of type Response<IList<T>>. Some web service methods always return only one element (e.g., the Login method). Others return a list (e.g., GetAccountTypes).

Example request login method

{ "Ticket": "Text", "TrimResponse": 0, "Data": { "AppVersion": "Text", "Application": "Text", "Device": "Text", "LoginKind": 0, "Password": "Text", "Username": "Text" }}

In the example, "Data" is the generic object T of Request.

Example response Login method

{ "Message": "Text", "MessageCode": 123, "Status": 0, "Result": [ "Text" ]}

In the example, "Result" is the generic object of IList<T>. The Login method, for example, returns a string back. IList<string>.

Date format

We use DataContractJsonSerializer for the conversion. It uses a Unix epoch timestamp (with milliseconds and time zone) for the date format.

Methods with paging support

The web service API has methods that support paging. The method name usually ends with WithPaging or ThroughPaging. For these methods, Page and EntriesPerPage must be set in the request.

If you want to get all results back, one option is to set Page = 1 and EntriesPerPage = int.MaxValue.

If paging is desired. Pass Page = 1 and EntriesPerPage = [desired number of elements per page] on the first call. The method not only returns the hits, but also the number of available pages and the total number of hits for the search.

{ "Ticket": "Text", "TrimResponse": 0, "Data": { "EntriesPerPage": 20, "Filter": { "IsActive": true, "SearchText": "Text" }, "Page": 1 }}

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.