Orders

Endpoints for placing orders and retrieving information about orders

Get List of Orders

Gets a list of offset orders in reverse chronological order up to the provided limit number of orders per call. Pagination is supported by passing the first order id from a previous call into ending_before to retrieve the previous page, or the last order id from a previous call into starting_after to retrieve the next page.

SecurityApiKey
Request
query Parameters
limit
integer or null [ 1 .. 100 ]
Default: 20

Limits the number of orders returned, default is 20, max is 100

starting_after
string or null

If specified, returns orders submitted before (earlier than) the order with this id, exclusive (order with this id is not included). Only one of starting_after and ending_before can be specified.

ending_before
string or null

If specified, returns orders submitted after (later than) the order with this id, exclusive (order with this id is not included). Only one of starting_after and ending_before can be specified.

header Parameters
X-Subaccount-Id
string

If present, only returns orders belonging to the subaccount with given id.

Responses
200

List of Offset orders

400

Bad Request

401

Request Unauthorized

get/orders
Request samples
Response samples
application/json
{}

Submit Generic Offset Order

Places an order for carbon offsets by specifying the amount of offsets (in kilograms). The order will remain in the placed state until it can be matched to available offsets.

SecurityApiKey
Request
header Parameters
X-Subaccount-Id
string

If present, the new order will be associated with the subaccount with given id.

Idempotency-Key
string

If present, a unique identifier that allows you to retry a request multiple times while only performing the action once. See Idempotency for more info.

Request Body schema: application/json
required

Order Parameters

amount_kg
required
number

the amount of offsets to purchase, in kg

metadata
string or null <= 512 characters

Optional metadata that can be provided with the order. Not shown on the certificate, and is intended for API clients to attach arbitrary metadata that can be retrieved with the order.

description
string or null <= 512 characters

Optional public description for the order that will be shown on the certificate

object or null

Optional configuration for a callback url to invoke with updates when the status of an order changes.

portfolio_id
string or null

Optional ID of the portfolio to use for fulfilling the order. If not specified, the account's default portfolio will be used.

Responses
201

Order Details

400

Bad Request

401

Request Unauthorized

403

Forbidden - Billing Not Set Up or Requested Portfolio not Available for the User

409

Concurrent Requests with Same Idempotency Key

422

Mismatched Requests with Same Idempotency Key

post/orders
Request samples
application/json
{}
Response samples
application/json
{
  • "id": "Gre28Fc35bt3",
  • "order_number": "47726-53238-46633-33562-7433",
  • "amount_kg": 100,
  • "metadata": "Customer metadata",
  • "price_usd_cents": 2350
}

Submit Vehicle Ride Offset Order

Places an order for carbon offsets for a vehicle ride of the given distance (in kilometers). The order will remain in the placed state until it can be matched to available offsets.

SecurityApiKey
Request
header Parameters
X-Subaccount-Id
string

If present, the new order will be associated with the subaccount with given id.

Idempotency-Key
string

If present, a unique identifier that allows you to retry a request multiple times while only performing the action once. See Idempotency for more info.

Request Body schema: application/json
required

Order Parameters

metadata
string or null <= 512 characters

Optional metadata that can be provided with the order. Not shown on the certificate, and is intended for API clients to attach arbitrary metadata that can be retrieved with the order.

description
string or null <= 512 characters

Optional public description for the order that will be shown on the certificate

object or null

Optional configuration for a callback url to invoke with updates when the status of an order changes.

portfolio_id
string or null

Optional ID of the portfolio to use for fulfilling the order. If not specified, the account's default portfolio will be used.

distance_km
required
number

Distance of ride, in km

Responses
201

Order Details

400

Bad Request

401

Request Unauthorized

403

Forbidden - Billing Not Set Up or Requested Portfolio not Available for the User

409

Concurrent Requests with Same Idempotency Key

422

Mismatched Requests with Same Idempotency Key

