return to Table of Contents, API

/projects/:document_identifier/reports/:report_uuid/links/:link_uuid/clicks

This resource supports the GET method.

URL Parameters

Label Description
:document_identifier The project's document identifier
:report_uuid The UUID of the report
:link_uuid The UUID of the link

GET

Returns information about each click event for this link.

Request Query String Parameters

Name Required Description
fields No A comma-separated list of the keys you want returned for each click event. Default is to return all keys.

Response Status Codes

Code Description
503 Service Unavailable Server is undergoing maintenance and is unavailable
429 Rate Limited Rate limiting in effect, try again later
404 Not Found The resource could not be found or your API key has not been granted access to it
403 Forbidden Direct Mail account is disabled
401 Unauthorized API key, secret, or authentication method is incorrect
200 OK Success

Response Headers

Name Description
X-Total-Count The total number of clicks

Response Body

JSON representation of an array of objects. Each object in the array represents a click event:

Key Value Description
date String The date of the click event, in ISO-8601 format
email String The email address of the recipient that clicked
links Array of Object URLs for the recipient that clicked the link (rel:recipient)

Example

GET /api/v2/projects/187812f26ba37d9769d8691d2a83c95c/reports/F4B2E4E6-B94F-462C-AFEC-1F9497BA98A0/links/0022F304-3CBA-4D31-A4F8-1875A3F4F1EA/clicks HTTP/1.1
Authorization: Basic QzFENDREMjEtNTA4MC00NTM3LUFFOD
Accept: application/json; charset=utf-8
Host: secure.directmailmac.com

HTTP/1.1 200 OK
Date: Thu, 23 Apr 2015 23:37:58 GMT
Content-Type: application/json; charset=utf-8
X-Total-Count: 192

[
    {
        "date": "2015-04-23T15:54:21-07:00",
        "email": "user573@example.com",
        "links": [
            {
                "href": "https://secure.directmailmac.com/api/v2/projects/187812f26ba37d9769d8691d2a83c95c/reports/F4B2E4E6-B94F-462C-AFEC-1F9497BA98A0/recipients/69BE91E0-89B4-499D-B6E3-F153D56D4B58",
                "rel": "recipient"
            }
        ]
    },
    {
        "date": "2015-04-23T15:54:21-07:00",
        "email": "user606@example.com",
        "links": [
            {
                "href": "https://secure.directmailmac.com/api/v2/projects/187812f26ba37d9769d8691d2a83c95c/reports/F4B2E4E6-B94F-462C-AFEC-1F9497BA98A0/recipients/306CE967-A4B5-4727-ADB4-D97E810CC1D6",
                "rel": "recipient"
            }
        ]
    },
    ...truncated....
]

Did you find this article helpful? Yes | No