API
Update contact
This example displays an overview of all mailing lists created in MailCamp, in an XML with the data found.
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 |
responsetype | string | The format of the response. This can be 'xml' or 'json'. | Optional |
details | See the fields below. | Required | |
emailaddress | string | The email address of the contact being added. | Required |
mailinglistid | int | The mailing list the contact is on. | Required |
mailinglistid.subscribedate | int | Enter the subscription date as a unix timestamp. | Optional |
mailinglistid.lastopen | int | Enter the 'last opened newsletter' date as a unix timestamp. | Optional |
fieldid | int | The ID of the custom field to be added. | Required |
value | string | 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 |
tagid | int | The ID of the tag to be added. | Optional |
tagname | string | The name of the tag to be added. | Optional |
Successful response
| Field | Type | Description |
|---|---|---|
status | string | The value of the status field is returned as “SUCCESS” on a successful response. |
data | If the statistics are found, the object is returned. |
<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>