Created
May 25, 2020 20:13
-
-
Save katoen/2bb2b39900517a3813826407ad027b96 to your computer and use it in GitHub Desktop.
TOSHL Finance API Power BI - POST entries
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* POST TOSHL.com transaction in Power BI Power Query | |
https://developer.toshl.com/docs/entries/create/ | |
all KEYS & IDs stored as parameters | |
*/ | |
let | |
Source = Json.Document( | |
Web.Contents( | |
"https://api.toshl.com/entries", | |
[ | |
Headers = [#"Content-Type" = "application/json", accept = "application/json", Authorization | |
= "Bearer " & TOSHLAPIKEY], | |
// POST content | |
Content = Json.FromValue( | |
[ | |
amount = "-30", | |
account = TOSHLACCOUNT, | |
currency = [code = "EUR"], | |
date = "2020-05-25", | |
category = "64130375" | |
] | |
) | |
] | |
) | |
) | |
in | |
Source | |
/* IMPORTANT NOTICE: | |
transactions gets created in TOSHL, but error is returned in Power Query | |
>> DataFormat.Error: We reached the end of the buffer. | |
Work in progress... | |
*/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment