Skip to main content
December 15, 2014
Question

611 when calling leads.json

  • December 15, 2014
  • 2 replies
  • 883 views
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.
 
This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

2 replies

December 15, 2014
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.
 
December 15, 2014
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.