API
Get tags
This example shows how to retrieve tags.
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 | |
tags | tags | The IDs of the tags you want to retrieve. Comma-separated if you want to retrieve several tags. | Optional |
ownerid | int | The ID of the user whose tags must be retrieved. | Required |
countonly | string | Whether only the count must be returned. Default: false. | Optional |
countonly.SortBy | string | The order in which the tags in the array must be sorted (name, createdate). | Optional |
countonly.Direction | string | Whether sorting must be from low to high or the other way around (Down or Up). | Optional |
start | int | Enter the number from which point the result must be returned. Default: 0 (first result). | Optional |
perpage | string | The number of lists to return per result. Choose 'all' for all lists. Default: 10 | 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. |
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>tags</requesttype>
<requestmethod>GetTags</requestmethod>
<responsetype>xml</responsetype>
<details>
<tags>99</tags>
<ownerid>99</ownerid>
<countonly>false</countonly>
<sortdetails>
<SortBy>name</SortBy>
<Direction>asc</Direction>
</sortdetails>
<start>0</start>
<perpage>10</perpage>
</details>
</xmlrequest>