Entry
An Entry is one line of a double-entry posting: an amount to one account in the chart of accounts, caused by one Event.
Properties
| Property | Type | Required | Description |
|---|---|---|---|
account | string | required | The code of the account in the chart of accounts, such as revenue or cash. |
amount | money | required | The amount and currency. |
direction | string | required | One of debit or credit. |
startup | Startup | required | The Startup whose books the Entry belongs to. |
counterparty | Startup | The sibling Startup on the other side of an intercompany Entry; empty for outside parties. |
Object
{
"$id": "https: //api.sb/ tutorloop.com/ entries/ entry_1",
"$type": "Entry",
"account": "cash",
"amount": {
"amount": 60,
"currency": "USD"
},
"direction": "debit",
"startup": "startup_1",
"counterparty": "startup_1"
}Relationships
- An Entry is caused by one Event: every ledger Entry traces to the one Event that caused it, such as
Order.paid.causedBy, inversecauses. - An Entry falls in one Period: an Entry posts to the month its Event happened; closing the Period locks it.
fallsIn, inverseentries. - An Entry posts to one Account: each Entry posts to one Account, and an Account’s balance is the sum of its Entries.
postsTo, inverseentries. - An Entry is reconciled by many Transactions: the ledger Entries the Transaction settles, matched during reconciliation.
reconciledBy, inversereconciles.
Verbs
getReturns one Entry by id.GET /{namespace}/entries/{id}listReturns Entries, newest first, one page at a time.GET /{namespace}/entriespostPost records a manual Entry pair that no Verb caused, once a second Role approves it.POST /{namespace}/entries/postsettleSettle nets a Period’s intercompany Entries between two Companies into one transfer through Stripe and reconciles both sides.POST /{namespace}/entries/settle
An Entry is kept forever and never edited: it has no update or delete.
Permissions
Which Access level may call each Verb. One-way Verbs wait their delay window.
| Operation | owner | admin | member | viewer |
|---|---|---|---|---|
Entry.get | Yes | Yes | Yes | Yes |
Entry.list | Yes | Yes | Yes | Yes |
Entry.post | Yes | No | No | No |
Entry.settle | Yes | No | No | No |
Call it
Post the latest entry.Example
A $49 payment posts two Entries: $49 to cash and $49 to revenue. The Invoice.paid Event causes both.