Organizations

Who can use these endpoints

You can use an organization access token, see "Authenticating as an ICR organization". And you can also use an installation access token to access these endpoints using your ICR App. For more information, see "Authenticating as an ICR App installation." And

Information

Metadata for an organization.

Gets base information on a specific organization.

Callable by any access token with permissions "organization_info:read".

curl -X 'GET' \
  'https://api.carbonregistry.com/organizations/{ORG_ID}' \
  -H 'accept: application/json' \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN"\
  -H 'x-icr-api-version: 2023-06-16'

Organization's Inventory Accounts

Returns the inventory accounts that this organization owns. Default and subaccounts.

Gets the public wallet addresses of an organization. Mainly used for getting addresses to deposit credits into or to get inventory data for subaccounts.

Callable by any access token with permissions "organization_info:read".

curl -X 'GET' \
  'https://api.carbonregistry.com/organizations/{ORG_ID}/addresses' \
  -H 'accept: application/json' \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN"\
  -H 'x-icr-api-version: 2023-06-16'

Organization Inventory

This is the main inventory of an organization. Currently only "read" and "read and request" access are available for the inventory. The "read and request" access gives an app the permission to make transfer / retirement requests toward the credits in the organization's inventory.

This returns all the credits in an organization's inventory.

Callable by any access token with permissions "organization_inventory:read".

curl -X 'GET' \
  'https://api.carbonregistry.com/organizations/{ORG_ID}/inventory' \
  -H 'accept: application/json' \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN"\
  -H 'x-icr-api-version: 2023-06-16'

Creates a "transfer" / "retire" / "transfer_retire" transaction and puts it in the processing queue. To monitor the state of the transaction you can query the transaction endpoint.

Callable by any access token with permissions "organization_inventory:read_write".

curl -X 'POST' \
  'https://api.carbonregistry.com/organizations/{ORG_ID}/inventory/action/{REQUEST_ACTION}' \
  -H 'accept: application/json' \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN"\
  -H 'x-icr-api-version: 2023-06-16' \
  -H 'Content-Type: application/json' \
  -d '{
  "creditId": "exPost-2-0x1234567890abcdef",
  "amount": 100,
  "toOrganizationId": "123e4567-e89b-12d3-a456-426614174000",
  "toAddress": "0x1234567890abcdef",
  "retirementData": {
    "reason": "Retirement reason",
    "beneficiaryName": "John Doe",
    "comment": "This is a comment"
  }
}'

Gets a specific transaction.

Callable by any access token with permissions "organization_inventory:read".

curl -X 'GET' \
  'https://api.carbonregistry.com/organizations/{ORG_ID}/inventory/transactions/{TRANSACTION_ID}' \
  -H 'accept: application/json' \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN"\
  -H 'x-icr-api-version: 2023-06-16'

Testing endpoints

friendbot - test credits

To get some test credits into your organization on the sandbox you can use this endpoint with and organization Id that you control. It will deposit a 100 credits into your organization.

Callable by any access token regardless of permissions.

curl -X 'GET' \
  'https://api.carbonregistry.com/organizations/{ORG_ID}/friendbot' \
  -H 'accept: application/json' \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN"\
  -H 'x-icr-api-version: 2023-06-16'

Last updated

Logo