Marketo Rest API - Update Leads using Id

1.2k views Asked by At

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"
    }
  ]
}
1

There are 1 answers

1
kelkington On BEST 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.