Skip to main content
GET
/
api
/
v2
/
external
/
orgs
/
{slug}
/
transactions
/
aggregate
Aggregate transactions
curl --request GET \
  --url https://api.example.com/api/v2/external/orgs/{slug}/transactions/aggregate
{
  "aggregates": [
    {
      "group_by_value": "<string>",
      "count": 123,
      "total_amount": "<string>",
      "first_created_at": "2023-11-07T05:31:56Z",
      "last_created_at": "2023-11-07T05:31:56Z"
    }
  ]
}

Path Parameters

slug
string
required

Query Parameters

category
enum<string>
required

Public-facing transaction categories.

Each value maps to a Croesus meter slug internally (see service.transaction_category_to_meter). The indirection lets us rename or reshape Croesus meters without breaking the public API.

Available options:
vms,
executions,
inference_prompt_tokens,
inference_completion_tokens,
serverless_inference_prompt_tokens,
serverless_inference_completion_tokens
group_by
string
required

Response

Successful Response

category
enum<string>
required

Public-facing transaction categories.

Each value maps to a Croesus meter slug internally (see service.transaction_category_to_meter). The indirection lets us rename or reshape Croesus meters without breaking the public API.

Available options:
vms,
executions,
inference_prompt_tokens,
inference_completion_tokens,
serverless_inference_prompt_tokens,
serverless_inference_completion_tokens
aggregates
OrgTransactionAggregate · object[]
required