Responses

The PredictHQ API will respond to successful requests with either a collection of records or a single record. This section describes the standard format for each record type. Refer to the Resources section for a description of the results for each endpoint.


Headers

Content Negotiation

The PredictHQ API will always respond with the Content-Type header set to the format requested via the Accept header. Requests for a format not supported by the API will be rejected with the 406 Not Acceptable status code.


Collections

When requesting a collection of records, the JSON object will always contain the following properties:

Property Description
count The total number of results.
previous A URL to the previous page, or null if this is the first page.
next A URL to the next page, or null if this is the last page.
results An array of records.

Records

When requesting a single record, it will be returned as a JSON object. Refer to the Resources section for a description of possible records.