This example displays an overview of all mailing lists created in MailCamp, in an XML with the data found.

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
emailaddressstring

The email address of the contact being added.

Required
mailinglistidint

The mailing list the contact is on.

Required
mailinglistid.subscribedateint

Enter the subscription date as a unix timestamp.

Optional
mailinglistid.lastopenint

Enter the 'last opened newsletter' date as a unix timestamp.

Optional
fieldidint

The ID of the custom field to be added.

Required
valuestring

The value to assign to the custom field. For a checkbox there can be several values. Note that if a value contains an & sign, CDATA and urlencoding() must be used.

Required
tagidint

The ID of the tag to be added.

Optional
tagnamestring

The name of the tag to be added.

Optional

Successful response

Successful response
FieldTypeDescription
statusstring

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

data

If the statistics are found, the object is returned.

Request example
<xmlrequest>
	<username>admin</username>
	<usertoken>0123456789abcdef0123456789abcdef01234567</usertoken>
	<requesttype>subscribers</requesttype>
	<requestmethod>EditSubscriberCustomFields</requestmethod>
	<responsetype>xml</responsetype>
	<details>
		<mailinglist>99</mailinglist>
		<contact>
			<emailaddress>email@mailcamp.nl</emailaddress>
			<subscribedate>1483228800</subscribedate>
			<lastopen>1483228800</lastopen>
			<customfields>
				<item>
					<fieldid>99</fieldid>
					<value>Jan Jansen</value>
				</item>
				<item>
					<fieldid>99</fieldid>
					<value><![CDATA[Eten %26 Drinken]]></value>
					<value><![CDATA[Sport]]></value>
					<value>Jan Jansen</value>
				</item>
				<item>
					<fieldid>99</fieldid>
					<value>31/01/1980</value>
				</item>
			</customfields>
			<tags>
				<tagid>99</tagid>
				<tagid>99</tagid>
				<tagname><![CDATA[Prospect]]></tagname>
				<tagname><![CDATA[Lead]]></tagname>
			</tags>
		</contact>
	</details>
</xmlrequest>