API reference · Public
One sealed day
GET/api/receipts/commitments/{day}No key
What /verify compares a recomputed root with. 404 commitment_not_found for a day not sealed, 400 invalid_day for anything that is not YYYY-MM-DD.
Parameters
| Field | Type | What it is |
|---|---|---|
| day (path)required | string | A UTC day, YYYY-MM-DD. |
Answer 200
The sealed day.
| Field | Type | What it is |
|---|---|---|
| object | string | One of "receipt_commitment". |
| version | integer | |
| day | string | |
| root | string | |
| header | object | The day header. The day's root is SHA-256 of the byte 0x02 followed by the UTF-8 of the JSON array ["am-day-v1", day, usage_root, usage_count, ledger_root, ledger_count, billed_micros, upstream_micros, unmeasured_count]. |
| header. | string | The UTC day. |
| header. | string | |
| header. | integer | |
| header. | string | |
| header. | integer | |
| header. | integer | What the meter billed that day, micro USD. |
| header. | integer | What the upstreams charged, micro USD; a usage row nobody measured counts at its billed figure. |
| header. | integer | Usage rows with no measured upstream cost. |
| margin_micros | integer | Billed minus upstream. |
| implied_markup_bps | integer or null | The margin over the upstream cost, basis points; null when nothing was measured. |
| committed_at | integer | |
| publication | object or null | Where the root was published: a transaction from the operator's signer to itself whose calldata is the UTF-8 text `antimatter receipts v1 <day> <root>`. Null while it is not on chain, which is always the case where the operator has not switched publishing on. |
Errors
- 400OpenAI shaped error.
- 404OpenAI shaped error.
- 429OpenAI shaped error.
Every error answers in one shape, with its type, code and the field it names. The whole list is in the docs' Errors section.