Formats
Dates
Dates are encoded as strings following the ISO 8601 standard 2021-08-01T12:00:00.000Z.
Pagination
A maximum of 100 objects can be returned per request and the limit can be specified by using the pageSize query parameter. By default, pageSize is set to 25.
Metadata
Some objects have a metadata parameter that you can use to store key-value data.
You may specify up to 20 keys, with key names up to 40 characters long and values up to 250 characters long.
Errors
The API returns standard HTTP response codes to indicate success or failure of API requests. Errors may include a custom error message. Error objects have these attributes, an id, a message corresponding to the HTTP response phrase of the error, an optional invalid-params attribute detailing issues with the request.
An example error object returned from the API:
{
error: {
code: 'bad_request',
title: 'Bad request',
message: 'Something is wrong with your request, please check any parameters and try again',
reasons: ['amount is a required field']
}
}
A summary of the HTTP status codes returned from the api is listed in the table below.
| Code | Title | Description |
|---|---|---|
| 200 | Success | Request successful |
| 204 | No Content | Request successful with no content returned |
| 400 | Bad Request | Request was invalid |
| 401 | Unauthorised | Authorization header is invalid |
| 403 | Forbidden | Insufficient permissions |
| 404 | Not Found | Resource does not exist |
| 429 | Too Many Requests | Rate Limited |
| 500s | Internal Server Error | Something went wrong with the Goodstack API |