MPZ API > Retrieve a Campaign

Use the API to retrieve information about a campaign.

Request

Submit an XML Request with the following details:
Post URL: https://mpzmail.com/api/v3.0/campaigns/viewCampaign/
Fields to Post
apiKey String REQUIRED The APIKey of the requesting user.
campaignID Int REQUIRED The ID of the campaign to retrieve.

Response

Data Sent Back
error Int Indicates wether an error has occured. 0 for no error. 1 for error.
status String If there's been an error, a text description of the error that occured will be here.
campaignCnt Int The number of campaigns returned
campaign    
----> campaignID Int The Campaign ID
----> campaignName String The friendly name of the campaign
----> dateCreated Date Time The date the campaign was created.
----> sentFrom String The name the email was sent from.
----> subject String The email subject.
----> startDate Date Time The date the campaign is/was scheduled to start.
----> status Int The status of the campaign. 0 = Scheduled, 1 = Queued, 2 = Copying Subscribers, 3 = Sending Campaign, 4 = Complete.
----> groupID Int The ID of the group sent to.
----> emailFrom String The email address the campaign was sent from.
----> totalRecipients Int The total number of recipients who were sent the campaign.
----> opened Int The number of emails read/opened.
----> clicks Int The number of links clicked.
----> unsubscribers Int The number of unsubscribers.
----> bounced Int The number of emails that bounced.
----> newsletterID Int The ID of the newsletter template that was sent.
----> newsletter Base64 The Base 64 encoded HTML source code.

Sample request XML

<xml>
     <apiKey>44-121312131223</apiKey>
     <campaignID>4123</campaignID>
</xml>

Sample response XML

<xml>
     <error>0</error>
     <status>success</status>
     <campaignCnt>1</campaignCnt>
     <campaign>
          <campaignID>1234</campaignID>
          <campaignName>Sample Campaign</campaignName>
          <dateCreated>2014-06-01 11:00</dateCreated>
          <sentFrom>Test User</sentFrom>
          <subject>My Sample Campaign</subject>
          <startDate>2014-06-02 12:00</startDate>
          <status>4</status>
          <groupID>1314</groupID>
          <emailFrom>my@emailaddress.com</emailFrom>
          <totalRecipients>12</totalRecipients>
          <opened>3/opened>
          <clicks>2</clicks>
          <unsubscribers>1</unsubscribers>
          <bounced>2</bounced>
          <newsletterID>2131</newsletterID>
          <newsletter>21asvasvasv7as*V&VSA*V&ASVcsacascasc31</newsletter>
     </campaign>
</xml>

Comments