v2

latestOpenAPI 3.1.02026-08-054181117.0 KB

Create Retirement From Oldest Credits

Retire oldest available credits from a given supplier. If vintage is specified, this will retire the oldest credits from that vintage only.

post/retirements/from_oldest_credits

Headers

x-client-secretstring required

A secret token identifying the client connecting to the API

Example:Syou3EZiO5vuMEgNyBeA8cjEMYOnQDwP

A secret token identifying the client connecting to the API

Request body

owner_organisation_idstring required

The ID of the organisation owns the credits to be retired. Typically this would be your own organisation ID.

beneficiary_organisation_idstring required

The ID of the organisation that the credits will be retired in the name of, this can be the same as owner_organisation_id.

supplier_idstring required

All credits in a retirement must originate from the same supplier.

retirement_purposesRetirementPurpose[] required
notesstring nullable required

A publicly visible note stored with the credit retirement.

credit_quantity_kginteger required

A representation of a credit quantity as an integer kilogram amount. Where 1 unit represents 0.001 credits and 1 kilogram of CO₂e. This field can handle bigint values.

vintageinteger nullable

The year of the credits to be retired. If not provided, the oldest credits will be retired.

order_idstring nullable

Filter to only retire credits from a specific order. If not provided, credits from any order will be considered.

Example request

{
  "owner_organisation_id": "org_1GB56M1ST1S0GVNA",
  "beneficiary_organisation_id": "org_1GB56M1ST1S0GVNA",
  "supplier_id": "spl_1CC712KFS1S0YKPS",
  "notes": "Retired with care.",
  "credit_quantity_kg": 1000,
  "vintage": 2022,
  "order_id": "ord_1FAN3S3WV1S0B842"
}

Response

Successful Response

idstring required
retired_atstring date-time required
purposesRetirementPurpose[] required
urlstring required
notesstring nullable required

Example response

{
  "id": "ret_1FYBH4QDT1S0SVKF",
  "beneficiary": {
    "id": "org_1GB56M1ST1S0GVNA",
    "name": "Isometric",
    "domain": "isometric.com"
  },
  "owner": {
    "id": "org_1GB56M1ST1S0GVNA",
    "name": "Isometric",
    "domain": "isometric.com"
  },
  "credit_batch_size_total": {
    "credits": 125.632,
    "credit_kgs": 125632
  }
}