geoffo geoffo - 17 days ago 5
reST (reStructuredText) Question

Marketo Rest API - Update Leads using Id

How does one go about updating a lead using a lookupField of 'id'? I attempted to perform an update but received a '1003 - Field 'id' not allowed' error. Below is my request data for reference.

{
"action": "updateOnly",
"lookupfield": "id",
"input": [
{
"id": "11",
"Company": "TestCompany",
"NumberOfEmployees": "100"
}
]
}

Answer

Your "lookupField" parameter needs to be camel case in order to designate the lookup field like this:

{
  "action": "updateOnly",
  "lookupField": "id",
  "input": [
    {
      "id": "11",
      "Company": "TestCompany",
      "NumberOfEmployees": "100"
    }
  ]
}

This error is thrown so that if lookupField isn't specified that the deduplication is not ambiguous is both id and email are included in the input for a lead.

Comments