comecerodocs

Get posted history

GET
/usage/entitlements/{id}/history

Reads saved credit state. Missing projections return unavailable, never a zero estimate. Secret and trusted tokens require read permissions.

Authorization

headerAuthorizationBearer <token>

A secret, trusted or limited token. See Authentication.

Path Parameters

id*string

Resource identity owned by this account and mode.

Query Parameters

from*string

UTC range up to 366 days. Balances follow posting order, not occurrence time.

to*string

UTC range up to 366 days. Balances follow posting order, not occurrence time.

bucket*string

UTC range up to 366 days. Balances follow posting order, not occurrence time.

Value in"day""month"
starting_after?string

UTC range up to 366 days. Balances follow posting order, not occurrence time.

limit?integer

UTC range up to 366 days. Balances follow posting order, not occurrence time.

Range1 <= value <= 100

Response Body

Success.

application/json
  1. response
object?unknown
opening_balance?string
closing_balance?string
unit_snapshot?|null
complete?boolean
as_of?string
Formatdate-time
has_more?boolean
series?array<>
data?array<>
Example Request
curl -X GET 'https://api.comecero.com/api/v1/usage/entitlements/string/history?from=string&to=string&bucket=day'
Example Response
{  "object": "credit_history",  "opening_balance": "10",  "closing_balance": "8",  "unit_snapshot": {    "object": "credit_unit_rate",    "credit_unit_rate_id": "rate_compute_usd_1",    "credit_unit_id": "unit_compute",    "account_id": "AB1234",    "test": true,    "currency": "USD",    "version": 1,    "money_per_credit": "0.01",    "credits_per_money": "100",    "singular_label": "credit",    "plural_label": "credits",    "date_published": "2026-11-02T00:00:00Z"  },  "series": [    {      "from": "2026-11-25T00:00:00Z",      "closing_balance": "8",      "credit_balance": "800"    }  ],  "data": [    {      "ledger_entry_id": "ule_posted_1",      "seq": 2,      "quantity": -2,      "exact_amount": "-2",      "credits": "-200",      "balance_after": 8,      "recorded_at": "2026-11-25T12:00:00Z",      "occurred_at": "2026-11-24T23:00:00Z",      "kind": "credit_drawdown",      "unit_snapshot": {        "object": "credit_unit_rate",        "credit_unit_rate_id": "rate_compute_usd_1",        "credit_unit_id": "unit_compute",        "account_id": "AB1234",        "test": true,        "currency": "USD",        "version": 1,        "money_per_credit": "0.01",        "credits_per_money": "100",        "singular_label": "credit",        "plural_label": "credits",        "date_published": "2026-11-02T00:00:00Z"      }    }  ],  "has_more": false,  "complete": true,  "as_of": "2026-11-26T12:00:00Z"}