API Overview
GreenPlaces provides a RESTful API to help manage select data within the GreenPlaces platform. To request API access, please contact your account manager.
The GreenPlaces API is organized around REST. Our API has resource-oriented URLs, accepts form-encoded request bodies, returns JSON-encoded responses, and uses standard HTTP response codes, authentication, and request types.
Versioning
The GreenPlaces-Version
request header should be included in every request. Versions are structured as a date in the format of YYYYMMDD
. If an incorrect version is provided, a 400
error code will be returned with a message of Invalid API Version
. Currently, the 20230531
version should be used. When a major version is released, you will not need to update your requests or response handling, as a new version identifier will be used.
Sorting and Paginating
Endpoints that return multiple models accept a standard parameter set for sorting and paginating results. These parameters are outlined below:
sort_by
The property to sort the data by in the response.
Any property that is available on the model.
created_at
sort_dir
The direction to sort the data. This is typically a natural sorting method.
asc
, desc
desc
per_page
The max number of models to return in a response.
Any integer.
10
Filtering
Endpoints that return multiple models also offer some filtering options that are outlined in the documentation for that model. For example, Expenses for a certain range can be transacted_from
and transacted_to
parameters. This will return expenses that were transacted during the provided date range.
Authentication
Please see the Authentication documentation for information on how to receive a Bearer token for using with the API.
Specification
Please see the below OpenAPI specification that can be used with Postman.
Last updated