Accounts
Following access rights need to be enabled for your API user in the MyPuro Portal to use these endpoints:
Read Account
to list and get account detailsWrite Account
for creating and editing account detailsRead Balance
for listing the certificates the account has
See Access management for more details about enabling access to MyPuro resources.
To create a retirement you need to discover which CORCs are available in your accounts. To do this, you need to first list your accounts, and then fetch the balance of the account you want to retire from.
List Accounts
To list accounts which you have read access to, use the GET /mypuro/accounts
endpoint.
If an account holder in the MyPuro Portal has shared access to an account for your MyPuro organisation, it will be seen
from this endpoint alongside your own resources. The account's account holder is specified by the accountHolderId
field,
for which information can be fetched using the account holder endpoints.
See Access management for more details about enabling access to MyPuro resources.
curl -X 'GET' "/accounts" \
-H "Accept: application/json" \
-H "Authorization: Basic $BASIC"
object (PaginationData) | |
Array of objects (Account) <= 100 items |
{- "pagination": {
- "total": 1,
- "offset": 0,
- "limit": 100
}, - "data": [
- {
- "accountNumber": "f4826423-21b9-4ee0-905d-311e758ee750",
- "name": "Default Account",
- "parentAccountNumber": "1e54f53b-57cb-4f65-adb1-77b0e1e33ce2",
- "accountHolderId": "f4826423-905d-4ee0-4ee0-311e758ee750",
- "isActive": true
}
]
}
Get Account Balance
To list certificates of one account, use the GET /mypuro/accounts/{accountNumber}/balance
endpoint.
curl -X 'GET' "/accounts/{accountNumber}/balance" \
-H "Accept: application/json" \
-H "Authorization: Basic $BASIC"
required | object (PaginationData) |
required | Array of objects (CertificateBundle) <= 100 items Account |
{- "pagination": {
- "total": 1,
- "offset": 0,
- "limit": 100
}, - "data": [
- {
- "certificates": "PURO_PR_CORC100+_FI_148003_2024_0052850a-1263-4d3f-af6f-a91288df04e3_1-100",
- "volume": 1,
- "accountNumber": "ca1c0b6b-0b3b-4b3b-8b3b-0b3b0b3b0b3b",
- "methodologyCode": "C03000000",
- "methodologyName": "Biochar",
- "productionFacilityCode": "OC4C00",
- "vintage": "2022",
- "productionStartDate": "2022-01-01T00:00:00.000Z",
- "productionEndDate": "2022-12-12T00:00:00.000Z",
- "creditType": "CORC100+",
- "issueDate": "2022-12-12T00:00:00.000Z"
}
]
}
In the result you should see the certificates available in the account, which you can retire.
If you do not see any certificates listed, please make sure you are listing the correct account, and you
have the Read Account Balance
access enabled for that particular account.
Copy the certificate ID and account number from the bundle you'd like to retire from. We will retire one certificate from this bundle in the next section.