Hey Guys
Anyone know how to update cost by API?
I am using
really hate to update cost manually.
Thanks!
Ok, first of all read the article about Using Voluum Reporting API if you haven't already. Everything you need to do to use the voluum API is explained in there.
I assume you understand how to send HTTP requests etc. so here is what you have to send to update a campaign's cost:
{"campaignId":"your campaign id","cost":"your new cost","from":"your from date","restoreCost":false,"timeZone":"your time zone","to":"your to date"}
Hi Ebaskin,
Tried to take your advice on this and set it up but am having <Response [400]> errors. Was wondering if you might have any insights as I haven't been able to get it work and I"ve tried a few things already
thanks.
s =Voluum .login_voluum() payload = {'campaignId': '60f092e3-242e-4700-b38c-7feda8769839', 'cost': '8.27', 'from': "2016-08-29T13:00:00", 'to' : "2016-09-03T13:00:00", 'restoreCost': 'false', 'timeZone' : "Asia/Shanghai"} s.headers.update({'Content-Type': 'application/json', 'Content-length' : '171'}) r_url = "https://reports.Voluum.com /manual-costs" r = s.post(r_url, params=payload) print(r) print(r.text)