Hi There,
We are using Marketo Rest API to pull data from Marketo. For extracting activities we have to first generate a token(nextpagetoken) which can be used to fetch Activity from the date that user has provided.
For generating initial token as per marketo documentation we have to use pagingtoken API? . As per documentation this API supports three date formats for sinceDatetime parameters using any of these three formats we were able to generate paging token using either of the below sample API call:
But suddenly it started giving below error for 2013-05-22T11:03:26+05:30 and 2013-05-22T11:03+05:30 date formats and it only works with 2013-05-22 date format.
{
"requestId": "a1c9#15524613da4",
"success": false,
"errors": [
{
"code": "1001",
"message": "Invalid value '2013-05-22T11:03:26 05:30'. Required of type 'Date'"
}
]
}
Can someone please look into this issue and let us know why it suddenly stopped working?
Thanks!!
Message was edited by: Anil Upadhyay
Solved! Go to Solution.
Not a bug, standard URL encoding requirement. Encode + to %2B:
sinceDatetime=2016-03-01T00:00:00%2B05:00
Are you actually including the trailing question mark? That is certainly not allowed in the date format. This is standard ISO formatting, nothing special to Marketo.
EDIT: I didn't catch until a couple of posts later that Anil wasn't URL-encoding the plus sign.
No We are not appending ? at end . Updated the description.
Hi Anil
I just remembered.
In this case, plus timezone does not supported.
I think it's bug.
For example
Success
Failed
{"requestId":"17cc9#155247d9848","success":false,"errors":[{"code":"1001","message":"Invalid value '2013-05-22T11:03 09:00'. Required of type 'Date'"}]}
Thank you Sanford Whiteman
I forgot encoding.
I was confused because the "hh:mm:ss+09:00" format was working.
I think Anil's problem is same as me
Thanks Sanford!!
It was working before even if we were submitting the datetime having + sign. Seems like marketo started decoding the date parameter before executing request or marketo might have been ignoring time portion and now started considering that.
We will start encoding datetime string before submitting request.
Thanks again.