API
Newsletter statistics (single)
This example shows how you can retrieve the statistics of a specific newsletter.
Parameters
| Field | Type | Description | Required / Optional |
|---|---|---|---|
username | string | The username used to log in to MailCamp. | Required |
usertoken | string | The unique token assigned to the user named above. | Required |
requesttype | string | The name of the relevant API file. | Required |
requestmethod | string | The name of the function being called. | Required |
details | See the fields below. | Required | |
details.statid | int | The ID of the statistics you want to retrieve | Required |
details.statstype | string | The type of statistics (newsletter = n, autoresponder = a) | Required |
Successful response
| Field | Type | Description |
|---|---|---|
status | string | The value of the status field is returned as “SUCCESS” on a successful response. |
data | int | If the statistics are found, the object is returned. |
Error response
| Field | Type | Description |
|---|---|---|
status | string | The value of the status field will be “FAILED”. |
errormessage | string | A text message explaining why the request failed. |
<xmlrequest>
<username>admin</username>
<usertoken>0123456789abcdef0123456789abcdef01234567</usertoken>
<requesttype>stats</requesttype>
<requestmethod>FetchStats</requestmethod>
<responsetype>xml</responsetype>
<details>
<statid>99</statid>
<statstype>n</statstype>
</details>
</xmlrequest>