API

Newsletter statistics (single)

This example shows how you can retrieve the statistics of a specific newsletter.

Parameters

Parameters
FieldTypeDescriptionRequired / Optional
usernamestring

The username used to log in to MailCamp.

Required
usertokenstring

The unique token assigned to the user named above.

Required
requesttypestring

The name of the relevant API file.

Required
requestmethodstring

The name of the function being called.

Required
details

See the fields below.

Required
details.statidint

The ID of the statistics you want to retrieve

Required
details.statstypestring

The type of statistics (newsletter = n, autoresponder = a)

Required

Successful response

Successful response
FieldTypeDescription
statusstring

The value of the status field is returned as “SUCCESS” on a successful response.

dataint

If the statistics are found, the object is returned.

Error response

Error response
FieldTypeDescription
statusstring

The value of the status field will be “FAILED”.

errormessagestring

A text message explaining why the request failed.

Request example
<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>