Credit actions

All available credit actions.

Get inventory for an entity

get
Authorizations
Path parameters
idstringRequired

Entity ID

Responses
200Success
application/json
get
GET /v1/{id}/inventory HTTP/1.1
Host: api.carbonregistry.com
Authorization: Bearer <token>
Accept: */*
200Success
{
  "credits": [
    {
      "organizationId": "123e4567-e89b-12d3-a456-426614174000",
      "userId": "123e4567-e89b-12d3-a456-426614174000",
      "id": "exPost-2-0x1234567890abcdef",
      "tokenId": "abcdef",
      "tokenAddress": "0x1234567890abcdef",
      "project": {
        "id": "123e4567-e89b-12d3-a456-426614174000",
        "fullName": "Project 1",
        "url": "https://api.carbonregistry.com/projects/47abd663-fb35-4b2e-ad08-c347e761649e",
        "publicUrl": "https://carbonregistry.com/explore/projects/47abd663-fb35-4b2e-ad08-c347e761649e",
        "num": "713"
      },
      "serialization": "ICR-ISL-354-78040-14-R-0-2021",
      "vintage": "2020",
      "supply": 1000,
      "unit": "tonne",
      "amount": 100,
      "type": "exAnte"
    }
  ],
  "entity": {
    "userId": "123e4567-e89b-12d3-a456-426614174000",
    "organizationId": "123e4567-e89b-12d3-a456-426614174000",
    "id": "123e4567-e89b-12d3-a456-426614174000"
  }
}

Transfer credits

post

For transferring credits this is THE endpoint to use. You can transfer credits from an organization, user or subaccount.

Authorizations
Body
toall ofRequired

The receiver's information.

  If the entity Id is supplied (user / org / subaccount) then the credits are sent to the corresponding account for that id. 
  
  If you want to deliver the credits to some address on Polygon you can use the publicKey address and leave the id undefined. 
  
  Finally if you are unsure if the receiver of the credits own's a carbonregistry.com account you can pass in the receiver's email, the credits will be sent to an escrow account that stores the credits until the owner of the email signs in and claims the credits.
fromIdstringRequired

The entity that holds the credits - if not a subaccountId the default subaccount will be used.

Example: 123e4567-e89b-12d3-a456-426614174000
commentstringOptional

An optional transaction comment

Example: Transfer 2024
Responses
200Success
application/json
post
POST /v1/transfer HTTP/1.1
Host: api.carbonregistry.com
Authorization: Bearer <token>
Content-Type: application/json
Accept: */*
Content-Length: 349

{
  "to": {
    "publicKey": "0x742d35Cc6634C0532925a3b844Bc454e4438f44e",
    "email": "[email protected]",
    "id": "123e4567-e89b-12d3-a456-426614174000"
  },
  "fromId": "123e4567-e89b-12d3-a456-426614174000",
  "credits": [
    {
      "id": "exPost-1-0x742d35Cc6634C0532925a3b844Bc454e4438f44e",
      "amount": "0.7"
    }
  ],
  "comment": "Transfer 2024",
  "receiptEmails": [
    "[email protected]"
  ]
}
200Success
{
  "transactionId": "123e4567-e89b-12d3-a456-426614174000",
  "success": true
}

Retire credits

post

For retiring credits this is THE endpoint to use. You can retire credits from an organization, user or subaccount.

Authorizations
Body
toall ofOptional

The receiver information

fromIdstringRequired

The entity that holds the credits

Example: 123e4567-e89b-12d3-a456-426614174000
reasonstringRequired

The reason for retirement. This reason comes from a specified picklist.

Example: Corsia
beneficiaryNamestringRequired

The beneficiary for the retirement

Example: Beff Jezos
commentstringRequired

A retirement comment

Example: Retiring for flights 24'
creditall ofRequired

The credits to transfer

Responses
200Success
application/json
post
POST /v1/retire HTTP/1.1
Host: api.carbonregistry.com
Authorization: Bearer <token>
Content-Type: application/json
Accept: */*
Content-Length: 359

{
  "to": {
    "email": "[email protected]",
    "id": "123e4567-e89b-12d3-a456-426614174000"
  },
  "fromId": "123e4567-e89b-12d3-a456-426614174000",
  "reason": "Corsia",
  "beneficiaryName": "Beff Jezos",
  "comment": "Retiring for flights 24'",
  "credit": {
    "id": "exPost-1-0x742d35Cc6634C0532925a3b844Bc454e4438f44e",
    "amount": "0.7"
  },
  "receiptEmails": [
    {
      "email": "[email protected]"
    }
  ]
}
200Success
{
  "success": "123e4567-e89b-12d3-a456-426614174000",
  "transactionId": true
}

reason: Must be one of the following predefined options:

  • Compliance

  • Corsia

  • Voluntary purposes

  • Overall mitigations of global emissions

  • Corporate emission compensation

  • Other

  • Article 6.2

  • Testing

Last updated