611 when calling leads.json

Anonymous
Not applicable

611 when calling leads.json

Hello,

New Marketo user, trying to get started on the REST APIs.

Am able to successfully create an oauth token, and am able to call various REST APIs (e.g. "/stats/usage/last7days.json"). However, when I try and update a lead - e.g.

curl --data '{"action":"updateOnly","lookupField":"email","input":[{"email":"testLead@gmail.com","firstName":"UpdatedFirstName"}]}' --header "Content-Type:json" https://our_instance.mktorest.com/rest/v1/leads.json?access_token=validAccessToken

(obviously our_instance and validAccessToken are correct!) I get 

{"requestId":"1197d#14a4d561cce","success":false,"errors":[{"code":"611","message":"System error"}]}

as a response. I'm trying to use the email field to look up the contact I want to update, and then change their first name.

Any clues?!

Thanks

Jon.
 
Tags (1)
2 REPLIES 2
Anonymous
Not applicable

Re: 611 when calling leads.json

Ah! Got it!

content-type needs to be "application/json;charset=UTF-8", not just "json". I was interpreting the ruby code example too literally.

Jon.
 
Anonymous
Not applicable

Re: 611 when calling leads.json

You are correct that content type needs to be "application/json;charset=UTF-8".  Specifying " :content_type => :json" is the convention used by the rest_client gem I implented this code sample with.

I am working on code samples in other programming languages now, so I'll make sure this is more clear going forward.