In response to requests, you'll always receive a JSON object containing any number of potential fields. Details for the fields that will be returned from any request are outlined in this documentation with each endpoint.
All responses will be a JSON-encoded and will be accompanied with an apprpriate content type header of application/json
.
If you receive a request that does not have this header, it is likely a server issue and we will have been notified.
Each field has a specific type that lets you know what sort of data you can expect to receive. There are numerous types of data available.
In some cases, the API will need to return an array. In these cases, the array will simply contain items of the type specified.
The API allows you to customise which fields are returned when you make a request. By default, you'll receive the fields shown in the documentation however these can be expanded or contracted on a per-request basis to include more or less of the underlying objects.
X-Field-Spec
header with your request. This header should be a string which conforms to this specification:
id,title
- will only return the ID & title fields from the root of the request.id,user[name]
- will only return the ID and the name of the underlying user.title,user
- will only return the title and the full object representing the user.id,user[name,country[name]]
- will only return the ID, the user's name and the name of the user's associated country.