Here's the SOAP function:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:v2="http://domain.com/" xmlns:sen="http:/domain.com">
<soapenv:Header/>
<soapenv:Body>
<v2:actionContactsGroup>
<sen:pInfo>
<sen:ActionType>?</sen:ActionType>
<sen:GroupName>?</sen:GroupName>
<!--Optional:-->
<sen:ContactIdsList>
<!--1 or more repetitions:-->
<sen:Id>?</sen:Id>
</sen:ContactIdsList>
</sen:pInfo>
</v2:actionContactsGroup>
</soapenv:Body>
</soapenv:Envelope>
If I send over this XML code it works just fine:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:v2="http://domain.com" xmlns:sen="http://domain.com">
<soapenv:Header/>
<soapenv:Body>
<v2:actionContactsGroup>
<sen:pInfo>
<sen:ActionType>Add</sen:ActionType>
<sen:GroupName>MyGroup</sen:GroupName>
<sen:ContactIdsList>
<sen:Id>SomeID1</sen:Id>
<sen:Id>SomeID2</sen:Id>
<sen:Id>SomeID3</sen:Id>
</sen:ContactIdsList>
</sen:pInfo>
</v2:actionContactsGroup>
</soapenv:Body>
</soapenv:Envelope>
But I'm unable to do the same in php. I can do it with one id at a time:
$addToGroup = array(
'pInfo'=>array(
'ActionType'=>'Add',
'GroupName'=>'MyGroup',
'ContactIdsList'=>array('Id'=>'SomeID1')
)
);
But if I try multiple ids it doesn't work no matter how I format the array. Ideas?
I tried this but didn't work:
// didnt work, came back saying "Warning: Contact not found
// [Array]WarningDuplicated contact. Only first instance was used."
$addToGroup = array(
'pInfo'=>array(
'ActionType'=>'Add',
'GroupName'=>'NCAL_SUW',
'ContactIdsList'=>array(
array('Id'=>'SomeID1'),
array('Id'=>'SomeID2')
)
)
)