I am trying to retrieve sent data using SOAP API. My header is: Content-Type text/xml SoapAction Retrieve
I am calling https://mc....soap.marketingcloudapis.com/Service.asmx
Below is my envelope:
<?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>
<fueloauth xmlns="http://exacttarget.com">xxxxTOKENxxxx</fueloauth>
</soapenv:Header>
<s:Body xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<RetrieveRequest xmlns="http://exacttarget.com/wsdl/partnerAPI">
<ObjectType>Send</ObjectType>
<Properties>ID</Properties>
<Properties>EmailName</Properties>
<Properties>Subject</Properties>
<Properties>SendDate</Properties>
<Properties>FromName</Properties>
<Properties>FromAddress</Properties>
<Properties>UniqueOpens</Properties>
<Properties>UniqueClicks</Properties>
<Properties>Unsubscribes</Properties>
<Properties>NumberSent</Properties>
<Properties>NumberDelivered</Properties>
<Properties>NumberErrored</Properties>
<Properties>NumberExcluded</Properties>
<Properties>HardBounces</Properties>
<Properties>SoftBounces</Properties>
<Properties>OtherBounces</Properties>
</RetrieveRequest>
</s:Body>
</soapenv:Envelope>
And I am getting this response:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Error</title>
<meta name="GENERATOR" content="Microsoft Visual Studio .NET 7.1" />
<meta name="CODE_LANGUAGE" content="C#" />
<meta name="vs_defaultClientScript" content="JavaScript" />
<meta name="vs_targetSchema" content="http://schemas.microsoft.com/intellisense/ie5" />
</head>
<body style="margin: 0px; padding: 0px; font-family: Arial;">
<table style="height:100%; width:100%;" border="0" cellpadding="5" cellspacing="0">
<tr style="height:10%; background-color:#808080">
<td>
<div style="color:#ffffff; font-size: 16px;">An error has occurred and has been logged by our system.
<br />
Thank you.
</div>
</td>
</tr>
<tr valign="top">
<td>
<div id="errorTxt"> </div>
</td>
</tr>
</table>
</body>
</html>
Can anybody please help? What am I doing wrong? Thank you