1
Create a token
Open Settings > Connected apps in Visor and find the Personal API card.
- Give the token a name you will recognize, such as
Spending spreadsheet. - Choose what the token can do. Choose Read and record transactions, because this quickstart records an expense.
- Choose how long it is valid: 30, 90 (default), or 365 days. Never expires is also available, but a token with an expiry is safer.
- Select Create token and copy the value that starts with
visor_pat_.
2
Store the token in an environment variable
3
List your spaces
id to scope later requests to that space.4
Find an account and a category
Replace Copy the
SPACE_ID with an id from the previous step:id of the account that paid the expense, and the id of its category. A system category has a stable key, such as category.food_and_drinks, so a script can find it by key. See Spaces and reference data.5
Record an expense
201 Created with the new transaction. The amount is a decimal string, and the transaction takes the currency of its account:6
Retry safely
Send the same request again with the same
Idempotency-Key. Visor does not record a second expense: it returns the expense it already has, with the header idempotent-replayed: true. Your script can retry a timeout without creating duplicates. See Idempotency.7
See it in Visor
Open Transactions in Visor. The expense is in the account and the space you chose.
Next steps
- Export your history and edit transactions in Transactions.
- Find categories and tags in Spaces and reference data.
- Read how authentication and scopes work.
- Handle errors and rate limits in your client.