1

SOAP Request ::

<soap:Body>
    <CreateRequest xmlns="http://exacttarget.com/wsdl/partnerAPI"
        xmlns:ns2="urn:fault.partner.exacttarget.com">
        <Options>
            <SaveOptions>
                <SaveOption>
                    <PropertyName>*</PropertyName>
                    <SaveAction>UpdateAdd</SaveAction>
                </SaveOption>
            </SaveOptions>
        </Options>
        <Objects xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
            xsi:type="Subscriber">
            <Client>
                <PartnerClientKey>xxxxxxx</PartnerClientKey>
            </Client>
                <emailaddress>[email protected]</emailaddress>
                <subscriberkey>xxxxxxx</subscriberkey>
                <lists>
                    <partnerkey xsi:nil="true"></partnerkey>
                    <id>xxxxxxx</id>
                    <objectid xsi:nil="true"></objectid>
                    <status>Active</status>
                </lists>
                <status>Active</status>
        </Objects>
    </CreateRequest>
</soap:Body>

Response Envelope ::

<soap:Body>
  <CreateResponse xmlns="http://exacttarget.com/wsdl/partnerAPI">
     <Results>
        <StatusCode>Error</StatusCode>
        <StatusMessage>InvalidEmailAddress</StatusMessage>
        <OrdinalID>0</OrdinalID>
        <ErrorCode>12000</ErrorCode>
        <NewID>0</NewID>
        <Object xsi:type="Subscriber">
           <Client>
              <ID>xxxxxxxx</ID>
              <PartnerClientKey>xxxx</PartnerClientKey>
           </Client>
           <PartnerKey xsi:nil="true"/>
           <ObjectID xsi:nil="true"/>
        </Object>
     </Results>
     <RequestID>xxxxxx</RequestID>
     <OverallStatus>Error</OverallStatus>
  </CreateResponse>
</soap:Body>

I can verify that the email address in question is perfectly valid. I cant tell the actual cause of the error. Thank you for helping me out here.

1 Answer 1

1

I think it's complaining because XML (and therefore SOAP) is case sensitive. "emailaddress" should be "EmailAddress". Your emailaddress key just happens to be first so it's throwing the error there. Here is the full example:

    <CreateRequest xmlns="http://exacttarget.com/wsdl/partnerAPI">
        <Objects xsi:type="Subscriber">
            <ObjectID xsi:nil="true">
            </ObjectID>
            <EmailAddress>[email protected]</EmailAddress>
            <Lists>
                <ID>123</ID>
                <ObjectID xsi:nil="true">
                </ObjectID>
            </Lists>
            <Attributes>
                <Name>First Name</Name>
                <Value>Lee</Value>
            </Attributes>
            <Attributes>
                <Name>Last Name</Name>
                <Value>Cruz</Value>
            </Attributes>
            <Attributes>
                <Name>Company</Name>
                <Value>Northern Trail Outfitters</Value>
            </Attributes>
        </Objects>
    </CreateRequest>
2
  • Thanks for your response. I did correct the email field and subscriberkey field. however when I make this call, it only creates a subscriber but does not add the subscriber to the list mentioned in the request call. My only purpose is to add a subscriber in a given publication list with a given subscribe status. Thanks a lot.
    – Ashish
    Commented Feb 17, 2015 at 22:04
  • Did you make your list keys case-sensitive as well? ie. <Lists><ID>... Commented Feb 17, 2015 at 22:35

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .