v2.2 Overview - read only API

Overview

This document defines the Synergist API which is based on REST.

A request needs to include the parameters required for the action being taken. The Synergist username and password are always mandatory parameters. For example:

GET /xmlapi/companies.xml?user=MyUser&password=&page=0&rows=0
(example in a browser: http://dev/xmlapi/companies.xml?user=user&password=user&page=1&rows=10)

or

GET /xmlapi/companies.xml?user=MyUser&md5password=&page=1&rows=10)

would retrieve an XML structure containing all valid companies that the supplied user has access to.

General parameters for all requests

GET /xmlapi/companies.xml?user=MyUser&md5password=&page=0&rows=0

would retrieve an XML structure containing all valid companies that the supplied user has access to.

parametermeaning
userSynergist login ID
passwordsynergist password or md5password
page (optional)Data page to return, page numbering starts at 0
rows (optional)Number of records/rows to return. 0 = return all rows](http://google.com)

Response

When a response is sent which contains multiple records, the root element of the XML tree will have the following attributes:

attributemeaning
TotalRowsthis will be the total number of records/rows in the selection, regardless of page requested
TotalPagesthis will be the total number of pages available, based on the rows parameter supplied
MorePagesthis will be True if further pages of data are available or False if you have fetched the last page

In case of any error, the Synergist server will return an HTTP 404 error together with a structure containing the error details:

<Errors>  
    <Error>  
        <ErrorID>404004</ErrorID>  
        <ErrorText>request not recognised</ErrorText>  
    </Error>  
</Errors>

The following table lists errors that apply to all requests:-

error iderror text
404001no credentials supplied
404002invalid credentials supplied
404003account disabled
404004request not recognised