Work in progress: This is currently just a pet project, so I make no promises about maintaining it or functionality.
Head on over to YNAB's Personal Access Tokens page for instructions on generating a token.
- Implement functionality for all API endpoints
- Add Tests
- Rethink naming format
Attempting to implement functionality for all endpoints listed here, as of 2018-09-06.
- [GET] /user - getUser
- [GET] /budgets
getBudgets
- [GET] /budgets/{budget_id}
getBudgetById (budgetId :: Text)
- [GET] /budgets/{budget_id}/settings
getBudgetSettingsById (budgetId :: Text)
The Accounts for a budget.
- [GET] /budgets/{budget_id}/accounts
getAccounts (budgetId :: Text)
- [GET] /budgets/{budget_id}/accounts/{account_id}
getAccountById (budgetId :: Text) (accountId :: Text)
The Categories for a budget.
- [GET] /budgets/{budget_id}/categories
getCategories (budgetId :: Text)
- [GET] /budgets/{budget_id}/categories/{category_id}
getCategoriesById (budgetId :: Text) (categoryId :: Text)
The Payees for a budget.
- [GET] /budgets/{budget_id}/payees
getPayees (budgetId :: Text)
- [GET] /budgets/{budget_id}/payees/{payee_id}
getPayeeById (budgetId :: Text) (payeeId :: Text)
When you enter a transaction and specify a payee on the YNAB mobile apps, the GPS coordinates for that location are stored, with your permission, so that the next time you are in the same place (like the Grocery store) we can pre-populate nearby payees for you! It’s handy and saves you time. This resource makes these locations available. Locations will not be available for all payees.
- [GET] /budgets/{budget_id}/payee_locations
getPayeeLocations (budgetId :: Text)
Note about these two: since I don't use payee locations, I currently have no idea if these end points work. They should work in theory.
- [GET] /budgets/{budget_id}/payee_locations/{payee_location_id}
getPayeeLocationById (budgetId :: Text) (plId :: Text)
- [GET] /budgets/{budget_id}/payees/{payee_id}/payee_locations
getPayeeLocations (budgetId :: Text) (payeeId :: Text)
Each budget contains one or more months, which is where To be Budgeted, Age of Money and Category (budgeted / activity / balances) amounts are available.
- [GET] /budgets/{budget_id}/months
getBudgetMonths (budgetId :: Text)
- [GET] /budgets/{budget_id}/months/{month}
getBudgetMonth (budgetId :: Text) (monthstring :: Text (i.e. "2018-09-01" or "current"))
The Transactions for a budget.
-
[GET] /budgets/{budget_id}/transactions
getTransactions (budgetId :: Text)
-
[POST] /budgets/{budget_id}/transactions
postTransaction (budgetId :: Text) (SaveTransactionWrapper (transaction :: SaveTransaction))
postTransactions (budgetId :: Text) (SaveTransactionsWrapper (transactions :: [SaveTransaction]))
-
[POST] /budgets/{budget_id}/transactions/bulk
-
[GET] /budgets/{budget_id}/accounts/{account_id}/transactions
getTransactionsByAccountId (budgetId :: Text) (accountId :: Text)
-
[GET] /budgets/{budget_id}/categories/{category_id}/transactions
getTransactionsByCategoryId (budgetId :: Text) (categoryId :: Text)
-
[GET] /budgets/{budget_id}/payees/{payee_id}/transactions
getTransactionsByPayeeId (budgetId :: Text) (payeeId :: Text)
-
[GET] /budgets/{budget_id}/transactions/{transaction_id}
getTransactionsByTransactionId (budgetId :: Text) (transactionId :: Text)
-
[PUT] /budgets/{budget_id}/transactions/{transaction_id}
The Scheduled Transactions for a budget.
- [GET] /budgets/{budget_id}/scheduled_transactions
getScheduledTransactions (budgetId :: Text)
- [GET] /budgets/{budget_id}/scheduled_transactions/{scheduled_transaction_id}
getScheduledTransactionById (budgetId :: Text) (schedulTransactionId :: Text)
Shoutout to ConnorGriffin for his README.md format inspiration.