1

I am getting this error:

Object not set to an instance of an object.

What am I missing?

<?xml version="1.0" encoding="utf-8"?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
   <soapenv:Header>
      <wsse:Security soapenv:mustUnderstand="1" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
         <wsse:UsernameToken wsu:Id="UsernameToken-32259181" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
            <wsse:Username>xxxx</wsse:Username>
            <wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText">xxxx</wsse:Password>
         </wsse:UsernameToken>
      </wsse:Security>
   </soapenv:Header>
   <soapenv:Body>
        <RetrieveRequestMsg xmlns="http://exacttarget.com/wsdl/partnerAPI">
            <RetrieveRequest>
             <ClientIDs>
                <ID>xxxxxx</ID>
             </ClientIDs>    
             <QueryAllAccounts>true</QueryAllAccounts>                  
                <ObjectType>Automation</ObjectType>
                <Properties>ProgramID</Properties>
                <Properties>CustomerKey</Properties>
                <Properties>Status</Properties>
                <Filter xsi:type="SimpleFilterPart">
                    <Property>CustomerKey</Property>
                    <SimpleOperator>equals</SimpleOperator>
                    <Value>5a5b94db-a786-5512-e10f-07b3d2b253b4</Value>
                </Filter>
            </RetrieveRequest>
        </RetrieveRequestMsg>
   </soapenv:Body>
</soapenv:Envelope>

If I remove the ClientIDs and QueryAllAccounts I get a successful result?

2 Answers 2

3

I was using ClientIDs and it's supposed to be Client

         <Client>
            <ID>xxxxxx</ID>
         </Client> 
0

You need to set the Client ID (the Business unit MID) in your API call. In Create, Delete, Perform, and Update SOAP calls you do that like this:

<Client>
   <ID>${#Project#BU}</ID>
</Client>

Retrieve calls use a different format:

<ClientIDs>
   <ClientID>1427728</ClientID>
</ClientIDs>

You must log in to answer this question.

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