Ledger Record Schema
Overview
Final reservation-based ledger entry that records the reserved amount, actual billing, and revenue share for aserve_token.
Required Fields
| Field | Type | Description |
|---|---|---|
serve_token | string | Token linking exposure → click → conversion |
session_id | string | Conversation/session identifier |
auction_id | string | Auction that produced the serve |
platform_id | string | Platform identifier |
brand_agent_id | string | Winning Brand Agent |
state | string | Ledger state (PENDING, EXPOSED, CLICKED, CONVERTED, FINALIZED, REFUNDED) |
reserved_unit | string | Unit reserved at auction (CPX, CPC, CPA) |
reserved_amount_cents | integer | Amount held from the wallet (in cents) |
final_unit | string | Unit actually billed (CPX, CPC, CPA) |
final_amount_cents | integer | Actual charge applied (in cents) |
currency | string | ISO currency code |
timestamps | object | ISO timestamps for major lifecycle steps |
Timestamps Object
| Field | Type | Description |
|---|---|---|
auction | string | When the auction completed |
exposure | string | When exposure occurred |
click | string | When click occurred |
conversion | string | When conversion occurred |
finalized | string | When ledger entry was finalized |
Optional Fields
| Field | Type | Description |
|---|---|---|
revenue_share | object | Breakdown of platform/operator cents |
ext | object | Vendor extensions |
Revenue Share Object
| Field | Type | Description |
|---|---|---|
platform_cents | integer | Portion allocated to the platform |
operator_cents | integer | Portion allocated to the operator |
Example
Validation Rules
- Amount fields must be integers ≥ 0
statemust be one of the defined enum valuesreserved_unitandfinal_unitmust each beCPX,CPC, orCPA- All timestamps must be ISO 8601 date-time strings