Support
View guides

StuRents API v1.2

This API is designed around RESTful principles to give you access to fetch and alter property data on StuRents.

End Points

Action URL Method Authentication
List Houses GET Public key Read documentation
Create Single House POST Auth key Read documentation
Update Single House PUT Auth key Read documentation

Fetching data from the API

You will need a landlord ID and an public key to fetch data.

You need to sign-in to see this information

Add the following query string parameters to the URL which you are requesting:

Param name Description
landlord your landlord ID
public your public key
version the API version you wish to access (these docs for 1.2)
page for long lists of data, the page you wish to access (optional)

The body of the request will be ignored.

Sending data to the API

You will need a landlord ID and an API key to send data.

You need to sign-in to see this information

The body of the request must be JSON encoded data relevant to the endpoint you are submitting to.

Add the following query string parameters to the URL which you are requesting:

Query string parameter Description
landlord numeric field, its your landlord id
auth a hash generated from the JSON body and the landlord's auth key, see below
version the API version you wish to access (currently 1.2)
Generate an auth key

The request URL query string must contain the parameter auth which uses the landlord's API key in a hash with the rest of your posted data. To avoid any complexities we have a fairly rigid process to generate this authentication hash:

  • Append the API key to the end of the JSON string
  • Generate an md5 hash of the string

An example of this code as written in PHP is as follows:

$data_string = json_encode($data_parameters);
$data_string .= $api_key;
$auth_token = md5($data_string);

Ensure that you carry out this operation after any URL encoding operations are performed on the data; if any of the parameter values are changed following this operation our generated token will be different and authentication will fail.

Our API is rate limited for identical requests, if you are constantly receiving an error code 429, please reduce the frequency of your requests. Identical requests are those with the exact same query parameter values. We strongly encourage that if you are encountering this issue during local development you cache/save the response from the API.

We have a support email for developers if you have any questions or encounter problems whilst using the API.