Notifications

Get notifications for the authenticated user

Returns the in-product notifications raised for the currently authenticated user at the given site, ordered most recent first. Use the optional filters to narrow by read status or type.

get/notifications

Query parameters

site_idstring uuid required

Scope the notifications to a single Site. When not specified the platform falls back to the user's default site. Use this when a user works across multiple sites and you want their site-specific inbox.

readboolean

Filter results by read state. When true, only previously-read notifications are returned; when false, only unread.

typestring[]

A list of notification types to filter by, e.g. guestline_order_created.

pageinteger

The page to retrieve results from

per_pageinteger

The number of results to return per page

Response

Notifications were successfully retrieved.

Example response

{
  "data": [
    {
      "id": "beddda88-947d-4bd8-8f0c-828b187f93b2",
      "title": "An order was created by rezlynx",
      "type": "guestline_order_created",
      "subject_id": "beddda88-947d-4bd8-8f0c-828b187f93b2",
      "subject_type": "Order",
      "site_id": "beddda88-947d-4bd8-8f0c-828b187f93b2",
      "created_at": "2019-01-15T11:00:00.000Z",
      "read_at": "2019-01-15T11:00:00.000Z",
      "acknowledged_by": {
        "id": "beddda88-947d-4bd8-8f0c-828b187f93b2",
        "name": "Jane Smith"
      },
      "actions": [
        {
          "label": "View order",
          "type": "view_order",
          "url": "https://app.try.be/orders/beddda88-947d-4bd8-8f0c-828b187f93b2"
        }
      ]
    }
  ],
  "meta": {
    "from": 1,
    "to": 2,
    "total": 2,
    "current_page": 1,
    "last_page": 2,
    "per_page": 15,
    "path": "http://example.com/api",
    "total_read": 1,
    "total_unread": 1
  },
  "links": {
    "first": "http://example.com?page=1",
    "next": "https://example.com?page=3",
    "prev": "https://example.com?page=1",
    "last": "https://example.com?page=4"
  }
}

Changes

No recorded changes to this endpoint across all 1 revision of this API.