post/orders/ride
Request samples
application/json
{}
Response samples
application/json
{
  • "id": "XYZ",
  • "metadata": "Customer metadata",
  • "amount_kg": 15,
  • "price_usd_cents": 2350,
  • "state": "placed"
}

Get Order By Id

Returns information about an offset order

SecurityApiKey
Request
path Parameters
id
required
string

ID of order to return

header Parameters
X-Subaccount-Id
string

If present, will only retrieve the order if it belongs to the subaccount with given id.

Responses
200

Offset Order Details

401

Request Unauthorized

404

Order Not Found

get/orders/{id}
Request samples
Response samples
application/json
{
  • "id": "Gre28Fc35bt3",
  • "order_number": "47726-53238-46633-33562-7433",
  • "created_on": "2022-08-01T18:00:00.000000Z",
  • "metadata": "Customer metadata",
  • "description": "On behalf of Jane Smith",
  • "amount_kg": 10.5,
  • "state": "placed",
  • "price_usd_cents": 2350
}

Cancel Order

When cancelling an order that has been fulfilled, a credit for the price of the order will be applied to the current invoice. This means that it is possible for the credit for a cancellation to appear on the invoice of the following billing period. For example, if a billing period ends between when the order was placed and when it is cancelled, then the credit will be applied to the latter billing period rather than the one during which the order was placed.

SecurityApiKey
Request
path Parameters
id
required
string

ID of order to cancel

header Parameters
X-Subaccount-Id
string

If present, will only cancel the order if it belongs to the subaccount with given id.

Idempotency-Key
string

If present, a unique identifier that allows you to retry a request multiple times while only performing the action once. See Idempotency for more info.

Responses
200

Order Details

401

Request Unauthorized

403

Forbidden Due to Order Already Cancelled

404

Order Not Found

409

Concurrent Requests with Same Idempotency Key

422

Mismatched Requests with Same Idempotency Key

post/orders/{id}/cancel
Request samples
Response samples
application/json
{
  • "id": "Gre28Fc35bt3",
  • "order_number": "47726-53238-46633-33562-7433",
  • "created_on": "2022-08-01T18:00:00.000000Z",
  • "metadata": "Customer metadata",
  • "description": "On behalf of Jane Smith",
  • "amount_kg": 10.5,
  • "state": "cancelled",
  • "price_usd_cents": 2350,
  • "certificate_public_url": null,
  • "certificate_download_public_url": null
}

Quotes

Endpoints for obtaining price quotes for orders

Get Generic Offset Price Quote

Get a price quote for offsetting given amount of CO2.

SecurityApiKey
Request
header Parameters
X-Subaccount-Id
string

If present, will use pricing appropriate for the subaccount with given id.

Request Body schema: application/json
required

Quote Parameters

amount_kg
required
number

Amount of CO2 emitted, in kg

portfolio_id
string or null

Optional ID of the portfolio to use for the quote. The quote will be for an order fulfilled from this portfolio. If not specified, the account's default portfolio will be used.

Responses
200

Quote Details

400

Bad Request

401

Request Unauthorized

post/quotes
Request samples
application/json
{
  • "amount_kg": 8.5
}
Response samples
application/json
{
  • "amount_kg": 8.5,
  • "price_usd_cents": 10
}

Get Vehicle Ride Offset Price Quote

Get a price quote for offsetting a vehicle ride. Will return amount of CO2 and price for offsetting a ride with given parameters.

SecurityApiKey
Request
header Parameters
X-Subaccount-Id
string

If present, will use pricing appropriate for the subaccount with given id.

Request Body schema: application/json
required

Quote Parameters

distance_km
required
number

Distance of ride, in km

portfolio_id
string or null

Optional ID of the portfolio to use for the quote. The quote will be for an order fulfilled from this portfolio. If not specified, the account's default portfolio will be used.

Responses
200

Quote Details

400

Bad Request

401

Request Unauthorized

