v2

latestOpenAPI 3.1.02026-08-054181117.0 KB

Create Retirement

Retire credits from specific batches, in whole or with splits. All credit batches must originate from the same supplier and be owned by the current organisation.

post/retirements

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.

Example request

{
  "owner_organisation_id": "org_1GB56M1ST1S0GVNA",
  "beneficiary_organisation_id": "org_1GB56M1ST1S0GVNA",
  "supplier_id": "spl_1CC712KFS1S0YKPS",
  "notes": "Retired with care.",
  "credit_batch_quantities": [
    {
      "credit_batch_id": "ctb_1DRBTYA8Q1S07CBY",
      "credit_quantity_kg": 1000
    }
  ]
}

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
  }
}