General API resources
Here you will find information about how to get started and generic troubleshooting.
Authentication
All API calls require valid authentication (part from /auth).
To provide authentication to your API call, you need to add an Authorization header with valid credentials.
Bearer
To authenticate using the bearer method, add an Authorization header with the contents of the header being Bearer {token} where {token} is your API token.
Authorization: Bearer {token}
See Authentication for more details on how to generate an API token.
Basic
To authenticate using the basic method, add an Authorization header with the contents of the header being Basic {base64} where {base64} is a base64 encoded string of "{credentials_id}:{credentials_secret}".
Authorization: Basic {base64}
See Authentication for more details on how to generate an API token.
API response
Tirix follows the REST architectural style for it's API and conforms to generic HTTP response standards.
HTTP status codes
Tirix returns standard HTTP response codes.
Success
| Code | Name | Description |
|---|---|---|
| 200 | OK | The request succeeded. |
| 201 | Created | The request succeeded, and a new resource was created as a result. |
| 202 | Accepted | The request has been received but not yet acted upon. |
| 204 | No Content | The request succeeded, but here is no content to send for this request |
Request error
| Code | Name | Description |
|---|---|---|
| 400 | Bad Request | Unable to process request due to an error in the shape of the request. Verify that the request matches the endpoint specifications. |
| 401 | Unauthorized | |
| 403 | Forbidden | |
| 404 | Not Found | |
| 405 | Method Not Allowed | |
| 429 | Too Many Requests | There were too many requests made to the API. Read more on rate limits and daily request quota. |
Internal error
| Code | Name | Description |
|---|---|---|
| 408 | Request Timeout | |
| 500 | Internal Server Error | |
| 502 | Bad Gateway | |
| 503 | Service Unavailable | |
| 504 | Gateway Timeout |
More info on HTTP response codes can be found on Mozilla Developer Network.
Common object schemas
Schema: Address
| Property | Type | Description |
|---|---|---|
| name | String | Address name |
| address1 | String | First address line (street name) |
| address2 | String | Second address line |
| postal_code | String | Postal code |
| city | String | City |
| state | String | (optional) State |
| country | String | Country code (ISO 3166-1 alpha-3) |
