API
Get custom fields
The XML document structure for retrieving the custom fields of a mailing list is as follows:
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 | |
listid | int | The IDs of the mailing list for which the custom field data is requested. | 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. |
fieldid | int | The ID number of the custom field in question. |
name | string | The name of the custom field. |
fieldtype | int | The custom field type (text, number, etc.). |
defaultvalue | string | If you have entered a default value, it is shown here. |
required | string | If it is a required field, this is shown here (1 or 0). |
fieldsettings | int | Serialized version of the custom field settings. |
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>lists</requesttype>
<requestmethod>GetCustomFields</requestmethod>
<responsetype>xml</responsetype>
<details>
<listids>
99
</listids>
</details>
</xmlrequest>