Currently i'm working on api connector which is pulling marketing data from snapchat api. Everything was flawless until i've reach campaign stats endpoint with granularity "day".
Example GET url looks like:
https://adsapi.snapchat.com/v1/campaigns/some-campaign-id/stats?granularity=DAY&start_time=2017-11-05T22:00:00.000+02:00&end_time=2017-12-12T22:00:00.000+02:00
Any starting date is giving api error:
"Invalid query parameters in request URL: [Invalid StartDateTime, 2015-11-05T22:00:00.000 02:00]"
In docs is written that date format must be ISO8601 with full hour. Even api shows how result should look like: "start_time": "2016-08-05T22:00:00.000-07:00"
I've used same date and still i had error by error. I tried to use DataTime object ((new DateTime('1-04-2018'))->format('c')), simple date('c'), manual date insert to url to see if its working and still no success.
Endpoint is working fine when i use granularity TOTAL(no dates) but that not the case here. Have somebody knows how date in url should looks like?