2020-10-02 v1.5.3
- Volume
period
parameter has been removed. Now it is always summarized by month.
The PrintReleaf API is organized around REST to have predictable, resource-oriented URLs, and uses HTTP response codes to indicate API errors.
It uses built-in HTTP features, like HTTP authentication and HTTP verbs, which are understood by off-the-shelf HTTP clients. JSON is returned in all responses from the API, including errors, and is expected as the body for all requests.
Accounts in PrintReleaf are hierarchical, meaning every account can have one parent account and an arbitrary number of child accounts. Each account has a role that determines its abilities.
By default, all resources of the Core API are scoped to your account. The same resources can be accessed for any of your child accounts:
Default Scope: |
/certificates /certificates/:id
|
Account Scope: |
/accounts/:account_id/certificates /accounts/:account_id/certificates/:id
|
https://api.printreleaf.com/v1/
You authenticate to the PrintReleaf API by including your API keys in the request. You can manage your API keys from your PrintReleaf Dashboard.
Authentication to the PrintReleaf API is performed via HTTP Basic Auth. Provide your API key as the basic auth username value. You do not need to provide a password.
All API requests must be made over HTTPS. Calls made over plain HTTP will fail. API requests without authentication will also fail.
# Example Request
$ curl https://api.printreleaf.com/v1/ -u c7686125c49022c9fd3f9662bd2a8:
# curl uses the -u flag to pass basic auth credentials (adding a colon after your API key prevents cURL from asking for a password).
The PrintReleaf API uses conventional HTTP response codes to indicate success or failure of an API request. In general, codes in the 2xx range indicate success, codes in the 4xx range indicate an error that resulted from the provided information (e.g. a required parameter was missing, etc.), and codes in the 5xx range indicate an error with PrintReleaf's servers.
// Example Error Object
{
"code": 404,
"error": "Object not found"
}
The PrintReleaf API employs two usage models that can be used independently or in combination:
Transactions are realtime exchanges of paper consumption for reforested trees.
When creating a transaction, you have the option to:
quote_id
to convert a quote to a transactionIn return, when the transaction is created, you will immediately receive a certificate of reforestation as a receipt of the transaction.
This model is ideal for transactional applications; for example, a point-of-sale integration for print jobs.
Using Transactions ›Deposits are periodic additions of paper consumption data to an account.
Over the course of a month, you periodically add deposits to an account; for example, daily meter reads from a device, fleet, or entire business. At the end of the month, the deposits are batched and summed to determine the account's total consumption during that month. A transaction is then automatically executed for the total consumption and the account receives a certificate of reforestation as a receipt of the transaction.
This model is ideal for subscription applications where an account accrues paper consumption over time to be executed as a single big transaction rather than many small transactions.
Our integrations with third-party print monitoring software (FMAudit, PrintFleet, etc.) are powered by this deposits model. Every day our data collectors gather paper consumption data from the print monitoring software and create a deposit for the day's consumption.
Using Deposits ›Retrieves the details of your account.
GET /account
Returns an expanded account object.
// Example Response
{
"id": "a2c031fa-6599-4939-8bc6-8128881953c4",
"name": "Channel 123",
"display_name": "Channel 123",
"role": "channel",
"created_at": "2018-03-08T14:52:33Z",
"parent_id": null,
"external_id": null,
"status": "active",
"activated_at": "2018-03-08T14:52:33Z",
"deactivated_at": null,
"accounts_count": 2,
"users_count": 2,
"mtd_pages": 1234,
"qtd_pages": 12345,
"ytd_pages": 123456,
"ltd_pages": 1234567,
"mtd_trees": 0.15,
"qtd_trees": 1.48,
"ytd_trees": 14.82,
"ltd_trees": 148.0
}
Lists all accounts.
GET /accounts
Returns an array of account objects, sorted alphabetically.
// Example Response
[
{
"id": "971d10ac-a912-42c0-aa41-f55adc7b6755",
"name": "Customer ABC",
"display_name": "Customer ABC",
"role": "customer",
"created_at": "2019-03-08T14:52:33Z",
"parent_id": "a2c031fa-6599-4939-8bc6-8128881953c4",
"external_id": null,
"status": "active",
"activated_at": "2019-03-08T14:52:33Z",
"deactivated_at": null
},
{
"id": "415a588e-c6f6-46a8-a04f-96423f7e518d",
"name": "Customer DEF",
"display_name": "Customer DEF",
"role": "customer",
"created_at": "2020-03-08T14:52:33Z",
"parent_id": "a2c031fa-6599-4939-8bc6-8128881953c4",
"external_id": null,
"status": "inactive",
"activated_at": "2020-03-08T14:52:33Z",
"deactivated_at": "2020-09-08T14:52:33Z"
}
]
Retrieves the details of an account.
GET /accounts/:id
Returns an expanded account object if a valid identifier was provided, and returns an error otherwise.
// Example Response
{
"id": "971d10ac-a912-42c0-aa41-f55adc7b6755",
"name": "Customer ABC",
"display_name": "Customer ABC",
"role": "customer",
"created_at": "2019-03-08T14:52:33Z",
"parent_id": "a2c031fa-6599-4939-8bc6-8128881953c4",
"external_id": null,
"status": "active",
"activated_at": "2019-03-08T14:52:33Z",
"deactivated_at": null,
"accounts_count": 0,
"users_count": 3,
"mtd_pages": 1234,
"qtd_pages": 12345,
"ytd_pages": 123456,
"ltd_pages": 1234567,
"mtd_trees": 0.15,
"qtd_trees": 1.48,
"ytd_trees": 14.82,
"ltd_trees": 148.0
}
To create a new account, supply a name for the account.
POST /accounts
Returns the new expanded account object if valid information was provided, and returns an error otherwise.
// Example Request
{
"name": "Customer GHI"
}
// Example Response
{
"id": "6dd962a0-a515-4a83-980e-d3bd7cbb243a",
"name": "Customer GHI",
"display_name": "Customer GHI",
"role": "customer",
"created_at": "2021-03-08T14:52:33Z",
"parent_id": "a2c031fa-6599-4939-8bc6-8128881953c4",
"external_id": null,
"status": "active",
"activated_at": "2021-03-08T14:52:33Z",
"deactivated_at": null,
"accounts_count": 0,
"users_count": 0,
"mtd_pages": 0,
"qtd_pages": 0,
"ytd_pages": 0,
"ltd_pages": 0,
"mtd_trees": 0.0,
"qtd_trees": 0.0,
"ytd_trees": 0.0,
"ltd_trees": 0.0
}
Updates the specified account by setting the values of the parameters passed. Any parameters not provided will be left unchanged.
PATCH /accounts/:id
Returns the updated expanded account object if valid information was provided, and returns an error otherwise.
// Example Request
{
"name": "Customer JKL"
}
// Example Response
{
"id": "6dd962a0-a515-4a83-980e-d3bd7cbb243a",
"name": "Customer JKL",
"display_name": "Customer GHI",
"role": "customer",
"created_at": "2021-03-08T14:52:33Z",
"parent_id": "a2c031fa-6599-4939-8bc6-8128881953c4",
"external_id": null,
"status": "active",
"activated_at": "2021-03-08T14:52:33Z",
"deactivated_at": null,
"accounts_count": 0,
"users_count": 0,
"mtd_pages": 0,
"qtd_pages": 0,
"ytd_pages": 0,
"ltd_pages": 0,
"mtd_trees": 0.0,
"qtd_trees": 0.0,
"ytd_trees": 0.0,
"ltd_trees": 0.0
}
Activates the specified account.
POST /accounts/:id/activate
Returns the updated expanded account object if valid information was provided, and returns an error otherwise.
// Example Response
{
"id": "415a588e-c6f6-46a8-a04f-96423f7e518d",
"name": "Customer DEF",
"display_name": "Customer DEF",
"role": "customer",
"created_at": "2020-03-08T14:52:33Z",
"parent_id": "a2c031fa-6599-4939-8bc6-8128881953c4",
"external_id": null,
"status": "active",
"activated_at": "2021-03-08T14:52:33Z",
"deactivated_at": "2020-09-08T14:52:33Z",
"accounts_count": 0,
"users_count": 1,
"mtd_pages": 2468,
"qtd_pages": 24690,
"ytd_pages": 246912,
"ltd_pages": 2469134,
"mtd_trees": 0.3,
"qtd_trees": 2.96,
"ytd_trees": 29.63,
"ltd_trees": 296.0
}
Dectivates the specified account. Deactivating an account stops data collection, effectively pausing reforestation service.
Once deactivated, users of the account will still be able to sign into their PrintReleaf account to monitor the forests they've already planted, but their account will no longer accrue reforestated pages.
If you need to permanently delete an account, please contact support.
POST /accounts/:id/deactivate
Returns the updated expanded account object if valid information was provided, and returns an error otherwise.
// Example Response
{
"id": "415a588e-c6f6-46a8-a04f-96423f7e518d",
"name": "Customer DEF",
"display_name": "Customer DEF",
"role": "customer",
"created_at": "2020-03-08T14:52:33Z",
"parent_id": "a2c031fa-6599-4939-8bc6-8128881953c4",
"external_id": null,
"status": "inactive",
"activated_at": "2020-03-08T14:52:33Z",
"deactivated_at": "2021-03-08T14:52:33Z",
"accounts_count": 0,
"users_count": 1,
"mtd_pages": 2468,
"qtd_pages": 24690,
"ytd_pages": 246912,
"ltd_pages": 2469134,
"mtd_trees": 0.3,
"qtd_trees": 2.96,
"ytd_trees": 29.63,
"ltd_trees": 296.0
}
Lists all certificates.
GET /certificates
Returns an array of certificate objects, sorted reverse-chronologically.
// Example Response
[
{
"id": "ae630937-e15b-4da5-98de-bb68eefe2a12",
"account_id": "971d10ac-a912-42c0-aa41-f55adc7b6755",
"date": "2021-02-28T23:59:59Z",
"pages": 2469134,
"trees": 296.0,
"project_id": "5d3b468f-c0a3-4e7c-bed4-2dcce9d3f0f9",
"project": {
"id": "5d3b468f-c0a3-4e7c-bed4-2dcce9d3f0f9",
"name": "Madagascar",
"status": "active",
"forest_latitude": -15.735844444444444,
"forest_longitude": 46.35879166666667,
"content_logo": "http://s3.amazonaws.com/projects/madagascar/logo.jpg",
"content_masthead": "http://s3.amazonaws.com/projects/madagascar/masthead.jpg",
"content_introduction": "Madagascar, due to its isolation...",
"content_body_html": "<h1>Madagascar is one of the most...",
"content_images": [
"http://s3.amazonaws.com/projects/madagascar/1.jpg",
"http://s3.amazonaws.com/projects/madagascar/2.jpg",
"http://s3.amazonaws.com/projects/madagascar/3.jpg"
]
},
"url": "https://printreleaf.com/certificates/ae630937-e15b-4da5-98de-bb68eefe2a12",
"pdf_url": "https://printreleaf.com/certificates/ae630937-e15b-4da5-98de-bb68eefe2a12.pdf"
},
{
"id": "dfd1cdfc-8535-43d8-8987-9817580ebd2e",
"account_id": "971d10ac-a912-42c0-aa41-f55adc7b6755",
"date": "2021-01-31T23:59:59Z",
"pages": 469134,
"trees": 56.3,
"project_id": "692bb68d-64aa-4a79-8a08-d373fb0d8752",
"project": {
"id": "692bb68d-64aa-4a79-8a08-d373fb0d8752",
"name": "Ethiopia",
"status": "complete",
"forest_latitude": 6.7029261,
"forest_longitude": 38.7062503,
"content_logo": "http://s3.amazonaws.com/projects/ethiopia/logo.jpg",
"content_masthead": "http://s3.amazonaws.com/projects/ethiopia/masthead.jpg",
"content_introduction": "In Ethiopia deforestation...",
"content_body_html": "<h1>Due to the absence of...",
"content_images": [
"http://s3.amazonaws.com/projects/ethiopia/1.jpg",
"http://s3.amazonaws.com/projects/ethiopia/2.jpg",
"http://s3.amazonaws.com/projects/ethiopia/3.jpg"
]
},
"url": "https://printreleaf.com/certificates/dfd1cdfc-8535-43d8-8987-9817580ebd2e",
"pdf_url": "https://printreleaf.com/certificates/dfd1cdfc-8535-43d8-8987-9817580ebd2e.pdf"
}
]
Retrieves the details of a certificate. Supply a certificate identifier.
GET /certificates/:id
Returns a certificate object if a valid identifier was provided, and returns an error otherwise.
// Example Response
{
"id": "ae630937-e15b-4da5-98de-bb68eefe2a12",
"account_id": "971d10ac-a912-42c0-aa41-f55adc7b6755",
"date": "2021-02-28T23:59:59Z",
"pages": 2469134,
"trees": 296.0,
"project_id": "5d3b468f-c0a3-4e7c-bed4-2dcce9d3f0f9",
"project": {
"id": "5d3b468f-c0a3-4e7c-bed4-2dcce9d3f0f9",
"name": "Madagascar",
"status": "active",
"forest_latitude": -15.735844444444444,
"forest_longitude": 46.35879166666667,
"content_logo": "http://s3.amazonaws.com/projects/madagascar/logo.jpg",
"content_masthead": "http://s3.amazonaws.com/projects/madagascar/masthead.jpg",
"content_introduction": "Madagascar, due to its isolation...",
"content_body_html": "<h1>Madagascar is one of the most...",
"content_images": [
"http://s3.amazonaws.com/projects/madagascar/1.jpg",
"http://s3.amazonaws.com/projects/madagascar/2.jpg",
"http://s3.amazonaws.com/projects/madagascar/3.jpg"
]
},
"url": "https://printreleaf.com/certificates/ae630937-e15b-4da5-98de-bb68eefe2a12",
"pdf_url": "https://printreleaf.com/certificates/ae630937-e15b-4da5-98de-bb68eefe2a12.pdf"
}
Deposits are periodic additions of paper consumption data to an account.
Over the course of a month, you periodically add deposits to an account; for example, daily meter reads from a device, fleet, or entire business. At the end of the month, the deposits are batched and summed to determine the account's total consumption during that month. A transaction is then automatically executed for the total consumption and the account receives a certificate of reforestation as a receipt of the transaction.
Lists all deposits.
GET /deposits
GET /deposits?start_date=2021-02-08
YYYY-MM-DD
format.
YYYY-MM-DD
format.
Returns an array of deposit objects, sorted reverse-chronologically by date
.
// Example Response
[
{
"id": "a86d591c-3c29-4bef-82c3-7a007fb6b19c",
"account_id": "971d10ac-a912-42c0-aa41-f55adc7b6755",
"feed_id": "44e182ed-cd50-4fa1-af90-e77dd6d6a78c",
"date": "2016-07-05T12:29:12Z",
"pages": 20000,
"width": 0.2127,
"length": 0.2762,
"density": 216
},
{
"id": "85034431-db14-47c1-a965-632e8471e573",
"account_id": "971d10ac-a912-42c0-aa41-f55adc7b6755",
"feed_id": null,
"date": "2016-07-04T09:45:25Z",
"pages": 16666,
"width": 0.2159,
"length": 0.2794,
"density": 75
}
]
Retrieves the details of a deposit. Supply a deposit identifier.
GET /deposits/:id
Returns an deposit object if a valid identifier was provided, and returns an error otherwise.
// Example Response
{
"id": "a86d591c-3c29-4bef-82c3-7a007fb6b19c",
"account_id": "971d10ac-a912-42c0-aa41-f55adc7b6755",
"feed_id": "44e182ed-cd50-4fa1-af90-e77dd6d6a78c",
"date": "2016-07-05T12:29:12Z",
"pages": 20000,
"width": 0.2127,
"length": 0.2762,
"density": 216
}
Creates a new deposit.
POST /deposits
Returns the new deposit object if valid information was provided, and returns an error otherwise.
// Example Request
{
"pages": 16666
}
// Example Response
{
"id": "85034431-db14-47c1-a965-632e8471e573",
"account_id": "971d10ac-a912-42c0-aa41-f55adc7b6755",
"feed_id": null,
"date": "2016-07-04T09:45:25Z",
"pages": 16666,
"width": 0.2159,
"length": 0.2794,
"density": 75
}
To delete a deposit, supply the deposit identifier.
Deleting a deposit is permitted until the deposit has been converted to a transaction at the end of the period, at which point it becomes locked.
DELETE /deposits/:id
Returns an object with a deleted parameter on success. If the deposit does not exist or deleting this deposit is not permitted, this call returns an an error.
// Example Response
{
"id": "a86d591c-3c29-4bef-82c3-7a007fb6b19c",
"deleted": true
}
Lists the account's selected reforestation projects.
GET /projects
Returns an array of project objects.
// Example Response
[
{
"id": "5d3b468f-c0a3-4e7c-bed4-2dcce9d3f0f9",
"name": "Madagascar",
"status": "active",
"forest_latitude": -15.735844444444444,
"forest_longitude": 46.35879166666667,
"content_logo": "http://s3.amazonaws.com/projects/madagascar/logo.jpg",
"content_masthead": "http://s3.amazonaws.com/projects/madagascar/masthead.jpg",
"content_introduction": "Madagascar, due to its isolation...",
"content_body_html": "<h1>Madagascar is one of the most...",
"content_images": [
"http://s3.amazonaws.com/projects/madagascar/1.jpg",
"http://s3.amazonaws.com/projects/madagascar/2.jpg",
"http://s3.amazonaws.com/projects/madagascar/3.jpg"
]
}
]
To add a reforestation project to favorites, supply the project identifier.
POST /projects/:id
Returns the updated array of project objects.
POST /projects/692bb68d-64aa-4a79-8a08-d373fb0d8752
// Example Response
[
{
"id": "5d3b468f-c0a3-4e7c-bed4-2dcce9d3f0f9",
"name": "Madagascar",
"status": "active",
"forest_latitude": -15.735844444444444,
"forest_longitude": 46.35879166666667,
"content_logo": "http://s3.amazonaws.com/projects/madagascar/logo.jpg",
"content_masthead": "http://s3.amazonaws.com/projects/madagascar/masthead.jpg",
"content_introduction": "Madagascar, due to its isolation...",
"content_body_html": "<h1>Madagascar is one of the most...",
"content_images": [
"http://s3.amazonaws.com/projects/madagascar/1.jpg",
"http://s3.amazonaws.com/projects/madagascar/2.jpg",
"http://s3.amazonaws.com/projects/madagascar/3.jpg"
]
},
{
"id": "692bb68d-64aa-4a79-8a08-d373fb0d8752",
"name": "Ethiopia",
"status": "complete",
"forest_latitude": 6.7029261,
"forest_longitude": 38.7062503,
"content_logo": "http://s3.amazonaws.com/projects/ethiopia/logo.jpg",
"content_masthead": "http://s3.amazonaws.com/projects/ethiopia/masthead.jpg",
"content_introduction": "In Ethiopia deforestation...",
"content_body_html": "<h1>Due to the absence of...",
"content_images": [
"http://s3.amazonaws.com/projects/ethiopia/1.jpg",
"http://s3.amazonaws.com/projects/ethiopia/2.jpg",
"http://s3.amazonaws.com/projects/ethiopia/3.jpg"
]
}
]
To remove a reforestation project from favorites, supply the project identifier.
DELETE /projects/:id
Returns the updated array of project objects.
DELETE /projects/692bb68d-64aa-4a79-8a08-d373fb0d8752
// Example Response
[
{
"id": "5d3b468f-c0a3-4e7c-bed4-2dcce9d3f0f9",
"name": "Madagascar",
"status": "active",
"forest_latitude": -15.735844444444444,
"forest_longitude": 46.35879166666667,
"content_logo": "http://s3.amazonaws.com/projects/madagascar/logo.jpg",
"content_masthead": "http://s3.amazonaws.com/projects/madagascar/masthead.jpg",
"content_introduction": "Madagascar, due to its isolation...",
"content_body_html": "<h1>Madagascar is one of the most...",
"content_images": [
"http://s3.amazonaws.com/projects/madagascar/1.jpg",
"http://s3.amazonaws.com/projects/madagascar/2.jpg",
"http://s3.amazonaws.com/projects/madagascar/3.jpg"
]
}
]
A feed configures an account for automatic collection of page count data from a third-party integration. Feeds create deposits for accounts. An account can have any number of feeds.
Lists all feeds.
GET /feeds
Returns an array of feed objects, sorted reverse-chronologically by activated_at
.
// Example Response
[
{
"id": "06d88c48-c8c3-4b11-a267-18f5b4e8dacc",
"account_id": "415a588e-c6f6-46a8-a04f-96423f7e518d",
"type": "printfleet",
"server_id": "9a6a1ced-4e71-4919-9d6d-25075834c404",
"external_id": "732ec0d3-20e3-439e-94e6-e64b40eb533a",
"collection_scope": "all",
"created_at": "2019-03-08T14:52:33Z",
"status": "inactive",
"activated_at": "2019-03-08T14:52:33Z",
"deactivated_at": "2020-03-08T14:52:33Z",
"health_check": "unhealthy",
"health_check_checked_at": "2021-03-08T14:52:33Z",
"health_check_changed_at": "2021-03-08T14:52:33Z"
},
{
"id": "44e182ed-cd50-4fa1-af90-e77dd6d6a78c",
"account_id": "971d10ac-a912-42c0-aa41-f55adc7b6755",
"type": "fmaudit",
"server_id": "eadabb78-b199-43cb-adbd-ab36ce5c5a10",
"external_id": "456",
"collection_scope": "managed_only",
"created_at": "2020-03-08T14:52:33Z",
"status": "active",
"activated_at": "2020-03-08T14:52:33Z",
"deactivated_at": null,
"health_check": "healthy",
"health_check_checked_at": "2021-03-08T14:52:33Z",
"health_check_changed_at": "2021-03-08T14:52:33Z"
}
]
Retrieves the details of a feed. Supply a feed identifier.
GET /feeds/:id
Returns a feed object if a valid identifier was provided, and returns an error otherwise.
// Example Response
{
"id": "44e182ed-cd50-4fa1-af90-e77dd6d6a78c",
"account_id": "971d10ac-a912-42c0-aa41-f55adc7b6755",
"type": "fmaudit",
"server_id": "eadabb78-b199-43cb-adbd-ab36ce5c5a10",
"external_id": "456",
"collection_scope": "managed_only",
"created_at": "2020-03-08T14:52:33Z",
"status": "active",
"activated_at": "2020-03-08T14:52:33Z",
"deactivated_at": null,
"health_check": "healthy",
"health_check_checked_at": "2021-03-08T14:52:33Z",
"health_check_changed_at": "2021-03-08T14:52:33Z"
}
To create a new feed, supply the type, server identifier, and external id for the feed.
POST /feeds
type
of the feed to create.
Returns the new feed object if valid information was provided, and returns an error otherwise.
// Example Request
{
"type": "printfleet",
"server_id": "9a6a1ced-4e71-4919-9d6d-25075834c404",
"external_id": "732ec0d3-20e3-439e-94e6-e64b40eb533a"
}
// Example Response
{
"id": "06d88c48-c8c3-4b11-a267-18f5b4e8dacc",
"account_id": "415a588e-c6f6-46a8-a04f-96423f7e518d",
"type": "printfleet",
"server_id": "9a6a1ced-4e71-4919-9d6d-25075834c404",
"external_id": "732ec0d3-20e3-439e-94e6-e64b40eb533a",
"collection_scope": "all",
"created_at": "2019-03-08T14:52:33Z",
"status": "active",
"activated_at": "2021-03-08 14:52:33 +0000",
"deactivated_at": null,
"health_check": "unhealthy",
"health_check_checked_at": "2021-03-08T14:52:33Z",
"health_check_changed_at": "2021-03-08T14:52:33Z"
}
Updates the feed by setting the values of the parameters passed. Any parameters not provided will be left unchanged.
PATCH /feeds/:id
Returns the updated feed object if valid information was provided, and returns an error otherwise.
// Example Request
{
"external_id": "732ec0d3-20e3-439e-94e6-e64b40eb533a"
}
// Example Response
{
"id": "06d88c48-c8c3-4b11-a267-18f5b4e8dacc",
"account_id": "415a588e-c6f6-46a8-a04f-96423f7e518d",
"type": "printfleet",
"server_id": "9a6a1ced-4e71-4919-9d6d-25075834c404",
"external_id": "732ec0d3-20e3-439e-94e6-e64b40eb533a",
"collection_scope": "all",
"created_at": "2019-03-08T14:52:33Z",
"status": "inactive",
"activated_at": "2019-03-08T14:52:33Z",
"deactivated_at": "2020-03-08T14:52:33Z",
"health_check": "unhealthy",
"health_check_checked_at": "2021-03-08T14:52:33Z",
"health_check_changed_at": "2021-03-08T14:52:33Z"
}
To delete a feed, supply the feed identifier.
DELETE /feeds/:id
Returns an object with a deleted parameter on success. If the feed does not exist, this call returns an an error.
// Example Response
{
"id": "06d88c48-c8c3-4b11-a267-18f5b4e8dacc",
"deleted": true
}
Activates the specified feed.
POST /feeds/:id/activate
Returns the updated feed object if valid information was provided, and returns an error otherwise.
// Example Response
{
"id": "06d88c48-c8c3-4b11-a267-18f5b4e8dacc",
"account_id": "415a588e-c6f6-46a8-a04f-96423f7e518d",
"type": "printfleet",
"server_id": "9a6a1ced-4e71-4919-9d6d-25075834c404",
"external_id": "732ec0d3-20e3-439e-94e6-e64b40eb533a",
"collection_scope": "all",
"created_at": "2019-03-08T14:52:33Z",
"status": "active",
"activated_at": "2021-03-08T14:52:33Z",
"deactivated_at": "2020-03-08T14:52:33Z",
"health_check": "unhealthy",
"health_check_checked_at": "2021-03-08T14:52:33Z",
"health_check_changed_at": "2021-03-08T14:52:33Z"
}
Dectivates the specified feed. Deactivating a feed stops automatic data collection from that integration.
POST /feeds/:id/deactivate
Returns the updated feed object if valid information was provided, and returns an error otherwise.
// Example Response
{
"id": "06d88c48-c8c3-4b11-a267-18f5b4e8dacc",
"account_id": "415a588e-c6f6-46a8-a04f-96423f7e518d",
"type": "printfleet",
"server_id": "9a6a1ced-4e71-4919-9d6d-25075834c404",
"external_id": "732ec0d3-20e3-439e-94e6-e64b40eb533a",
"collection_scope": "all",
"created_at": "2019-03-08T14:52:33Z",
"status": "inactive",
"activated_at": "2019-03-08T14:52:33Z",
"deactivated_at": "2021-03-08T14:52:33Z",
"health_check": "unhealthy",
"health_check_checked_at": "2021-03-08T14:52:33Z",
"health_check_changed_at": "2021-03-08T14:52:33Z"
}
Lists all quotes.
GET /quotes
Returns an array of quote objects, sorted reverse-chronologically by created_at
.
// Example Response
[
{
"id": "83d12ee9-a187-489d-a93f-3096238f1f86",
"account_id": "971d10ac-a912-42c0-aa41-f55adc7b6755",
"project_id": "5d3b468f-c0a3-4e7c-bed4-2dcce9d3f0f9",
"created_at": "2015-10-22T00:37:11Z",
"trees": 63.047762,
"standard_pages": 518373,
"mass": 2345215.091819,
"price": 157.61,
"external_id": null,
"transaction_id": null
},
{
"id": "e9ad2b00-409a-49a5-a05c-93f63329d3af",
"account_id": "971d10ac-a912-42c0-aa41-f55adc7b6755",
"project_id": "5d3b468f-c0a3-4e7c-bed4-2dcce9d3f0f9",
"created_at": "2015-10-22T00:37:11Z",
"trees": 2.0,
"standard_pages": 16666,
"mass": 75400.058877,
"price": 6.66,
"external_id": null,
"transaction_id": null
}
]
Retrieves the details of a quote. Supply a quote identifier.
GET /quotes/:id
Returns an expanded quote object if a valid identifier was provided, and returns an error otherwise.
// Example Response
{
"id": "83d12ee9-a187-489d-a93f-3096238f1f86",
"account_id": "971d10ac-a912-42c0-aa41-f55adc7b6755",
"project_id": "5d3b468f-c0a3-4e7c-bed4-2dcce9d3f0f9",
"created_at": "2015-10-22T00:37:11Z",
"trees": 63.047762,
"standard_pages": 518373,
"mass": 2345215.091819,
"price": 157.61,
"external_id": null,
"transaction_id": null,
"items": [
{
"quantity": 20000,
"width": 0.2127,
"length": 0.2762,
"density": 216,
"paper_type_id": "a11c7abc-011e-462f-babb-3c6375fa6473",
"mass": 253793.177897
},
{
"quantity": 400000,
"width": 0.2127,
"length": 0.2762,
"density": 89,
"paper_type_id": "bbd0f271-2f9e-494c-b2af-7f9354b310ad",
"mass": 2091421.913922
}
]
}
To create a new quote, supply the raw paper consumption data and PrintReleaf will equate it to the number of trees deforested to produce that paper.
POST /quotes
paper_type_id
.
null
when the item does not have a paper type.density
.
quantity
, width
, length
, density
, and paper_type_id
.
Returns the new expanded quote object if valid information was provided, and returns an error otherwise.
// Example Request (providing paper specs)
{
"project_id": "5d3b468f-c0a3-4e7c-bed4-2dcce9d3f0f9",
"items": [
{
"quantity": 16666,
"width": 0.2159,
"length": 0.2794,
"density": 75
}
]
}
// Example Request (providing `mass`)
{
"project_id": "5d3b468f-c0a3-4e7c-bed4-2dcce9d3f0f9",
"items": [
{
"mass": 75400.058877
}
]
}
// Example Response
{
"id": "e9ad2b00-409a-49a5-a05c-93f63329d3af",
"account_id": "971d10ac-a912-42c0-aa41-f55adc7b6755",
"project_id": "5d3b468f-c0a3-4e7c-bed4-2dcce9d3f0f9",
"created_at": "2015-10-22T00:37:11Z",
"trees": 2.0,
"standard_pages": 16666,
"mass": 75400.058877,
"price": 6.66,
"external_id": null,
"transaction_id": null,
"items": [
{
"quantity": 16666,
"width": 0.2159,
"length": 0.2794,
"density": 75,
"paper_type_id": null,
"mass": 75400.058877
}
]
}
To delete a quote, supply the quote identifier.
Deleting a quote is permitted unless the quote has been transacted upon.
DELETE /quotes/:id
Returns an object with a deleted parameter on success. If the quote does not exist or deleting this quote is not permitted, this call returns an an error.
// Example Response
{
"id": "83d12ee9-a187-489d-a93f-3096238f1f86",
"deleted": true
}
Lists all servers.
GET /servers
Returns an array of server objects, sorted reverse-chronologically.
// Example Response
[
{
"id": "9a6a1ced-4e71-4919-9d6d-25075834c404",
"account_id": "a2c031fa-6599-4939-8bc6-8128881953c4",
"type": "printfleet",
"url": "https://myprintfleetserver.com",
"username": "MyPrintFleetUsername",
"contact": "sally@example.com",
"created_at": "2019-03-08T14:52:33Z"
},
{
"id": "eadabb78-b199-43cb-adbd-ab36ce5c5a10",
"account_id": "a2c031fa-6599-4939-8bc6-8128881953c4",
"type": "fmaudit",
"url": "https://myfmauditserver.com",
"username": "MyFMAuditUsername",
"contact": "bob@example.com",
"created_at": "2019-03-08T14:52:33Z"
}
]
Retrieves the details of a server. Supply a server identifier.
GET /servers/:id
Returns a server object if a valid identifier was provided, and returns an error otherwise.
// Example Response
{
"id": "eadabb78-b199-43cb-adbd-ab36ce5c5a10",
"account_id": "a2c031fa-6599-4939-8bc6-8128881953c4",
"type": "fmaudit",
"url": "https://myfmauditserver.com",
"username": "MyFMAuditUsername",
"contact": "bob@example.com",
"created_at": "2019-03-08T14:52:33Z"
}
To create a new server, supply the type, url, username, password, and contact for the server.
POST /servers
type
of the server to create.
Returns the new server object if valid information was provided, and returns an error otherwise.
// Example Request
{
"type": "printfleet",
"url": "https://myprintfleetserver.com",
"username": "MyPrintFleetUsername",
"contact": "sally@example.com",
"password": "MyPrintFleetPassword"
}
// Example Response
{
"id": "9a6a1ced-4e71-4919-9d6d-25075834c404",
"account_id": "a2c031fa-6599-4939-8bc6-8128881953c4",
"type": "printfleet",
"url": "https://myprintfleetserver.com",
"username": "MyPrintFleetUsername",
"contact": "sally@example.com",
"created_at": "2019-03-08T14:52:33Z"
}
Updates the server by setting the values of the parameters passed. Any parameters not provided will be left unchanged.
PATCH /servers/:id
Returns the updated server object if valid information was provided, and returns an error otherwise.
// Example Request
{
"username": "MyUpdatedPrintFleetPassword"
}
// Example Response
{
"id": "9a6a1ced-4e71-4919-9d6d-25075834c404",
"account_id": "a2c031fa-6599-4939-8bc6-8128881953c4",
"type": "printfleet",
"url": "https://myprintfleetserver.com",
"username": "MyUpdatedPrintFleetPassword",
"contact": "sally@example.com",
"created_at": "2019-03-08T14:52:33Z"
}
To delete a server, supply the server identifier.
DELETE /servers/:id
Returns an object with a deleted parameter on success. If the server does not exist, this call returns an an error.
// Example Response
{
"id": "9a6a1ced-4e71-4919-9d6d-25075834c404",
"deleted": true
}
Transactions are realtime exchanges of paper consumption for reforested trees.
Learn more about Transactions ›
Lists all transactions.
GET /transactions
GET /transactions?start_date=2021-02-08
YYYY-MM-DD
format.
YYYY-MM-DD
format.
Returns an array of transaction objects, sorted reverse-chronologically by date
.
// Example Response
[
{
"id": "70af5540-e3ec-4db7-bc45-4fb65b74368b",
"account_id": "971d10ac-a912-42c0-aa41-f55adc7b6755",
"quote_id": "83d12ee9-a187-489d-a93f-3096238f1f86",
"project_id": "5d3b468f-c0a3-4e7c-bed4-2dcce9d3f0f9",
"certificate_id": "70af5540-e3ec-4db7-bc45-4fb65b74368b",
"date": "2015-10-22T01:52:12Z",
"pages": 525379,
"trees": 63.048
},
{
"id": "def0f271-2f9e-494c-b2af-7f9354b310ad",
"account_id": "971d10ac-a912-42c0-aa41-f55adc7b6755",
"quote_id": null,
"project_id": "5d3b468f-c0a3-4e7c-bed4-2dcce9d3f0f9",
"certificate_id": "def0f271-2f9e-494c-b2af-7f9354b310ad",
"date": "2015-10-21T19:45:25Z",
"pages": 16666,
"trees": 2.0
}
]
Retrieves the details of a transaction. Supply a transaction identifier.
GET /transactions/:id
Returns a transaction object if a valid identifier was provided, and returns an error otherwise.
// Example Response
{
"id": "def0f271-2f9e-494c-b2af-7f9354b310ad",
"account_id": "971d10ac-a912-42c0-aa41-f55adc7b6755",
"quote_id": null,
"project_id": "5d3b468f-c0a3-4e7c-bed4-2dcce9d3f0f9",
"certificate_id": "def0f271-2f9e-494c-b2af-7f9354b310ad",
"date": "2015-10-21T19:45:25Z",
"pages": 16666,
"trees": 2.0
}
When creating a transaction, you have the option to:
quote_id
to convert a quote to a transactionOptionally provide a project_id
to identify at which forestry project you would like the trees to be planted.
After the transaction is received, you will immediately receive a certificate of reforestation as a receipt of the transaction.
POST /transactions
pages
.
pages
, trees
, and project_id
.
Returns the new transaction object if valid information was provided, and returns an error otherwise.
// Example Request (providing `pages`)
{
"pages": 16666
}
// Example Response
{
"id": "def0f271-2f9e-494c-b2af-7f9354b310ad",
"account_id": "971d10ac-a912-42c0-aa41-f55adc7b6755",
"quote_id": null,
"project_id": "5d3b468f-c0a3-4e7c-bed4-2dcce9d3f0f9",
"certificate_id": "def0f271-2f9e-494c-b2af-7f9354b310ad",
"date": "2015-10-21T19:45:25Z",
"pages": 16666,
"trees": 2.0
}
// Example Request (providing `trees`)
{
"trees": 2.0
}
// Example Response
{
"id": "def0f271-2f9e-494c-b2af-7f9354b310ad",
"account_id": "971d10ac-a912-42c0-aa41-f55adc7b6755",
"quote_id": null,
"project_id": "5d3b468f-c0a3-4e7c-bed4-2dcce9d3f0f9",
"certificate_id": "def0f271-2f9e-494c-b2af-7f9354b310ad",
"date": "2015-10-21T19:45:25Z",
"pages": 16666,
"trees": 2.0
}
// Example Request (providing `quote_id`)
{
"quote_id": "83d12ee9-a187-489d-a93f-3096238f1f86"
}
// Example Response
{
"id": "70af5540-e3ec-4db7-bc45-4fb65b74368b",
"account_id": "971d10ac-a912-42c0-aa41-f55adc7b6755",
"quote_id": "83d12ee9-a187-489d-a93f-3096238f1f86",
"project_id": "5d3b468f-c0a3-4e7c-bed4-2dcce9d3f0f9",
"certificate_id": "70af5540-e3ec-4db7-bc45-4fb65b74368b",
"date": "2015-10-22T01:52:12Z",
"pages": 525379,
"trees": 63.048
}
To delete a transaction, supply the transaction identifier.
Deleting a transaction is permitted until the transaction has been billed to your account, at which point it becomes locked.
DELETE /transactions/:id
Returns an object with a deleted parameter on success. If the transaction does not exist or deleting this transaction is not permitted, this call returns an an error.
// Example Response
{
"id": "70af5540-e3ec-4db7-bc45-4fb65b74368b",
"deleted": true
}
Lists all users.
GET /users
Returns an array of user objects, sorted by name.
// Example Response
[
{
"id": "5f25569f-ec0d-4ff3-a6ce-0456ac79b84d",
"account_id": "971d10ac-a912-42c0-aa41-f55adc7b6755",
"name": "David Example",
"email": "david@example.com",
"locale": "en",
"created_at": "2020-03-08T14:52:33Z"
},
{
"id": "5f25569f-ec0d-4ff3-a6ce-0456ac79b84d",
"account_id": "971d10ac-a912-42c0-aa41-f55adc7b6755",
"name": "Sally Example",
"email": "sally@example.com",
"locale": "en",
"created_at": "2019-03-08T14:52:33Z"
}
]
Retrieves the details of a user. Supply a user identifier.
GET /users/:id
Returns a user object if a valid identifier was provided, and returns an error otherwise.
// Example Response
{
"id": "5f25569f-ec0d-4ff3-a6ce-0456ac79b84d",
"account_id": "971d10ac-a912-42c0-aa41-f55adc7b6755",
"name": "Sally Example",
"email": "sally@example.com",
"locale": "en",
"created_at": "2019-03-08T14:52:33Z"
}
To create a new user, supply an email address for the user. Optionally provide a locale
for the user. All user interfaces and communications will be displayed in the user's locale.
POST /users
Returns the new user object if valid information was provided, and returns an error otherwise.
// Example Request
{
"email": "sally@example.com",
"locale": "pt"
}
// Example Response
{
"id": "5f25569f-ec0d-4ff3-a6ce-0456ac79b84d",
"account_id": "971d10ac-a912-42c0-aa41-f55adc7b6755",
"name": "Sally Example",
"email": "sally@example.com",
"locale": "pt",
"created_at": "2019-03-08T14:52:33Z"
}
To delete a user, supply the user identifier.
DELETE /users/:id
Returns an object with a deleted parameter on success. If the user does not exist, this call returns an an error.
// Example Response
{
"id": "5f25569f-ec0d-4ff3-a6ce-0456ac79b84d",
"deleted": true
}
Lists volume history summarized by month.
GET /volume
YYYY-MM-DD
format.YYYY-MM-DD
format.Returns an array of volume period objects, sorted chronologically.
// Example Response
[
{
"account_id": "971d10ac-a912-42c0-aa41-f55adc7b6755",
"date": "2021-01-01T00:00:00Z",
"pages": 234567,
"trees": 56.3
},
{
"account_id": "971d10ac-a912-42c0-aa41-f55adc7b6755",
"date": "2021-02-01T00:00:00Z",
"pages": 2469134,
"trees": 296.0
}
]
Lists all projects.
GET /forestry/projects
Returns an array of project objects, sorted by the date they were created.
// Example Response
[
{
"id": "5d3b468f-c0a3-4e7c-bed4-2dcce9d3f0f9",
"name": "Madagascar",
"status": "active",
"forest_latitude": -15.735844444444444,
"forest_longitude": 46.35879166666667,
"content_logo": "http://s3.amazonaws.com/projects/madagascar/logo.jpg",
"content_masthead": "http://s3.amazonaws.com/projects/madagascar/masthead.jpg",
"content_introduction": "Madagascar, due to its isolation...",
"content_body_html": "<h1>Madagascar is one of the most...",
"content_images": [
"http://s3.amazonaws.com/projects/madagascar/1.jpg",
"http://s3.amazonaws.com/projects/madagascar/2.jpg",
"http://s3.amazonaws.com/projects/madagascar/3.jpg"
]
},
{
"id": "692bb68d-64aa-4a79-8a08-d373fb0d8752",
"name": "Ethiopia",
"status": "complete",
"forest_latitude": 6.7029261,
"forest_longitude": 38.7062503,
"content_logo": "http://s3.amazonaws.com/projects/ethiopia/logo.jpg",
"content_masthead": "http://s3.amazonaws.com/projects/ethiopia/masthead.jpg",
"content_introduction": "In Ethiopia deforestation...",
"content_body_html": "<h1>Due to the absence of...",
"content_images": [
"http://s3.amazonaws.com/projects/ethiopia/1.jpg",
"http://s3.amazonaws.com/projects/ethiopia/2.jpg",
"http://s3.amazonaws.com/projects/ethiopia/3.jpg"
]
}
]
Retrieves the details of a project. Supply a project identifier.
GET /forestry/projects/:id
Returns a project object if a valid identifier was provided, and returns an error otherwise.
// Example Response
{
"id": "5d3b468f-c0a3-4e7c-bed4-2dcce9d3f0f9",
"name": "Madagascar",
"status": "active",
"forest_latitude": -15.735844444444444,
"forest_longitude": 46.35879166666667,
"content_logo": "http://s3.amazonaws.com/projects/madagascar/logo.jpg",
"content_masthead": "http://s3.amazonaws.com/projects/madagascar/masthead.jpg",
"content_introduction": "Madagascar, due to its isolation...",
"content_body_html": "<h1>Madagascar is one of the most...",
"content_images": [
"http://s3.amazonaws.com/projects/madagascar/1.jpg",
"http://s3.amazonaws.com/projects/madagascar/2.jpg",
"http://s3.amazonaws.com/projects/madagascar/3.jpg"
]
}
Lists all available paper types, including the full set of PrintReleaf default paper types and any custom paper types you have created.
GET /paper/types
Returns an array of paper type objects.
// Example Response
[
{
"id": "a11c7abc-011e-462f-babb-3c6375fa6473",
"account_id": null,
"name": "80# #2 Gloss Cover",
"density": 216,
"external_id": "cover-gloss-#2-80#"
},
{
"id": "bbd0f271-2f9e-494c-b2af-7f9354b310ad",
"account_id": "a2c031fa-6599-4939-8bc6-8128881953c4",
"name": "60# #3 Gloss Text",
"density": 89,
"external_id": "text-gloss-#3-60#"
}
]
Retrieves the details of a paper type. Supply a paper type identifier.
GET /paper/types/:id
Returns a paper type object if a valid identifier was provided, and returns an error otherwise.
// Example Response
{
"id": "d3c3e1df-5e55-4587-9d81-91ac87927424",
"account_id": null,
"name": "20# Bond/Writing/Ledger",
"density": 75,
"external_id": null
}
In addition to the list of PrintReleaf default paper types, you may build a portfolio of your own paper types that are only visible to your account.
Creates a new custom paper type, only visible to your account.
POST /paper/types
Returns the new paper type object if valid information was provided, and returns an error otherwise.
// Example Request
{
"name": "20# Bond/Writing/Ledger",
"density": 75
}
// Example Response
{
"id": "d3c3e1df-5e55-4587-9d81-91ac87927424",
"account_id": null,
"name": "20# Bond/Writing/Ledger",
"density": 75,
"external_id": null
}
To delete a paper type, supply the paper type identifier. You may only delete paper types that you have created.
DELETE /paper/types/:id
Returns an object with a deleted parameter on success. If the paper type does not exist or deleting this paper type is not permitted, this call returns an an error.
// Example Response
{
"id": "a11c7abc-011e-462f-babb-3c6375fa6473",
"deleted": true
}
null
when the account does not have a parent account.
null
when the account has never been activated.
null
when the account has never been deactivated.
// Example Account Object
{
"id": "971d10ac-a912-42c0-aa41-f55adc7b6755",
"name": "Customer ABC",
"display_name": "Customer ABC",
"role": "customer",
"created_at": "2019-03-08T14:52:33Z",
"parent_id": "a2c031fa-6599-4939-8bc6-8128881953c4",
"external_id": null,
"status": "active",
"activated_at": "2019-03-08T14:52:33Z",
"deactivated_at": null
}
// Example Expanded Account Object
{
"id": "971d10ac-a912-42c0-aa41-f55adc7b6755",
"name": "Customer ABC",
"display_name": "Customer ABC",
"role": "customer",
"created_at": "2019-03-08T14:52:33Z",
"parent_id": "a2c031fa-6599-4939-8bc6-8128881953c4",
"external_id": null,
"status": "active",
"activated_at": "2019-03-08T14:52:33Z",
"deactivated_at": null,
"accounts_count": 0,
"users_count": 3,
"mtd_pages": 1234,
"qtd_pages": 12345,
"ytd_pages": 123456,
"ltd_pages": 1234567,
"mtd_trees": 0.15,
"qtd_trees": 1.48,
"ytd_trees": 14.82,
"ltd_trees": 148.0
}
// Example Certificate Object
{
"id": "ae630937-e15b-4da5-98de-bb68eefe2a12",
"account_id": "971d10ac-a912-42c0-aa41-f55adc7b6755",
"date": "2021-02-28T23:59:59Z",
"pages": 2469134,
"trees": 296.0,
"project_id": "5d3b468f-c0a3-4e7c-bed4-2dcce9d3f0f9",
"project": {
"id": "5d3b468f-c0a3-4e7c-bed4-2dcce9d3f0f9",
"name": "Madagascar",
"status": "active",
"forest_latitude": -15.735844444444444,
"forest_longitude": 46.35879166666667,
"content_logo": "http://s3.amazonaws.com/projects/madagascar/logo.jpg",
"content_masthead": "http://s3.amazonaws.com/projects/madagascar/masthead.jpg",
"content_introduction": "Madagascar, due to its isolation...",
"content_body_html": "<h1>Madagascar is one of the most...",
"content_images": [
"http://s3.amazonaws.com/projects/madagascar/1.jpg",
"http://s3.amazonaws.com/projects/madagascar/2.jpg",
"http://s3.amazonaws.com/projects/madagascar/3.jpg"
]
},
"url": "https://printreleaf.com/certificates/ae630937-e15b-4da5-98de-bb68eefe2a12",
"pdf_url": "https://printreleaf.com/certificates/ae630937-e15b-4da5-98de-bb68eefe2a12.pdf"
}
length
. Can be used interchangeably.
// Example Deposit Object
{
"id": "a86d591c-3c29-4bef-82c3-7a007fb6b19c",
"account_id": "971d10ac-a912-42c0-aa41-f55adc7b6755",
"feed_id": "44e182ed-cd50-4fa1-af90-e77dd6d6a78c",
"date": "2016-07-05T12:29:12Z",
"pages": 20000,
"width": 0.2127,
"length": 0.2762,
"density": 216
}
null
if it is a PrintReleaf default paper type.
// Example Paper Type Object
{
"id": "d3c3e1df-5e55-4587-9d81-91ac87927424",
"account_id": null,
"name": "20# Bond/Writing/Ledger",
"density": 75,
"external_id": null
}
// Example Project Object
{
"id": "5d3b468f-c0a3-4e7c-bed4-2dcce9d3f0f9",
"name": "Madagascar",
"status": "active",
"forest_latitude": -15.735844444444444,
"forest_longitude": 46.35879166666667,
"content_logo": "http://s3.amazonaws.com/projects/madagascar/logo.jpg",
"content_masthead": "http://s3.amazonaws.com/projects/madagascar/masthead.jpg",
"content_introduction": "Madagascar, due to its isolation...",
"content_body_html": "<h1>Madagascar is one of the most...",
"content_images": [
"http://s3.amazonaws.com/projects/madagascar/1.jpg",
"http://s3.amazonaws.com/projects/madagascar/2.jpg",
"http://s3.amazonaws.com/projects/madagascar/3.jpg"
]
}
null
when this quote has not yet been transacted.
// Example Quote Object
{
"id": "e9ad2b00-409a-49a5-a05c-93f63329d3af",
"account_id": "971d10ac-a912-42c0-aa41-f55adc7b6755",
"project_id": "5d3b468f-c0a3-4e7c-bed4-2dcce9d3f0f9",
"created_at": "2015-10-22T00:37:11Z",
"trees": 2.0,
"standard_pages": 16666,
"mass": 75400.058877,
"price": 6.66,
"external_id": null,
"transaction_id": null,
"items": [
{
"quantity": 16666,
"width": 0.2159,
"length": 0.2794,
"density": 75,
"paper_type_id": null,
"mass": 75400.058877
}
]
}
// Example Quote Item Object
{
"quantity": 20000,
"width": 0.2127,
"length": 0.2762,
"density": 216,
"paper_type_id": "a11c7abc-011e-462f-babb-3c6375fa6473",
"mass": 253793.177897
}
type
of the server.
// Example Server Object
{
"id": "eadabb78-b199-43cb-adbd-ab36ce5c5a10",
"account_id": "a2c031fa-6599-4939-8bc6-8128881953c4",
"type": "fmaudit",
"url": "https://myfmauditserver.com",
"username": "MyFMAuditUsername",
"contact": "bob@example.com",
"created_at": "2019-03-08T14:52:33Z"
}
type
of the feed.
null
when the feed has never been activated.
null
when the feed has never been deactivated.
null
when the feed has never been health checked.
null
when the feed has never been health checked.
// Example Feed Object
{
"id": "44e182ed-cd50-4fa1-af90-e77dd6d6a78c",
"account_id": "971d10ac-a912-42c0-aa41-f55adc7b6755",
"type": "fmaudit",
"server_id": "eadabb78-b199-43cb-adbd-ab36ce5c5a10",
"external_id": "456",
"collection_scope": "managed_only",
"created_at": "2020-03-08T14:52:33Z",
"status": "active",
"activated_at": "2020-03-08T14:52:33Z",
"deactivated_at": null,
"health_check": "healthy",
"health_check_checked_at": "2021-03-08T14:52:33Z",
"health_check_changed_at": "2021-03-08T14:52:33Z"
}
// Example Transaction Object
{
"id": "def0f271-2f9e-494c-b2af-7f9354b310ad",
"account_id": "971d10ac-a912-42c0-aa41-f55adc7b6755",
"quote_id": null,
"project_id": "5d3b468f-c0a3-4e7c-bed4-2dcce9d3f0f9",
"certificate_id": "def0f271-2f9e-494c-b2af-7f9354b310ad",
"date": "2015-10-21T19:45:25Z",
"pages": 16666,
"trees": 2.0
}
// Example User Object
{
"id": "5f25569f-ec0d-4ff3-a6ce-0456ac79b84d",
"account_id": "971d10ac-a912-42c0-aa41-f55adc7b6755",
"name": "Sally Example",
"email": "sally@example.com",
"locale": "en",
"created_at": "2019-03-08T14:52:33Z"
}
// Example Volume Period Object
{
"account_id": "971d10ac-a912-42c0-aa41-f55adc7b6755",
"date": "2021-01-01T00:00:00Z",
"pages": 234567,
"trees": 56.3
}
period
parameter has been removed. Now it is always summarized by month.external_id
property to the Paper Type objectproject_id
is now a required parameter when creating a quote.mass
property to Quotes and Quote Items.height
property is now an alias for length
on Deposits.density
property is now an integer on Deposits, Paper Types, and Quote Items. (Previously was a float)density
now defaults to 75 on Deposits and Quote Items. (Previously defaulted to 74)POST /users
endpoint has been added for creating users directly.activated_at
property to be supplied when creating a Feed. Defaults to the first day of the current month.pending
and offline
health checks to the Feed object; remove unknown
external_id
property to the Account objectdisplay_name
property to the Account object/sources
actions remain available as an alias to the new /feeds
actions.source_id
property of the Deposit object remains available as an alias to the new feed_id
property.pages
valuecontact
property to the Server objectstart_date
and end_date
query paramters to Deposits and Transactions