Getting errors on Create/Update Leads Rest API

Anonymous
Not applicable

Getting errors on Create/Update Leads Rest API

We are trying to create leads with a custom datetime field in marketo and are getting the below response.

{"requestId":"107fc#153f1364a7a","result":[{"status":"skipped","reasons":[{"code":"1003","message":"Invalid date '04/06/2016 16:37:37' for field 'dateCreated'"},{"code":"1003","message":"Invalid date '05/15/2010' for field 'lastAdmissionsAttempt'"}]}],"success":true}

Date created is in the JSON as "dateCreated": "04/06/2016 16:37:37"

Last Admissions Attempt is in the JSON as "lastAdmissionsAttempt": "05/15/2010"

Is there a reason why we are getting these errors.

1 REPLY 1
Kenny_Elkington
Marketo Employee

Re: Getting errors on Create/Update Leads Rest API

datetime expects ISO 8601 datetime strings, so you need to follow the yyyy-MM-ddThh:mm:ssz format/