Hi, the problem is i am trying to figure out how the json response looks like and there is no documentation that covers this fully. For example this is what is shown in documentaiton for get lead: but this is not full, i see i am also getting "errors". How can i know what response to expect?
{
"requestId":"e42b#14272d07d78",
"success":true,
"result":[
{
"id":60,
"email":"kjashaedd@klooblept.com",
"firstName":"Kataldar",
"updatedAt":"2013-11-21T11:47:30-08:00"
}
]
}
thanks,
A
Anonymous
September 4, 2014
Could you please post the request you are making and error you are getting?
A
Anonymous
September 4, 2014
I fixed the problem. but i need to build the java rest objects according to the errors i receive. If there is a missing field error i add a field. isn't there a java rest api library i can use that has all the objects for the rest call?
Another question, when i do Get Lead by Id i only get a few of the Lead's fields. how can i get the fields i want of the lead? thanks
A
Anonymous
September 4, 2014
Hi Amnon,
The REST API is still somewhat limited, and Get Lead by Id does indeed return a small subset of the fields from a Lead record.
You may want to explore the SOAP API, instead of REST, which allows you to fetch all of the built-in and custom fields via a getLead call. It is a little more complicated, but is more mature, and there are more examples around the web for complex operations.
There are also Java code examples and a simple library provided by Marketo in this Github repository.
I hope this is more what you were looking for; if you are accessing the API programmatically, the added complexity is likely not a huge issue.
Best, Kyle
A
Anonymous
September 7, 2014
Hi. i do use the SOAP API currently. I wanted to move to REST API cause i understood it is now ready for use and of course it is preferable to use it then SOAP. As for the get Lead, i guess i can not use it for now.
A
Anonymous
September 7, 2014
Hi, so now, i am trying to work with update Lead and rest API. in SOAP i could pass a map which was dynamically created and i didn't have to know the fields in advance. in Rest, it is defined that "input" field should be Array of lead records to create or update how can i send a map dynamicaly created with changing attributes? thanks