API Logic - SELECT from recipient schema
Hi,
I'm leveraging an API to retreive a user's opt-in status in Adobe Campaign Classic. See below
How does this work if I'm retreiving a user's status who has an email with multiple profile IDs? How does the API decide which status I would retrieve?
Note.. I testing the API and I receive multiple statuses. So my new question is, how does determine the order by which i receive the status? Would it be the most recently created profile?
Request
POST /nl/jsp/soaprouter.jsp HTTP/1.1
Host: example.campaign.adobe.com
Content-Type: text/xml
SOAPAction: xtk:queryDef#ExecuteQuery
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:urn="urn:xtk:queryDef">
<soapenv:Header/>
<soapenv:Body>
<urn:ExecuteQuery>
<urn:sessiontoken>{TOKEN}</urn:sessiontoken>
<urn:entity>
<queryDef operation="select" schema="nms:recipient">
<select><node expr="[optinInfo/email/@optinEmail]"/></select>
<where><condition expr="@email = 'mrwrench@gmail.com'"/></where>
</queryDef>
</urn:entity>
</urn:ExecuteQuery>
</soapenv:Body>
</soapenv:Envelope>
Response
<?xml version='1.0'?>
<SOAP-ENV:Envelope xmlns:xsd='http://www.w3.org/2001/XMLSchema' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xmlns:ns='urn:xtk:queryDef' xmlns:SOAP-ENV='http://schemas.xmlsoap.org/soap/envelope/'>
<SOAP-ENV:Body>
<ExecuteQueryResponse xmlns='urn:xtk:queryDef' SOAP-ENV:encodingStyle='http://schemas.xmlsoap.org/soap/encoding/'>
<pdomOutput xsi:type='ns:Element' SOAP-ENV:encodingStyle='http://xml.apache.org/xml-soap/literalxml'>
<recipient-collection>
<recipient>
<optinInfo>
<email optinEmail="NO"/>
</optinInfo>
</recipient>
</recipient-collection>
</pdomOutput>
</ExecuteQueryResponse>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>