Get posted history
Reads saved credit state. Missing projections return unavailable, never a zero estimate. Secret and trusted tokens require read permissions.
AuthorizationBearer <token>A secret, trusted or limited token. See Authentication.
id*stringResource identity owned by this account and mode.
from*stringUTC range up to 366 days. Balances follow posting order, not occurrence time.
to*stringUTC range up to 366 days. Balances follow posting order, not occurrence time.
bucket*stringUTC range up to 366 days. Balances follow posting order, not occurrence time.
"day""month"starting_after?stringUTC range up to 366 days. Balances follow posting order, not occurrence time.
limit?integerUTC range up to 366 days. Balances follow posting order, not occurrence time.
1 <= value <= 100Success.
application/json- response
object?unknownopening_balance?stringclosing_balance?stringunit_snapshot?|nullcomplete?booleanas_of?stringdate-timehas_more?booleanseries?array<>data?array<>curl -X GET 'https://api.comecero.com/api/v1/usage/entitlements/string/history?from=string&to=string&bucket=day'{ "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"}Change usage terms POST
Revision checked credit operation. Secret and trusted tokens require the applicable resource permission. New writes require header idempotency. Immutable rates do not reprice existing agreements. Core validates exact conversion, current funding, prepared work and protected billing boundaries.
Create or update an entitlement POST
A `metered` entitlement bills a metric on a pinned rate plan version. A `credit` entitlement holds prepaid credit for the agreement. Send an existing `entitlement_id` to update it: its `kind`, agreement, metric and `customer_id` can not change. It answers `201` for a create and for an update. Create a credit entitlement before a metered one that draws on it. Secret and trusted tokens may call it; a limited token may not (`403`).