Notifications

List of notifications for the logged user.


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

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


Optional fields

  • seen

Readonly fields

  • url
  • subject
  • message
  • dispatch_date
  • importance_level
  • has_stickies

Example notification

{
    "url": "https://api.getanewsletter.com/v3/notifications/1/",
    "subject": "Vi har fyllt på ditt konto",
    "message": "<p>Lorem ipsum dolar sit amet...</p>",
    "dispatch_date": "2013-12-12T09:59:45Z",
    "seen": false,
    "importance_level": 3,
    "has_stickies": true
}

GET /notifications/

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

Possible url parameters are:

  • page: <int>

Example:

{
    "count": 1,
    "next": null,
    "previous": null,
    "results": [
        {
            "url": "https://api.getanewsletter.com/v3/notifications/1/",
            "subject": "Vi har fyllt på ditt konto",
            "message": "<p>Vi har fyllt på ditt konto...</p>",
            "dispatch_date": "2013-12-12T09:59:45Z",
            "seen": false,
            "importance_level": 3,
            "has_stickies": true
        }
    ]
}

POST /notifications/<id>

Mark a notification message as seen or unseen

{
    "seen": true
}

Response
{
    "url": "https://api.getanewsletter.com/v3/notifications/1/",
    "subject": "Vi har fyllt på ditt konto",
    "message": "<p>Vi har fyllt på ditt konto...</p>",
    "dispatch_date": "2013-12-12T09:59:45Z",
    "seen": true,
    "importance_level": 3,
    "has_stickies": true
},
200 Updated