The endpoint that matters
One request returns the whole budget: accounts, payees, categories, months, transactions, scheduled transactions. Pass last_knowledge_of_server and you get only what changed since. Two requests an hour is well inside the limit of 200 per hour.
GET /v1/budgets/{budget_id}?last_knowledge_of_server={cursor}
Authorization: Bearer $YNAB_TOKEN
The landing table
ynab_raw.api_responses (
id, endpoint, budget_id,
request_knowledge, server_knowledge,
payload jsonb,
fetched_at, transformed_at
)
- Append only. Nothing updates a landed row except
transformed_at. - Money arrives in milliunits: 1000 is one dollar. It stays that way in the modeled tables and is converted only in views.
- The landing schema is excluded from backups and hidden from the read-only role. It is replayable, and it is also where unredacted payloads live.
Why raw first
Three transform bugs were fixed in the first week. Not one required re-fetching the API. The fix was a new SQL function and a replay of the rows already on disk.
Free to borrow for your feed · Square edition
Where you are: every response on disk, forever. Next, it becomes tables you can query.
