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": "a2cb84d6-aa31-4741-9630-a5335574ae60",
      "type": "user_notifications",
      "attributes": {
        "created_at": "2021-11-23T14:38:11Z",
        "read": false,
        "updated_at": "2021-11-23T14:38:11Z",
        "updated_in_db_at": "2021-11-23T14:38:11Z"
      },
      "relationships": {
        "user": {
          "data": {
            "id": "6dae9fa1-cf23-4317-8052-0ddcccdceeec",
            "type": "users"
          }
        },
        "notification": {
          "data": {
            "id": "b88b4250-7936-4730-b42c-c673cde91582",
            "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/92f2de24-14f0-46cf-9459-7c212f0c8478
Content-Type: application/vnd.api+json

Body

Response

Headers

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

Body

{
  "data": {
    "id": "92f2de24-14f0-46cf-9459-7c212f0c8478",
    "type": "user_notifications",
    "attributes": {
      "created_at": "2021-11-23T14:38:11Z",
      "read": false,
      "updated_at": "2021-11-23T14:38:11Z",
      "updated_in_db_at": "2021-11-23T14:38:11Z"
    },
    "relationships": {
      "user": {
        "data": {
          "id": "80e51b3c-7d27-4d4f-ad9e-5c1c7be4d4f2",
          "type": "users"
        }
      },
      "notification": {
        "data": {
          "id": "4c95ba78-f75d-4df7-b98f-f8ab1083ef42",
          "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/6e776cc0-b2a1-4d20-ac11-e7b706c6701f
Content-Type: application/vnd.api+json

Body

{
  "data": {
    "type": "user_notifications",
    "attributes": {
      "read": false,
      "updated_in_db_at": "2021-11-23 14:38:11 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": "6e776cc0-b2a1-4d20-ac11-e7b706c6701f",
    "type": "user_notifications",
    "attributes": {
      "created_at": "2021-11-23T14:38:11Z",
      "read": false,
      "updated_at": "2021-11-23T14:38:11Z",
      "updated_in_db_at": "2021-11-23T14:38:11Z"
    },
    "relationships": {
      "user": {
        "data": {
          "id": "f7af8451-f9c0-4b23-95cf-8aa790f7719e",
          "type": "users"
        }
      },
      "notification": {
        "data": {
          "id": "2122b517-e3da-43f5-ae5e-08ea02d3695b",
          "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