iotoms Docs

List notifications

GET
/api/v1/notifications

Returns the signed-in user's notifications with the unread count. Filter by category or unreadOnly; paginated with 0-based page and size (default 20).

Authorization

BearerAuth
headerAuthorizationBearer <JWT>

Query Parameters

page?integer

Page number, starting at 0. See Paging.

Formatint32
Default0
size?integer

Number of records per page.

Formatint32
Default20
category?string

Only notifications of this category, for example TXN_RETURN_FILED or OPS_ROUTE_ASSIGNED.

Value in"OPS_ROUTE_ASSIGNED""OPS_DAY_CYCLE_CLOSED""INV_LOW_STOCK""INV_ADJUSTMENT""TXN_NEW_ORDER""TXN_ORDER_STATUS""TXN_RETURN_FILED""ADMIN_BROADCAST""MARKETING"
unreadOnly?boolean

true to return only unread notifications. Defaults to false.

Defaultfalse

Header Parameters

Response Body

OK

*/*
  1. response
status*string

Outcome of the call: SUCCESS when it worked, ERROR when it failed.

message*string

Short human-readable message describing the outcome, for example "Vendor created". Do not parse it.

data?

One page of the signed-in user's notifications, plus their total unread count.

Example Request
curl -X GET 'https://beta.iotoms.com/api/v1/notifications'
Example Response
{  "status": "string",  "message": "string",  "data": {    "items": [      {        "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",        "category": "OPS_ROUTE_ASSIGNED",        "title": "string",        "body": "string",        "deepLink": "string",        "data": {          "property1": "string",          "property2": "string"        },        "read": true,        "createdAt": "2019-08-24T14:15:22Z",        "readAt": "2019-08-24T14:15:22Z"      }    ],    "unreadCount": 0,    "page": 0,    "size": 0,    "totalElements": 0,    "totalPages": 0  }}