post/quotes/ride
Request samples
application/json
{
  • "distance_km": 10.5
}
Response samples
application/json
{
  • "amount_kg": 15,
  • "price_usd_cents": 2350
}

Climate Impact

Endpoints for retrieving climate impact data and hosted public impact page configuration

Get Climate Impact Data

Returns information about the total climate impact of the carbon credit purchases for this account (or a subaccount). This is the underlying information that is displayed on the hosted public impact page for the account / subaccount.

SecurityApiKey
Request
header Parameters
X-Subaccount-Id
string

If present, will only include orders for the subaccount with given id when calculating total impact.

Responses
200

Impact Data

401

Request Unauthorized

get/impact/data
Request samples
Response samples
application/json
{
  • "name": "Acme, Inc",
  • "total_offset_kgs": 100000,
  • "equivalents": {
    },
  • "since_date": "2023-01-01T18:00:00.000000Z",
  • "categories": [
    ]
}

Get Hosted Climate Impact Page Configuration

Returns information about the hosted public climate impact page configuration for the account (or a subaccount)

SecurityApiKey
Request
header Parameters
X-Subaccount-Id
string

If present, will return configuration for the hosted impact subaccount.

Responses
200

Impact Hosted Page Configuration

401

Request Unauthorized

get/impact/hosted-page-config
Request samples
Response samples
application/json
{}

Subaccounts

Endpoints for creating and retrieving information about subaccounts

Get List of Subaccounts

Gets a list of subaccounts in reverse chronological order up to the provided limit number of subaccounts per call. Pagination is supported by passing the first subaccount id from a previous call into ending_before to retrieve the previous page, or the last subaccount id from a previous call into starting_after to retrieve the next page.

SecurityApiKey
Request
query Parameters
limit
integer or null [ 1 .. 100 ]
Default: 20

Limits the number of subaccounts returned, default is 20, max is 100

starting_after
string or null

If specified, returns subaccounts created before (earlier than) the subaccount with this id, exclusive (subaccount with this id is not included). Only one of starting_after and ending_before can be specified.

ending_before
string or null

If specified, returns subaccounts created after (later than) the order with this id, exclusive (subaccount with this id is not included). Only one of starting_after and ending_before can be specified.

Responses
200

List of Subaccounts

400

Bad Request

401

Request Unauthorized

get/subaccounts
Request samples
Response samples
application/json
{
  • "data": [
    ]
}

Create Subaccount

Creates a new Subaccount.

SecurityApiKey
Request
header Parameters
Idempotency-Key
string

If present, a unique identifier that allows you to retry a request multiple times while only performing the action once. See Idempotency for more info.

Request Body schema: application/json
required

Subaccount Parameters

name
required
string <= 512 characters

Name for the subaccount

default_portfolio_id
string or null

Optional ID of the default portfolio to use for fulfilling orders placed for this subaccount. If not specified, the parent account's default portfolio will be the default portfolio for the subaccount.

Responses
201

Subaccount Details

400

Invalid default portfolio ID

401

Request Unauthorized

409

Concurrent Requests with Same Idempotency Key

422

Mismatched Requests with Same Idempotency Key

post/subaccounts
Request samples
application/json
{
  • "name": "Marketing Department",
  • "default_portfolio_id": "mHvNvWbq"
}
Response samples
application/json
{
  • "id": "5nubL0NS",
  • "name": "Marketing Department",
  • "default_portfolio_id": "mHvNvWbq"
}

Get Subaccount By Id

Returns information about a subaccount

SecurityApiKey
Request
path Parameters
id
required
string

ID of subaccount to return

Responses
200

Subaccount Details

401

Request Unauthorized

404

Subaccount Not Found

get/subaccounts/{id}
Request samples
Response samples
application/json
{
  • "id": "5nubL0NS",
  • "name": "Marketing Department",
  • "default_portfolio_id": "mHvNvWbq"
}