Re: Create Opportunities

Anonymous
Not applicable

Create Opportunities

I'm trying to create opporutnities via the API but running into an issue.  I've tried quite a few variations of the below but always seem to get the same error.  Can anyone see the error in the format that I'm just not seeing?  Thank you for any help!!

{:success_sync_m_objects=>
  {:result=>
    {:m_obj_status_list=>
      {:m_obj_status=>
        {:id=>nil,
         :status=>"FAILED",
         :error=>"Value for attribute 'Name' is required"}}}}}

Request:
<?xml version="1.0" encoding="UTF-8"?>
<env:Envelope xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ns1="http://www.marketo.com/mktows/" xmlns:env="http://schemas.xmlsoap.org/soap/envelope/">
  <env:Header>
    <ns1:AuthenticationHeader>
      <mktowsUserId>stuff</mktowsUserId>
      <requestSignature>more stuff</requestSignature>
      <requestTimestamp>more stuff</requestTimestamp>
    </ns1:AuthenticationHeader>
  </env:Header>
  <env:Body>
    <ns1:paramsSyncMObjects>
      <mObjectList>
        <mObject>
          <type>Opportunity</type>
          <Name>TEST_OPP1</Name>
          <typeAttribList>
            <typeAttrib>
              <attrList>
                <attrib>
                  <Name>Name</Name>
                  <Value>TEST_OPP1</Value>
                </attrib>
              </attrList>
            </typeAttrib>
          </typeAttribList>
        </mObject>
      </mObjectList>
      <operation>INSERT</operation>
    </ns1:paramsSyncMObjects>
  </env:Body>
</env:Envelope>
Tags (1)
2 REPLIES 2
Anonymous
Not applicable

Re: Create Opportunities

http://integratingthecloud.com/opportunity-marketo-api/ is a good article that outlines how to create opportunities using the API
Anonymous
Not applicable

Re: Create Opportunities

Just to confirm, in order to create Opportunities via the API I need to call support to have two custom fields created, otherwise the API will not accept the create opportunity call as valid?