# Fetches a list of notifications

```
GET https://api.bookkeep.com/v1/notifications
```

Retrieves a paginated list of notifications based on the provided query parameters. Each notification includes details such as the notification type, associated organization, and status.

## Request

### Query Parameters

**page[size]** integer

The number of notifications to return per page.

**Example:** 10

**page[number]** integer

The page number to retrieve.

**Example:** 1

**sort** string

The sorting order of the notifications. Supported values are `created_at`, `-created_at`, `id`, `-id`, `name`, `-name`, `ignored_at`, `-ignored_at`, `resolved_at`, `-resolved_at`.

**Example:** -created_at

**fields[notification]** string

Comma-separated list of fields to include in the response.

**Example:** type,state,created_at

**filter[organization_id_eq]** string

Filter notifications by fields.

**Example:** 1

## Responses

- **200**
  - **OK**
  - **application/json**

### Schema

**data** object[]

Array [

**id** string

Unique identifier for the Notification object in string format.

**Example:** `1`

**type** string

Type of object.

**Default value:** `notification`

**Example:** `notification`

**attributes** object

Notification attributes.

**id** integer

Unique identifier for the Notification object.

**Example:** `1`

**organization_id** integer

Unique identifier for the Organization object.

**Example:** `1`

**name** string

Unique name for the type of notification.

**Example:** `mapping_required`

**data** object nullable

Notification data used to capture the extra notification details different for each notification type or name.

**Example:** `{"line_item":"gross_sales","jeti_label":"Gross Sales"}`

**created_at** string<date-time>

Date and time when the notification was created.

**Example:** `2024-06-06T13:47:41.491Z`

**ignored_at** string<date-time> nullable

Date and time when the notification was ignored. It is null if the notification is not ignored.

**Example:** `2024-06-06T13:47:41.491Z`

**resolved_at** string<date-time> nullable

Date and time when the notification was resolved. It is null if the notification is not resolved.

**Example:** `2024-06-06T13:47:41.491Z`

**organization_name** string

Name of the organization

**type** string

Name of the notification in title case.

**Example:** `Mapping Required`

**state** string

State of the notification. It can be 'Pending', 'Ignored', or 'Resolved'. A notification is in 'Pending' state when it is created. It is in 'Ignored' state when resolved_at is null. It is in 'Resolved' state when resolved_at is not null.

**Example:** `Pending`

**formatted_created_at** string

Formatted created_at date and time in the organization's timezone.

**Example:** `2024-06-06 09:47:41 EDT`

**issue_details** string

Issue details in HTML format.

**Example:** `<span>Stripe Balance is not mapped</span>`

**resolve_actions** string

Issue details in HTML format.

**Example:** `<p>Reconnect the connection</p>`

**meta** object

**pagination** object

**current** integer

The index of the current page.

**Example:** `1`

**next** integer nullable

The index of the next page. This property is only included when there is a next page available.

**Example:** `2`

**last** integer nullable

The index of the last page. This property is only included when there is a next page available.

**Example:** `5`

**records** integer

The total number of objects.

**Example:** `100`

**links** object

**self** string

URL to the object or collection of objects.

**Example:** `https://api.bookkeep.com/v1/notifications`

**current** string nullable

URL to the current page of objects. This property is only returned when fetching a collection of objects.

**Example:** `https://api.bookkeep.com/v1/notifications?page[number]=1&page[size]=10`

**next** string nullable

URL to the next page of notifications. This property is only returned when fetching a collection of objects a next page is available.

**last** string nullable

URL to the last page of notifications. This property is only returned when fetching a collection of objects a next page is available.

```json
{
  "data": [
    {
      "id": "1",
      "type": "notification",
      "attributes": {
        "id": 1,
        "organization_id": 1,
        "name": "mapping_required",
        "data": {
          "line_item": "gross_sales",
          "jeti_label": "Gross Sales"
        },
        "created_at": "2024-06-06T13:47:41.491Z",
        "ignored_at": "2024-06-06T13:47:41.491Z",
        "resolved_at": "2024-06-06T13:47:41.491Z",
        "organization_name": "string",
        "type": "Mapping Required",
        "state": "Pending",
        "formatted_created_at": "2024-06-06 09:47:41 EDT",
        "issue_details": "<span>Stripe Balance is not mapped</span>",
        "resolve_actions": "<p>Reconnect the connection</p>"
      }
    }
  ],
  "meta": {
    "pagination": {
      "current": 1,
      "next": 2,
      "last": 5,
      "records": 100
    }
  },
  "links": {
    "self": "https://api.bookkeep.com/v1/notifications",
    "current": "https://api.bookkeep.com/v1/notifications?page[number]=1&page[size]=10",
    "next": "string",
    "last": "string"
  }
}
```

#### Authorization: http

```text
name: basic
authtype: http
description: The Bookkeep API uses API keys to authenticate requests. You can view and manage your API keys in the [Bookkeep Developer Dashboard](https://app.bookkeep.com/developers/api_keys).
Your API keys carry many privileges, so be sure to keep them secure! Do not share your secret API keys in publicly accessible areas such as GitHub, client-side code, and so forth.
Authentication to the API is performed via HTTP Basic Auth. Provide your Publishable key as the basic auth username value and your Secret key as the basic auth password value.
All API requests must be made over HTTPS. Calls made over plain HTTP will fail. API requests without authentication will also fail.
```

```curl
curl -L -X GET 'https://api.bookkeep.com/v1/entities' \
  -H 'Authorization: Basic ZGlsaXAuYmFpcmFnaUBib29ra2VlcC5jbzpXLlM4NVZGbkJyeEY2QmI='
```

- curl
- nodejs
- python
- ruby
- csharp
- php

- CURL

```bash
curl -L 'https://api.bookkeep.com/v1/notifications' \
-H 'Accept: application/json' \
-H 'Authorization: Basic PHVzZXJuYW1lPjo8cGFzc3dvcmQ+'
```
