Skip to content
TrimCarbon API
Esc
↑↓navigate↵open⌘Jpreview

Get your API impact

kg of CO₂ offset through the API, for this key’s mode.

GET/impact
Authorization
AuthorizationBearer token · headerrequired

An API key from the developer page: tc_live_… for real purchases, tc_test_… for tests. Keep it on your server.

Responses
200

The totals.

objectstringrequired
livemodebooleanrequired

False for test keys: nothing was charged or retired.

placed_kgintegerrequired

kg of CO₂ offset through the API, retired.

processing_kgintegerrequired

kg paid for and not yet placed.

offsetsintegerrequired

Purchases, not refunded.

401

Missing, unknown or revoked API key.

errorobjectrequired
Show properties
typestringrequired
Allowed:authentication_errorpermission_errorinvalid_request_errorrate_limit_errorapi_error
codestringrequired
messagestringrequired
paramstring

The request field that is wrong.

balance_centsinteger

With insufficient_balance: your balance now.

required_centsinteger

With insufficient_balance: what the purchase costs.

403

api_access_inactive (the account is suspended or not approved) or insufficient_permissions (a read-only key).

errorobjectrequired
Show properties
typestringrequired
Allowed:authentication_errorpermission_errorinvalid_request_errorrate_limit_errorapi_error
codestringrequired
messagestringrequired
paramstring

The request field that is wrong.

balance_centsinteger

With insufficient_balance: your balance now.

required_centsinteger

With insufficient_balance: what the purchase costs.

429

rate_limited: wait for the Retry-After seconds.

errorobjectrequired
Show properties
typestringrequired
Allowed:authentication_errorpermission_errorinvalid_request_errorrate_limit_errorapi_error
codestringrequired
messagestringrequired
paramstring

The request field that is wrong.

balance_centsinteger

With insufficient_balance: your balance now.

required_centsinteger

With insufficient_balance: what the purchase costs.

Try it
Server
Authorization
Request
curl -X GET 'https://trimcarbon.com/api/v1/impact' \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -H 'Accept: application/json'
Response
{
  "object": "impact",
  "livemode": true,
  "placed_kg": 0,
  "processing_kg": 0,
  "offsets": 0
}

Was this page helpful?