API stats do not match UI


#1

Hi, I am building automated daily reports for campaigns run and there is a difference between the impressions, spend etc the API returns and when I do an export of “Yesterday”. I am running from midnight to midnight, I assume the UI also runs midnight to midnight?

I am making a request of the form below. Any help would be massively appreciated.

https://ads-api.twitter.com/0/stats/accounts/XXXX/campaigns?campaign_ids=XXXX,XXXX&granularity=TOTAL&start_time=2015-07-27T00%3A00%3A00Z&end_time=2015-07-28T00%3A00%3A00Z


#2

The Ads UI uses the time zone of your ads account (determined at sign up). You will need to translate midnight in your time zone to UTC when using the API.

Please let us know if that doesn’t resolve the issue.


#3

It ended up being a timezone issue between local time discrepancy that took a while to figure out, between the ad account time and the server I was running. Thanks for your help.