Opens

The opens object gives you information about how many times a specific user has opened your mail.


Renders: [application/json, text/html, application/xml]

Parsers: [application/json, application/x-www-form-urlencoded, multipart/form-data]


Readonly fields

  • url
  • contact
  • contact_url
  • first_view
  • last_view
  • count

Example unique open

{
    "url": "https://api.getanewsletter.com/v3/reports/123/opens/543/",
    "contact": "john.doe@example.com",
    "contact_url": "https://api.getanewsletter.com/v3/contacts/john.doe@example.com/",
    "first_view": "2013-08-24T14:20:54.799Z",
    "last_view": "2013-08-27T14:20:54.799Z",
    "count": 234,
}

GET /reports/<report_id>/opens/

Responds with a list of unique openings, like usual we provide next, prev, count and the results

Possible url parameters are:

  • page: <int>

Example:

GET /reports/123/opens/
{
    "count": 46,
    "next": "https://api.getanewsletter.com/v3/reports/opens/?page=3",
    "previous": "https://api.getanewsletter.com/v3/reports/opens/?page=2",
    "results": [
        {
            "url": "https://api.getanewsletter.com/v3/reports/123/opens/543/",
            "contact": "john.doe@example.com",
            "contact_url": "https://api.getanewsletter.com/v3/contacts/john.doe@example.com/",
            "first_view": "2013-08-24T14:20:54.799Z",
            "last_view": "2013-08-27T14:20:54.799Z",
            "count": 234,
        },
        ...
    ]
}

GET /reports/<report_id>/opens/<id>/

Responds with a report.

Example:

GET  '/reports/123/opens/543/
{
    "url": "https://api.getanewsletter.com/v3/reports/123/opens/543/",
    "contact": "john.doe@example.com",
    "contact_url": "https://api.getanewsletter.com/v3/contacts/john.doe@example.com/",
    "first_view": "2013-08-24T14:20:54.799Z",
    "last_view": "2013-08-27T14:20:54.799Z",
    "count": 234,
}

Exporting opens

GET /reports/<report_id>/opens/export/

Possible url parameters are:

  • csv: <0|1>

If the csv parameter is not provided the API automatically returns xls-file for all exports under 64 000 rows, and with csv-file for bigger. The export includes the subscriber email, the number of time the subscriber has opened the email and the date and time for the first and last opening.