diff options
author | William Carroll <wpcarro@gmail.com> | 2020-02-10T23·22+0000 |
---|---|---|
committer | William Carroll <wpcarro@gmail.com> | 2020-02-10T23·24+0000 |
commit | e223adfec540f3de19342b16eeb6336f14ff11e5 (patch) | |
tree | d24abff8125bc547bbb40e86851cb91b18913858 /monzo_ynab/requests.txt | |
parent | 2e719d117418e1e8718b242c0098b5e658fe714f (diff) |
Begin work on YNAB client
After reading these docs https://api.youneedabudget.com/v1#/Transactions/createTransaction I successfully made a request to post a transaction to my YNAB account. Hastily created a client.go that doesn't contain much at the moment.
Diffstat (limited to 'monzo_ynab/requests.txt')
-rw-r--r-- | monzo_ynab/requests.txt | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/monzo_ynab/requests.txt b/monzo_ynab/requests.txt index 5698dfee3763..2da17c0b326a 100644 --- a/monzo_ynab/requests.txt +++ b/monzo_ynab/requests.txt @@ -4,6 +4,7 @@ :ynab = https://api.youneedabudget.com/v1 :ynab-access-token := (getenv "ynab_personal_access_token") :ynab-budget-id := (getenv "ynab_budget_id") +:ynab-account-id := (getenv "ynab_account_id") # Test GET :ynab/budgets @@ -11,6 +12,27 @@ Authorization: Bearer :ynab-access-token # List transactions GET :ynab/budgets/:ynab-budget-id/transactions +Authorization: Bearer :ynab-access-token + +# Post transactions +POST :ynab/budgets/:ynab-budget-id/transactions +Authorization: Bearer :ynab-access-token +Content-Type: application/json +{ + "transactions": [ + { + "account_id": ":ynab-account-id", + "date": "2019-12-30", + "amount": 10000, + "payee_name": "Richard Stallman", + "memo": "Not so free software after all...", + "cleared": "cleared", + "approved": true, + "flag_color": "red", + "import_id": "xyz-123" + } + ] +} ################################################################################ # Monzo |