List billing history
GET
/v1/account/ledgerQuery parameters
cursorstringOpaque composite pagination cursor from the previous response. Do not parse or construct it.
limitintegerNumber of items to return
min 1 · max 100 · default: 20
Responses
200Confirmed immutable workspace credit events
dataobject[]requiredmax items 100
Show propertiesHide properties
Array of
objectidstring<uuid>requiredpaid_request_idstring<uuid>requiredgeneration_idstring<uuid> | nullrequiredevent_kindstringrequiredAllowed:
reservationsettlement_chargesettlement_refundfailure_refundcreditsintegerrequiredmin 0
directionstringrequiredAllowed:
debitcreditoperationstringrequiredmin length 1 · max length 96
modelstring | nullrequiredmin length 1 · max length 160
pricing_versionstring | nullrequiredmin length 1 · max length 80
api_key_idstring<uuid> | nullrequiredsurfacestring | nullrequiredAllowed:
public_apiprojectstring | nullrequiredmin length 1 · max length 64
cost_centerstring | nullrequiredmin length 1 · max length 64
quote_request_idstring<uuid> | nullrequiredconfirmation_request_idstring<uuid> | nullrequiredcreated_atstring<date-time>requiredmetaobjectrequiredShow propertiesHide properties
cursorstringmin length 1 · max length 4096
has_morebooleanrequiredRequest
curl -X GET "https://api.roasos.com/v1/account/ledger"const response = await fetch("https://api.roasos.com/v1/account/ledger", {
method: "GET"
});import requests
response = requests.get(
"https://api.roasos.com/v1/account/ledger",
)Response
{
"data": [
{
"id": "<uuid>",
"paid_request_id": "<uuid>",
"generation_id": "<uuid>",
"event_kind": "reservation",
"credits": 0,
"direction": "debit",
"operation": "string",
"model": "string",
"pricing_version": "string",
"api_key_id": "<uuid>",
"surface": "public_api",
"project": "string",
"cost_center": "string",
"quote_request_id": "<uuid>",
"confirmation_request_id": "<uuid>",
"created_at": "2024-01-01T00:00:00Z"
}
],
"meta": {
"cursor": "string",
"has_more": true
}
}