Subscriptions

Lists the existing subscriptions.


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

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


Required fields

  • contact

Optional fields

  • list
  • cancelled

Readonly fields

  • id
  • url
  • contact_url
  • list_name
  • list_url
  • created
  • responders
  • channels

Example subscriber

{
    "id": 13174,
    "url": "https://api.getanewsletter.com/v3/lists/hiso7tuNb4Z/subscribers/john.doe@example.com/",
    "contact": "john.doe@example.com",
    "contact_url": "https://api.getanewsletter.com/v3/contacts/john.doe@example.com/",
    "list": "hiso7tuNb4Z",
    "list_name": "My list",
    "list_url": "https://api.getanewsletter.com/v3/lists/hiso7tuNb4Z/",
    "created": "2013-08-26T09:23:47Z",
    "cancelled": null,
    "responders": []
}

GET /subscriptions/

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

Possible url parameters are:

  • page: <int>
  • order: <string: [email, -email, name, -name, updated, -updated, active, -active]>
  • created_lt: <string: datetime>
  • created_gt: <string: datetime>
  • created_year: <int>
  • created_month: <int>
  • created_day: <int>
  • cancelled: <int: 1|0>
  • active: <int: 1|0>

Example:

{
    "count": 46,
    "next": "http://gantest.com:8000/v3/subscriptions/?page=4",
    "previous": "http://gantest.com:8000/v3/subscriptions/?page=2",
    "results": [
        {
            "id": 613840,
            "url": "http://api.getanewsletter.com/v3/lists/PW4wBjSmaD3AJqL8/subscribers/john.doe2%40example.com/",
            "contact": "john.doe2@example.com",
            "contact_url": "http://api.getanewsletter.com/v3/contacts/john.doe2%40example.com/",
            "list": "PW4wBjSmaD3AJqL8",
            "list_name": "New list for import",
            "list_url": "http://api.getanewsletter.com/v3/lists/PW4wBjSmaD3AJqL8/",
            "created": "2014-06-20T07:28:47Z",
            "cancelled": null,
            "responders": []
        },
        ...
    ]
}

For details about the subscription object, please check the subscribers section.