Hi,
I’m trying to migrate our application to Ads API v1 and we use v0 stats endpoint to retrieve all statistics from a line_item starting 3 days ago and ending at actual time.
Adapting our app to the new v1 we realized that you need to put END TIME setted at midnight but you can’t and before actual time, so with granularity DAY you can’t reach until today.
Following Partner Inbounds
Command
twurl -H https://ads-api.twitter.com '/1/stats/accounts/18ce54alb6p?start_time=2016-03-31T22:00:00Z&granularity=DAY&entity=LINE_ITEM&metric_groups=ENGAGEMENT&placement=ALL_ON_TWITTER&entity_ids=4pwbd&end_time=2016-04-04T22:00:00Z' | json
Output
{ "errors": [ { "code": "INVALID_PARAMETER", "message": "Expected time before 2016-04-04T16:31:01Z, got \"2016-04-04 22:00:00 +0000\" for end_time", "parameter": "end_time" } ], "request": { "params": { "account_id": "18ce54alb6p", "end_time": "2016-04-04T22:00:00Z", "entity": "LINE_ITEM", "entity_ids": [ "4pwbd" ], "granularity": "DAY", "metric_groups": [ "ENGAGEMENT" ], "placement": "ALL_ON_TWITTER", "start_time": "2016-03-31T22:00:00Z" } } }
Expected
Results as with v0 ads API.
Also, if I try with an our before time as errors say, I get that end_time should be aligned with midnight.
Thanks for your time