Responses

All non-empty response bodies, including errors, will be formatted as JSON objects. In general, a successful GET request (or any other request that retrieves data) will return an object with the data contained inside a single key-value pair. This key is always associated with the relevant endpoint. For example, GET /api/v1/company_clients will return an object with users as the key and the list of users as its value.

If You are fetching multiple entries, such as the previous GET /api/v1/users example, the data will be returned as a list. If you are fetching a single entry, such as GET api/v1/users/31175, the data will be returned as a single object.

Additionally, InvestGlass's API use standard HTTP status codes to indicate the status of a request.

Below is a brief overview of the most common status codes

CodeDefinition
1xxInformational.
2xxSuccess.
201Created - Returned after a new object was created. Typically, the newly created object will be available in the response body.
204No Content - Usually returned on a DELETE request. This indicates that the object was successfully removed, but there is no actual data to return.
4xxClient-side error.
400Bad Request - There was an issue with the given parameters. This could be due to a missing required field, a malformed parameter, etc.
401Unauthorized - The API credentials or access token used is incorrect.
403Forbidden - You do not have access to the requested endpoint or action.
404Not Found - Returned if the given resource either does not exist or you do not have access to it.
409Conflict - This indicates that you are trying to perform an action that would interrupt or conflict with another ongoing action.
5xxServer Error
500Internal Server Error - There are internal or API-related errors on InvestGlass's side. Additional requests will not resolve the issue.
503Service Unavailable - The targeted endpoint is currently unavailable. This is caused by temporary issues; access to the endpoint will return momentarily.