Wallets and ids
How a wallet scopes every route, how to find its id, and what the uuids in Walletguide responses refer to.
A wallet is the container: its assets, its transactions, its categories, its plans, and the people who can see them. Everything in the API hangs off one.
Finding the id
curl -H "Authorization: Bearer $WALLETGUIDE_API_KEY" \
https://api.walletguide.com/wallets[
{
"id": "01a08d79-0185-7418-b501-f4770dc6f99a",
"name": "Household",
"baseCurrency": "EUR",
"active": true,
"role": "owner"
}
]This is the one route without a wallet in its path, and it exists because a credential arrives knowing nothing. An API key answers with the single wallet it is scoped to; an OAuth grant answers with every wallet that person is a member of.
Roles
owner or editor. An owner can delete the wallet and change who is in it; an editor can change the data but not the membership. The role is on the membership, or for an API key on the key itself, so two keys in one wallet can have different roles.
Ids
Every id a client sees is a uuid (v7, so they sort by creation). Assets, transactions, categories, tags, members: all uuids, all scoped to their wallet. An id from one wallet is not valid in another, and a route will not find it rather than reveal that it exists.
Some rows also carry a firestoreId, left over from before the Postgres migration. It is there so old links keep resolving. Do not build on it.
Base currency
A wallet has one, and it is what cross-currency totals convert into. Individual amounts keep their own currency: an asset held in USD reports USD, and only the totals are converted, at the rate for the date in question.