The GetCampaignReport service allows you to receive the same result indicators as Flexmail offers in the web reports.
SOAP Action: GetCampaignReport
SOAP Return Object: GetCampaignReportResp
The following table describes the parameters used for calling the GetCampaignReport service.
Parameter | Mandatory | Type | Description |
---|---|---|---|
header | Y | APIRequestHeader | Header for authentication |
campaignId | Y | Integer | Campaign id |
language | / | String | Language string: EN, FR, NL |
The following table describes the parameters returned from the GetCampaignReport service.
Parameter | Mandatory | Type | Description |
---|---|---|---|
header | / | APIResponseHeader | Header containing authentication information |
errorCode | / | Integer | Numerical value of the error |
errorMessage | / | String | Short literal description of the error |
campaignReportType | / | CampaignReportType | Object containing the campaigns indicators |
0 | No error |
---|---|
220 | Authentication error, see header object for detailed information |
This example shows the launch of a Campaign with id ‘1’.
<?php $header->userId = USER_ID; $header->userToken = USER_TOKEN; $getCampaignReportReq->header = $header; $getCampaignReportReq->campaignId = 1; $getCampaignReportResp = $SoapClient->__soapCall("GetCampaignReport", array($getCampaignReportReq)); if ($getCampaignReportResp->errorCode == 0) { // Present campaign data } else { echo "Campaign data could not be retrieved: " . $getCampaignReportResp->errorMessage; } ?>