using InsertRecords with ACCOUNTID for contacts works on new contact insert, fails on contact update

using InsertRecords with ACCOUNTID for contacts works on new contact insert, fails on contact update

Hi,

I'm using the latest version of InsertRecords as follows:

URL: https://crm.zoho.com/crm/private/xml/Accounts/insertRecords

Post data:
'authtoken'=>'REDACTED',
'scope'=>'crmapi',
'newFormat'=>1,
'version'=>4,
'duplicateCheck'=>2
  1. 'xmlData'=> '<?xml version="1.0"?>
  2. <Contacts>
  3. <row no="1">
  4. <![CDATA[]]>
  5. <FL val="First Name">
  6. <![CDATA[D]]>
  7. </FL>
  8. <FL val="Last Name">
  9. <![CDATA[L]]>
  10. </FL>
  11. <FL val="Email">
  12. <![CDATA[dl@email.com]]>
  13. </FL>
  14. <FL val="Title">
  15. <![CDATA[MyTitle]]>
  16. </FL>
  17. <FL val="Phone">
  18. <![CDATA[(999) 999-9999]]>
  19. </FL>
  20. <FL val="Is Primary Contact?">
  21. <![CDATA[Yes]]>
  22. </FL>
  23. <FL val="Lead Source">
  24. <![CDATA[Drupal]]>
  25. </FL>
  26. <FL val="ACCOUNTID">
  27. <![CDATA[1037184000000323228]]>
  28. </FL>
  29. </row>
  30. <row no="2">
  31. <![CDATA[]]>
  32. <FL val="First Name">
  33. <![CDATA[H]]>
  34. </FL>
  35. <FL val="Last Name">
  36. <![CDATA[S]]>
  37. </FL>
  38. <FL val="Email">
  39. <![CDATA[hs@email.com]]>
  40. </FL>
  41. <FL val="Title">
  42. <![CDATA[MyTitle]]>
  43. </FL>
  44. <FL val="Phone">
  45. <![CDATA[(999) 999-9999]]>
  46. </FL>
  47. <FL val="Is Primary Contact?">
  48. <![CDATA[Yes]]>
  49. </FL>
  50. <FL val="Lead Source">
  51. <![CDATA[Drupal]]>
  52. </FL>
  53. <FL val="ACCOUNTID">
  54. <![CDATA[1037184000000323252]]>
  55. </FL>
  56. </row>
  57. </Contacts>'

What I have noticed is that when the contact does not already exist, the record inserts with no problem and I get a return code with success for the above. But when I rerun the above (to simulate an update), and the contact already exists, I get the following errors:

  1. <?xml version="1.0"?>
  2. <response uri="/crm/private/xml/Contacts/insertRecords">
  3.   <result>
  4.     <row no="1">
  5.       <error>
  6.         <code>401.2</code>
  7.         <details>You do not have the permission to edit this record or the "id" value you have given is invalid.</details>
  8.       </error>
  9.     </row>
  10.     <row no="2">
  11.       <error>
  12.         <code>401.2</code>
  13.         <details>You do not have the permission to edit this record or the "id" value you have given is invalid.</details>
  14.       </error>
  15.     </row>
  16.   </result>
  17. </response>

From what I understand, using version=4 with duplicateCheck=2 should update these records, not return an error code. I have confirmed the accountid's I am using are correct, and I was the creator and owner of all of these records.

Am I passing in the associated account wrong? Or is there an API bug?