This example returns an XML with the total number of contacts on a given mailing list, along with an overview of all contacts in that list.

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
responsetypestring

The format of the response. This can be 'xml' or 'json'.

Optional
details

See the fields below.

Required
details.Listint

The ID of the mailing list the contact is on.

Required
details.List.Emailstring

The email address of the contact you are trying to find

Optional
details.List.Confirmedboolean

The confirmation status of the contact you are trying to find (0 or 1)

Optional
details.List.Statusboolean

The status of the contact; a (active), b (bounced) or u (unsubscribed)

Required
details.List.DateSearch / DateUpdatedSearch

Filter on a specific date interval based on the subscription date. Enter the date as a unix timestamp in the StartDate field and optionally in the EndDate field. 5 different types:

Optional
details.List.DateSearch / DateUpdatedSearch.afterstring

All contacts subscribed after the given date.

Optional
details.List.DateSearch / DateUpdatedSearch.betweenstring

All contacts subscribed between 2 given dates. Specify the end date in the EndDate field.

Optional
details.List.DateSearch / DateUpdatedSearch.beforestring

All contacts subscribed before the given date.

Optional
details.List.DateSearch / DateUpdatedSearch.exact/exactlystring

All contacts subscribed exactly on the given date.

Optional
details.List.DateSearch / DateUpdatedSearch.notstring

All contacts who did not subscribe on the given date.

Optional
details.List.Newsletterint

The ID of a newsletter the contact must have opened.

Optional
details.List.Tagsint

The ID of a tag of a contact.

Optional
details.List.SortBystring

The order in which the newsletters in the array must be sorted (subscribedate, emailaddress, format, status or confirmed).

Optional
details.List.Directionstring

Whether sorting must be from low to high or the other way around (Down or Up).

Optional
details.List.startint

The first page to start searching from.

Optional
details.List.perpagestring

Number of contacts per result. The default is 10. The value 'all' returns all records.

Optional

Successful response

Successful response
FieldTypeDescription
statusstring

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

countint

The total number of contacts.

subscriberlistint

An overview of all email addresses of the contacts.

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>subscribers</requesttype>
	<requestmethod>GetSubscribers</requestmethod>
	<responsetype>xml</responsetype>
	<details>
		<countonly>false</countonly>
		<searchinfo>
			<List>99</List>
			<Email>@uwdomein.nl</Email>
			<Confirmed>1</Confirmed>
			<DateSearch>
				<filter>true</filter>
				<type>after</type>
				<StartDate>1483228800</StartDate>
			</DateSearch>
			<DateUpdatedSearch>
				<filter>true</filter>
				<type>between</type>
				<StartDate>1483228800</StartDate>
				<EndDate>1559347200</EndDate>
			</DateUpdatedSearch>
			<Newsletter>99</Newsletter>
			<Tags>99</Tags>
		</searchinfo>
		<sortdetails>
			<SortBy>subscribedate</SortBy>
			<Direction>asc</Direction>
		</sortdetails>
		<start>0</start>
		<perpage>10</perpage>
	</details>
</xmlrequest>