Paper Calculator API - Application Programming Interface

This page documents version 4.1.0 of the API.

The API is a RESTful interface for submitting paper data and retrieving calculated results.

The Version 4.1 API accepts (and correspondingly returns) JSON input.

Submitted data should be accompanied by an appropriate "Content-Type" header, "application/json".

Data should be submitted using the "POST" HTTP method. OPTIONS requests are also supported.

The URL endpoint for the API is https://api.papercalculator.org/v4_1/pc

Throughout the sample code and examples, you will need to replace "YOUR_ID_HERE" with the id you obtain from the Environmental Paper Network.

Sample request documents can be found here:
JSON Request document

Note that the "resultunits" parameter is entirely optional. It is used to request the type of units used for the returned data. The default is to use Imperial (e.g. pound, short tons, gallons) except for very small weights which are given in milligrams or micrograms for mercury and dioxin. The possible values are "default", "imperial", and "metric".

"grade" holds an integer value corresponding to the type of paper. "name" will be used in the result to identify the output values. The following lists the available "grade" values. The numbering has changed since the previous API. "grade" determines what calculations will be performed; the value contained in "name" comes along for the ride as a human-readable identifier.

1 Coated Freesheet
2 Uncoated Freesheet
3 Coated Groundwood
4 Uncoated Groundwood
5 Supercalendered
6 Paperboard: Solid Bleached Sulfate (SBS)
7 Paperboard: Coated Unbleached Kraft
8 Paperboard: Coated Recycled Board
9 Paperboard: Uncoated Bleached Kraft
10 Paperboard: Uncoated Unbleached Kraft
11 Paperboard: Uncoated Recycled Board
12 Linerboard
13 Corrugating Container
14 Napkins, Towels & Facial Tissue
15 Toilet Paper

"unit" should indicate the units used to measure the weight of paper submitted. "tons" is the default; "pounds" and "metric-tons" are also allowed values. The weight itself is given in "amount".

"recycledcontent" should hold the percent of recycled content in the paper (without the % symbol).

The following unix command-line can be used to submit the sample JSON document contained in the same directory and display the result using the cURL utility :

#!/bin/bash
curl -H 'Content-Type: application/json' --data-urlencode @sample-4-1.json https://api.papercalculator.org/v4_1/pc


Sample result documents:
result-4-1.json

Those of you migrating from the previous API version will notice the following changes:

  • XML is no longer supported.
  • There are now two categories of tissue paper.
  • There is now an optional "resultunits" parameter, as described above.
Power Users