Created
September 14, 2017 21:21
-
-
Save fr34kyn01535/8331a33f82f1b3af4e99dbd1d2d226ce to your computer and use it in GitHub Desktop.
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
let request = require("request"); | |
var token = "XXXXXXXXXXXXXXX"; | |
request.get({ url : "https://my.sevdesk.de/api/v1/CheckAccountTransaction/?limit=-1", headers : { "Authorization" : token } }, | |
function (error, response, body) { | |
let transactions = JSON.parse(body); | |
for(var transaction of transactions.objects){ | |
if(transaction.checkAccount.id === "157622"){ | |
request.delete({ url : "https://my.sevdesk.de/api/v1/CheckAccountTransaction/"+transaction.id+"/", headers : { "Authorization" : token } }); | |
} | |
} | |
} | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment