Notifications

Notifications Documentation

Notification [LIST]

Notification [LIST]

Request

Endpoint

GET /api/v2/user/notifications
Content-Type: application/vnd.api+json

Body

Parameters

Filters

account_list_id

Type ID string

Description Filter user notifications by account list

Required No

read

Type boolean

Description Filter checks if read is either "true" or "false"

Required No

Response

Headers

Content-Type: application/vnd.api+json; charset=utf-8
200 OK

Body

{
  "data": [
    {
      "id": "d2fdfa0d-7161-4eec-b897-27a052785d14",
      "type": "user_notifications",
      "attributes": {
        "created_at": "2022-01-12T17:18:45Z",
        "read": false,
        "updated_at": "2022-01-12T17:18:45Z",
        "updated_in_db_at": "2022-01-12T17:18:45Z"
      },
      "relationships": {
        "user": {
          "data": {
            "id": "d3d686a9-d0d8-4be2-9e25-738db4a07fee",
            "type": "users"
          }
        },
        "notification": {
          "data": {
            "id": "d3854f58-3a4d-44fd-9483-bdf65832abba",
            "type": "notifications"
          }
        }
      }
    }
  ],
  "meta": {
    "pagination": {
      "page": 1,
      "per_page": 25,
      "total_count": 1,
      "total_pages": 1
    },
    "sort": null,
    "filter": {
    }
  }
}

Fields

data

Type [UserNotification]

Description An array of UserNotifications

Notification [GET]

Notification [GET]

Request

Endpoint

GET /api/v2/user/notifications/be648195-a3f1-4149-b80b-2bb7ca1009f6
Content-Type: application/vnd.api+json

Body

Response

Headers

Content-Type: application/vnd.api+json; charset=utf-8
200 OK

Body

{
  "data": {
    "id": "be648195-a3f1-4149-b80b-2bb7ca1009f6",
    "type": "user_notifications",
    "attributes": {
      "created_at": "2022-01-12T17:18:45Z",
      "read": false,
      "updated_at": "2022-01-12T17:18:45Z",
      "updated_in_db_at": "2022-01-12T17:18:45Z"
    },
    "relationships": {
      "user": {
        "data": {
          "id": "f93e0f3a-ab4f-415a-900f-e5dc49a4674a",
          "type": "users"
        }
      },
      "notification": {
        "data": {
          "id": "b03e8edf-0ab4-4bb5-a761-3a30815de062",
          "type": "notifications"
        }
      }
    }
  }
}

Fields

Attributes

created_at

Type date

Description The timestamp of when this resource was created

read

Type boolean

Description If this notification has been read by the user then read should be marked as true

updated_at

Type date

Description The timestamp of when this resource was last updated

updated_in_db_at

Type date

Description This is to be used as a reference for the last time the resource was updated in the remote database - specifically for when data is updated while the client is offline.

Relationships

notification.data

Type Notification

Description The Notification this user_notification is associated with

user.data

Type Person

Description The User this user_notification is associated with

Notification [PUT]

Notification [PUT]

Request

Endpoint

PUT /api/v2/user/notifications/e53bb33f-8c2b-4bc1-944f-9bb85c925be5
Content-Type: application/vnd.api+json

Body

{
  "data": {
    "type": "user_notifications",
    "attributes": {
      "read": false,
      "updated_in_db_at": "2022-01-12 17:18:46 UTC"
    }
  }
}

Parameters

Attributes

created_at

Type date

Description The timestamp of when this resource was created

Required No

overwrite

Type boolean

Description Only used for updating a record where you want to ignore the server's ' 'updated_in_db_at value and force overwrite the values for the record. ' 'Must be true to work.

Required No

read

Type boolean

Description If this notification has been read by the user then read should be marked as true

Required No

updated_at

Type date

Description The timestamp of when this resource was last updated

Required No

updated_in_db_at

Type date

Description This is to be used as a reference for the last time the resource was updated in the remote database - specifically for when data is updated while the client is offline.

Required No

Response

Headers

Content-Type: application/vnd.api+json; charset=utf-8
200 OK

Body

{
  "data": {
    "id": "e53bb33f-8c2b-4bc1-944f-9bb85c925be5",
    "type": "user_notifications",
    "attributes": {
      "created_at": "2022-01-12T17:18:46Z",
      "read": false,
      "updated_at": "2022-01-12T17:18:46Z",
      "updated_in_db_at": "2022-01-12T17:18:46Z"
    },
    "relationships": {
      "user": {
        "data": {
          "id": "219d853a-8fc2-47e2-a113-474f8f58ee2f",
          "type": "users"
        }
      },
      "notification": {
        "data": {
          "id": "cdab0ce8-9be4-406d-ab25-69fb3e96fb04",
          "type": "notifications"
        }
      }
    }
  }
}

Fields

Attributes

created_at

Type date

Description The timestamp of when this resource was created

read

Type boolean

Description If this notification has been read by the user then read should be marked as true

updated_at

Type date

Description The timestamp of when this resource was last updated

updated_in_db_at

Type date

Description This is to be used as a reference for the last time the resource was updated in the remote database - specifically for when data is updated while the client is offline.

Relationships

notification.data

Type Notification

Description The Notification this user_notification is associated with

user.data

Type Person

Description The User this user_notification is associated with

Notification [READ]

Notification [READ]

Request

Endpoint

PUT /api/v2/user/notifications/read
Content-Type: application/vnd.api+json

Body

Response

Headers

Content-Type: text/html
200 OK

Body

Fields

Attributes

created_at

Type date

Description The timestamp of when this resource was created

updated_at

Type date

Description The timestamp of when this resource was last updated

updated_in_db_at

Type date

Description This is to be used as a reference for the last time the resource was updated in the remote database - specifically for when data is updated while the client is offline.

Last updated