Getting Started

This section will introduce you to all the information that you are going to need in order to start your integration of our content API. You will be given access to all the resources detailed in this section as soon as your registration has been approved.

Information you will need

Test environment URL:

Live environment endpoint:

Agency Details:

These have 3 parts:

Org
User
Password

Content Data Formats

Our content API is provided in dual data formats, allowing you to return data in either JSON or XML depending on the format that best suites your application. Selecting the data format is done by including either of the following headers in your HTTP POST:

Content-Type: application/json
Or
Content-Type: application/xml

How to send JSON requests

To communicate with the content API Service, use an HTTP POST request.

POST https://content.stuba.com/ [Endpoint]
Headers:
Content-Type: application/json
Content-Length: [Length of the content]
Host: [Web service hostname]
Accept-Encoding: gzip,br

Body:
{
“Authority”: {
“Org”: “{{Org}}”,
“User”: “{{User}}”,
“Password”: “{{Password}}”
}
}

How to send XML requests

The simplest method of sending a request is to send the XML directly in the body of an HTTP POST. The raw HTTP data for such a request looks like:

POST [The path to the Web service] HTTP/1.1
Content-Type: text/xml
Content-Length: [Length of the content]
Host: [Web service hostname]

 

<AvailabilitySearch>
<Authority>
<Org>[Your login organisation]</Org>
<User>[Your login username]</User>
<Password>[Your password]</Password>
<Currency>[Your currency]</Currency>
<Version>[Required version (currently 1.28)]</Version>
</Authority>
</AvailabilitySearch>

 

In practice though, most development platforms provide a simple mechanism to send such a request without the need to generate the headers yourself.