Trying SOAP API syncCustomObject - 20110 - Input error

Anonymous
Not applicable

Trying SOAP API syncCustomObject - 20110 - Input error

Using https://github.com/PunchTab/suds-marketo/ library to access the SOAP api, I am able to pull in a lead:

import suds_marketo
client = suds_marketo.Client(soap_endpoint=endpoint, user_id=id_, encryption_key=key)
client.get_lead('j...rs@ud...y.com')

And, awesome, I get my marketo record back.  So, authentication is working.

When I try to create a custom object, following the example in the docs (http://developers.marketo.com/documentation/soap/synccustomobjects/):

cust_obj = client.CustomObj
att = client.Attribute
att.attrName = 'MKTOID'
att.attrValue = '1090177'
cust_obj.customObjKeyList.attribute.append(att)
att = client.Attribute
att.attrName = 'rid'
att.attrValue = 'rid1'
cust_obj.customObjKeyList.attribute.append(att)
att = client.Attribute
att.attrName = 'city'
att.attrValue = 'SanMateo'
cust_obj.customObjAttributeList.attribute.append(att)
co = client.ArrayOfCustomObj
co.customObj.append(cust_obj)

I get an error:
 
ERROR:suds.client:<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:ns0="http://www.marketo.com/mktows/" xmlns:ns1="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:tns="http://www.marketo.com/mktows/" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
   <SOAP-ENV:Header>
      <tns:AuthenticationHeader>
         <mktowsUserId>...</mktowsUserId>
         <requestSignature>...</requestSignature>
         <requestTimestamp>2014-11-03T05:50:06Z</requestTimestamp>
      </tns:AuthenticationHeader>
   </SOAP-ENV:Header>
   <ns1:Body>
      <ns0:paramsSyncCustomObjects>
         <objTypeName>ROADSHOW</objTypeName>
         <customObjList>
            <customObj>
               <customObjKeyList>
                  <attribute>
                     <attrName>MKTOID</attrName>
                     <attrValue>1090177</attrValue>
                  </attribute>
                  <attribute>
                     <attrName>rid</attrName>
                     <attrValue>rid1</attrValue>
                  </attribute>
               </customObjKeyList>
               <customObjAttributeList>
                  <attribute>
                     <attrName>city</attrName>
                     <attrValue>SanMateo</attrValue>
                  </attribute>
               </customObjAttributeList>
            </customObj>
         </customObjList>
         <operation>INSERT</operation>
      </ns0:paramsSyncCustomObjects>
   </ns1:Body>
</SOAP-ENV:Envelope>

WebFault: Server raised fault: '20110 - Input error'

When I look at the example given in the docs:
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://www.marketo.com/mktows/">
  3.   <SOAP-ENV:Header>
  4.     <ns1:AuthenticationHeader>
  5.       <mktowsUserId>demo17_1_809934544BFABAE58E5D27</mktowsUserId>
  6.       <requestSignature>ca67d597ced5bfce7f638e96204d6e1f38d3ffe7</requestSignature>
  7.       <requestTimestamp>2013-08-20T10:26:07-07:00</requestTimestamp>
  8.     </ns1:AuthenticationHeader>
  9.   </SOAP-ENV:Header>
  10.   <SOAP-ENV:Body>
  11.     <ns1:paramsSyncCustomObjects>
  12.       <objTypeName>RoadShow</objTypeName>
  13.       <customObjList>
  14.         <customObj>
  15.           <customObjKeyList>
  16.             <attribute>
  17.               <attrName>MKTOID</attrName>
  18.               <attrValue>1090177</attrValue>
  19.             </attribute>
  20.             <attribute>
  21.               <attrName>rid</attrName>
  22.               <attrValue>rid1</attrValue>
  23.             </attribute>
  24.           </customObjKeyList>
  25.           <customObjAttributeList>
  26.             <attribute>
  27.               <attrName>city</attrName>
  28.               <attrValue>SanMateo</attrValue>
  29.             </attribute>
  30.             <attribute>
  31.               <attrName>zip</attrName>
  32.               <attrValue>94404</attrValue>
  33.             </attribute>
  34.             <attribute>
  35.               <attrName>state</attrName>
  36.               <attrValue>California</attrValue>
  37.             </attribute>
  38.           </customObjAttributeList>
  39.         </customObj>
  40.       </customObjList>
  41.       <operation>UPSERT</operation>
  42.     </ns1:paramsSyncCustomObjects>
  43.   </SOAP-ENV:Body>
  44. </SOAP-ENV:Envelope>
I don't see any difference.  Am I missing something?  What am I doing wrong?
Tags (1)
1 REPLY 1
Jep_Castelein2
Level 10

Re: Trying SOAP API syncCustomObject - 20110 - Input error

Did you have the Custom Object provisioned in your instance? This is a manual process through Marketo Services.