Access Child Account Objects

To execute certain actions or view information related to a child account, use the permissions and roles assigned to a different user. You can also use impersonation to help another user and troubleshoot their problems or issues inside their own account. You need admin access to perform impersonation.

These examples are for agency or Enterprise 1.0 with Lock and Publish account types. For Enterprise 2.0 accounts, use the ClientIDs property on a retrieve request to specify multiple child accounts for a single call.

Note

Sample .NET Code 

1//Options
2deo.Client = new ClientID();
3deo.Client.ID = Convert.ToInt32(txtMID.Text);
4deo.Client.IDSpecified = true;

Sample .NET Code - Retrieve Request with Impersonation 

1RetrieveRequest rr = new RetrieveRequest();
2rr.ObjectType = "Send";//required
3
4ClientID rrclient = new ClientID();
5rrclient.ID = 12345;
6rrclient.IDSpecified = true;
7
8RetrieveOptions ro = new RetrieveOptions();
9ro.Client = rrclient;
10rr.Options = ro;

Sample SOAP Envelope 

1XXXXX<?xml version="1.0" encoding="utf-8"?>
2<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">
3   <soapenv:Header>
4      <wsse:Security soapenv:mustUnderstand="1" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
5         <wsse:UsernameToken wsu:Id="UsernameToken-32259181" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
6            <wsse:Username>XXXXXXX</wsse:Username>
7            <wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText">XXXXX</wsse:Password>
8         </wsse:UsernameToken>
9      </wsse:Security>
10   </soapenv:Header>
11   <soapenv:Body>
12      <RetrieveRequestMsg xmlns="http://exacttarget.com/wsdl/partnerAPI">
13         <RetrieveRequest>
14            <ClientIDs>
15               <ID>12345</ID>
16            </ClientIDs>
17            <ObjectType>Subscriber</ObjectType>
18            <Properties>ID</Properties>
19            <Properties>PartnerKey</Properties>
20            <Properties>CreatedDate</Properties>
21            <Properties>Client.ID</Properties>
22            <Properties>Client.PartnerClientKey</Properties>
23            <Properties>EmailAddress</Properties>
24            <Properties>SubscriberKey</Properties>
25            <Properties>Status</Properties>
26            <Properties>UnsubscribedDate</Properties>
27            <!--<Filter xsi:type="SimpleFilterPart">
28               <Property>SubscriberKey</Property>
29               <SimpleOperator>equals</SimpleOperator>
30               <Value>123456</Value>
31            </Filter>
32-->
33         </RetrieveRequest>
34         <QueryAllAccounts>true</QueryAllAccounts>
35      </RetrieveRequestMsg>
36   </soapenv:Body>
37</soapenv:Envelope>