> This is Payabli documentation. For a complete page index, fetch https://docs.payabli.com/llms.txt — append .md to any page URL for lightweight markdown. For section-level indexes, query parameters, and other AI-optimized access methods, see https://docs.payabli.com/ai-agents.md

# List notifications by org

GET https://api-sandbox.payabli.com/api/Query/notifications/org/{orgId}

Return a list of notifications for an organization. Use filters to limit results.

Reference: https://docs.payabli.com/developers/api-reference/notification/get-list-of-notifications-for-organization

## Authentication

- `Authorization` header (bearer token, required)
- `requestToken` header (required) — Long-lived API token sent in the `requestToken` header. See [API token authentication](/developers/api-tokens).

## Servers

- `https://api-sandbox.payabli.com/api` (Sandbox, default)
- `https://api.payabli.com/api` (Production)

## Request

### Path parameters

- `orgId` (integer, required) — The numeric identifier for organization, assigned by Payabli.

### Query parameters

- `fromRecord` (integer, optional, default: 0) — The number of records to skip before starting to collect the result set.
- `limitRecord` (integer, optional, default: 20) — Max number of records to return for the query. Use `0` or negative value to return all records.
- `parameters` (map from string to string, optional) — Collection of field names, conditions, and values used to filter the query **You must remove `parameters=` from the request before you send it, otherwise Payabli will ignore the filters.** Because of a technical limitation, you can't make a request that includes filters from the API console on this page. The response won't be filtered. Instead, copy the request, remove `parameters=` and run the request in a different client, for example: \--url [https://api-sandbox.payabli.com/api/Query/transactions/org/236?parameters=totalAmount(gt)=1000\&limitRecord=20](https://api-sandbox.payabli.com/api/Query/transactions/org/236?parameters=totalAmount\(gt\)=1000\&limitRecord=20) should become: \--url [https://api-sandbox.payabli.com/api/Query/transactions/org/236?totalAmount(gt)=1000\&limitRecord=20](https://api-sandbox.payabli.com/api/Query/transactions/org/236?totalAmount\(gt\)=1000\&limitRecord=20) See [Filters and Conditions Reference](/developers/developer-guides/pay-ops-reporting-engine-overview#filters-and-conditions-reference) for help. **Accepted field names:** * `frequency` (in, nin,ne, eq) * `method` (in, nin, eq, ne) * `event` (in, nin, eq, ne) * `target` (ct, nct, eq, ne) * `status` (eq, ne) Accepted comparison operators - enclosed between parentheses: * eq or empty => equal * gt => greater than * ge => greater or equal * lt => less than * le => less or equal * ne => not equal * ct => contains * nct => not contains * in => inside array * nin => not inside array Accepted parameters: * limitRecord : max number of records for query (default="20", "0" or negative value for all) * fromRecord : initial record in query Example: totalAmount(gt)=20 return all records with totalAmount greater than 20.00
- `sortBy` (string, optional) — The field name to use for sorting results. Use `desc(field_name)` to sort descending by `field_name`, and use `asc(field_name)` to sort ascending by `field_name`.

## Response

### 200

Success

- `Records` (list of object, optional)
  - `content` (object, optional) — Notification content.
    - `eventType` (string, optional) — The notification's event name.
    - `fileFormat` (enum, optional) — Indicate the format of report file to be generated by the engine. Used for `method` = *report-email* and *report-web*.
      - Allowed values: `json`, `csv`, `xlsx`
    - `internalData` (list of object, optional) — Array of pairs key:value to insert in request body to target in **method** = *web* or *report-web*.
      - `key` (string, optional) — Key name.
      - `value` (string, optional) — Key value.
    - `reportName` (enum, optional) — The kind report to generate. For [automated reports](/developers/developer-guides/notifications-and-webhooks-overview#automated-reports) only.
      - Allowed values: `Transaction`, `Settlement`, `Boarding`, `Returned`
    - `timeZone` (integer, optional) — Timezone, in UTC offset. For example, -5 is Eastern time.
    - `transactionId` (string, optional, default: 0) — Used internally to reference the entity or object generating the event.
    - `webHeaderParameters` (list of object, optional) — Array of pairs key:value to insert in header of request to target in **method** = *web* or *report-web*.
      - `key` (string, optional) — Key name.
      - `value` (string, optional) — Key value.
  - `createdAt` (datetime, optional) — Timestamp of when notification was created, in UTC.
  - `frequency` (enum, optional) — Frequency for notifications.
    - Allowed values: `one-time`, `daily`, `weekly`, `biweekly`, `monthly`, `quarterly`, `semiannually`, `annually`, `untilcancelled`
  - `lastUpdated` (datetime, optional) — Timestamp of when notification was last updated, in UTC.
  - `method` (enum, optional) — Method to use to send the notification to the target.
    - Allowed values: `email`, `sms`, `web`, `report-email`, `report-web`
  - `notificationId` (long, optional) — The notification's Payabli identifier. This is the ID used to manage the notification.
  - `ownerId` (integer, optional) — ID for the paypoint or organization that owns the notification. If the `ownerType` field is `0`, this field is the same as the `orgId` for the organization that owns this notification. If the `ownerType` field is `2`, this field is the same as the `paypointId` for the paypoint that owns this notification.
  - `ownerName` (string, optional) — Name of entity owner of notification.
  - `ownerType` (integer, optional) — Entity owner type. Accepted values: - `0`: Organization/partner - `2`: Paypoint
  - `source` (string, optional) — Custom descriptor of source of notification.
  - `status` (integer, optional) — Status of notification: - `0`: Inactive - `1`: Active
  - `target` (string, optional) — Specify the notification target. For `method`=`email` the expected value is a list of email addresses separated by semicolon. For `method`=`sms` the expected value is a list of phone numbers separated by semicolon. For `method`=`web` the expected value is a valid and complete URL. Webhooks support only standard HTTP ports: 80, 443, 8080, or 4443.
- `Summary` (object, optional)
  - `pageIdentifier` (string, optional) — Auxiliary validation used internally by payment pages and components.
  - `pageSize` (integer, optional) — Number of records on each response page.
  - `totalAmount` (double, optional) — Total amount for the records.
  - `totalNetAmount` (double, optional) — Total net amount for the records.
  - `totalPages` (integer, optional) — Total number of records in response.
  - `totalRecords` (integer, optional) — Total number of records in response.

## Examples

**Response**

```json
{
  "Records": [
    {
      "content": {
        "eventType": "ReceivedChargeBack",
        "timeZone": 0
      },
      "createdAt": "2022-06-07T05:00:00Z",
      "frequency": "untilcancelled",
      "lastUpdated": "2022-06-07T05:00:00Z",
      "method": "email",
      "notificationId": 88976,
      "ownerId": 123,
      "ownerName": "Pilgrim Planner",
      "ownerType": 2,
      "source": "api",
      "status": 1,
      "target": "example@example.com"
    },
    {
      "content": {
        "eventType": "ReceivedAchReturn",
        "timeZone": 0
      },
      "createdAt": "2022-06-07T05:00:00Z",
      "frequency": "untilcancelled",
      "lastUpdated": "2022-06-07T05:00:00Z",
      "method": "email",
      "notificationId": 88975,
      "ownerId": 123,
      "ownerName": "Pilgrim Planner",
      "ownerType": 2,
      "source": "api",
      "status": 1,
      "target": "example@example.com"
    }
  ],
  "Summary": {
    "pageSize": 20,
    "totalAmount": 0,
    "totalNetAmount": 0,
    "totalPages": 1,
    "totalRecords": 2
  }
}
```

**SDK Code**

```typescript
import { PayabliClient } from "@payabli/sdk-node";

async function main() {
    const client = new PayabliClient({
        clientId: "YOUR_CLIENT_ID",
        clientSecret: "YOUR_CLIENT_SECRET",
    });
    await client.query.listNotificationsOrg(123, {
        fromRecord: 251,
        limitRecord: 0,
        sortBy: "desc(field_name)",
    });
}
main();

```

```python
from payabli import payabli

client = payabli(
    client_id="YOUR_CLIENT_ID",
    client_secret="YOUR_CLIENT_SECRET",
)

client.query.list_notifications_org(
    org_id=123,
    from_record=251,
    limit_record=0,
    sort_by="desc(field_name)",
)

```

```java
package com.example.usage;

import io.github.payabli.api.PayabliApiClient;
import io.github.payabli.api.resources.query.requests.ListNotificationsOrgRequest;

public class Example {
    public static void main(String[] args) {
        PayabliApiClient client = PayabliApiClient.withCredentials("YOUR_CLIENT_ID", "YOUR_CLIENT_SECRET")
            .build()
        ;

        client.query().listNotificationsOrg(
            123,
            ListNotificationsOrgRequest
                .builder()
                .fromRecord(251)
                .limitRecord(0)
                .sortBy("desc(field_name)")
                .build()
        );
    }
}
```

```ruby
require "payabli"

client = Payabli::Client.new(api_key: "YOUR_API_KEY_HERE")

client.query.list_notifications_org(
  org_id: 123,
  from_record: 251,
  limit_record: 0,
  sort_by: "desc(field_name)"
)

```

```csharp
using PayabliApi;
using System.Threading.Tasks;

public partial class Examples
{
    public async Task Example() {
        var client = new PayabliApiClient(
            clientId: "YOUR_CLIENT_ID",
            clientSecret: "YOUR_CLIENT_SECRET"
        );

        await client.Query.ListNotificationsOrgAsync(
            orgId: 123,
            request: new ListNotificationsOrgRequest {
                FromRecord = 251,
                LimitRecord = 0,
                SortBy = "desc(field_name)"
            }
        );
    }

}

```

```go
package example

import (
    context "context"

    payabli "github.com/payabli/sdk-go"
    client "github.com/payabli/sdk-go/client"
    option "github.com/payabli/sdk-go/option"
)

func do() {
    client := client.NewClient(
        option.WithClientCredentials(
            "YOUR_CLIENT_ID",
            "YOUR_CLIENT_SECRET",
        ),
    )
    request := &payabli.ListNotificationsOrgRequest{
        FromRecord: payabli.Int(
            251,
        ),
        LimitRecord: payabli.Int(
            0,
        ),
        SortBy: payabli.String(
            "desc(field_name)",
        ),
    }
    client.Query.ListNotificationsOrg(
        context.TODO(),
        123,
        request,
    )
}

```

```php
<?php

namespace Example;

use Payabli\PayabliClient;
use Payabli\Query\Requests\ListNotificationsOrgRequest;

$client = new PayabliClient(
    clientId: 'YOUR_CLIENT_ID',
    clientSecret: 'YOUR_CLIENT_SECRET',
);
$client->query->listNotificationsOrg(
    123,
    new ListNotificationsOrgRequest([
        'fromRecord' => 251,
        'limitRecord' => 0,
        'sortBy' => 'desc(field_name)',
    ]),
);

```

```swift
import Foundation

let headers = ["Authorization": "Bearer <token>"]

let request = NSMutableURLRequest(url: NSURL(string: "https://api-sandbox.payabli.com/api/Query/notifications/org/123?fromRecord=251&limitRecord=0&sortBy=desc%28field_name%29")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```