0

Using the following SOAP envelope:

<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>
    <fueloauth>{{ access_token }}</fueloauth>
</soapenv:Header>
<soapenv:Body>
    <RetrieveRequestMsg xmlns="http://exacttarget.com/wsdl/partnerAPI">
        <RetrieveRequest>
            <ObjectType>Send</ObjectType>
            <Properties>ID</Properties>
            <Properties>SentDate</Properties>
            <Properties>NumberSent</Properties>
            <Properties>Email.ID</Properties>
            <Properties>CustomerKey</Properties>
            <Filter xsi:type="ns1:SimpleFilterPart" xmlns:ns1="http://exacttarget.com/wsdl/partnerAPI">
                <Property>SentDate</Property>
                <SimpleOperator>between</SimpleOperator>
                <DateValue>{{ start_date }}</DateValue>
                <DateValue>{{ current_date }}</DateValue>
            </Filter>
        </RetrieveRequest>
    </RetrieveRequestMsg>
</soapenv:Body>

I get the response: Error: The Request Property(s) CustomerKey do not match with the fields of Send retrieve. This is despite the fact that the documentation of the Send object includes CustomerKey as a field. If I remove <Properties>CustomerKey</Properties> from the XML, it returns successfully, giving me the legacy email id.

While this technically allows me to query the assets REST API to retrieve the html of the email as I need, I am wary or relying on a legacy id that may one day be deprecated.

Is anyone aware of a way to get the Customer Key or Asset Id from a SOAP Retrieve Request of the Send object?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.