# Retrieve Report Data

> For the complete documentation index, see [llms.txt](https://docs.fondy.io/llms.txt).

This endpoint allows merchants to retrieve report data by sending a POST request with 
necessary filters and pagination parameters.

**POST** `/extend/company/report/`

Base URL: `https://portal.fondy.eu/api`

This endpoint allows merchants to retrieve report data by sending a POST request with 
necessary filters and pagination parameters.

## Body

Content type: `application/json`

- `filters` (object[], required)
  A set of filters, specific to each report ID.
  - `s` (string)
    Filter field, e.g., 'settlement_date'.
  - `m` (string)
    Filter mode, e.g., 'dateis'.
  - `v` (string)
    Filter value, e.g., a specific date.
- `merchant_id` (integer, required)
  Unique ID assigned to the merchant by Fondy.
- `report_id` (666 | 403 | 500 | 528 | 745, required)
  Unique ID of the report. See [list of available reports](doc:create-reports).
- `on_page` (integer, required)
  Limit of records returned per request. Recommended between 10 and 500.
- `page` (integer, required)
  "Records page offset. For example, with `on_page` set to 50, 
  set `page` to 2 to retrieve records 51-100."

Example:

```json
{
  "filters": [
    {
      "s": "settlement_date",
      "m": "dateis",
      "v": "2019-01-24"
    }
  ],
  "merchant_id": 1396424,
  "report_id": 500,
  "on_page": 500,
  "page": 2
}
```

## Responses

### 200

Successful retrieval of report data.

- `data` (string[][])
  Dataset as a sorted two-dimensional JSON array.
- `fields` (string[])
  List of fields returned in the report data.
- `rows_count` (integer)
  Total number of records in the dataset.
- `rows_on_page` (integer)
  Number of records returned in the current request.
- `rows_page` (integer)
  "Page offset in the dataset. With `rows_on_page` set to 10 
  and `rows_page` set to 1, records from 1-10 are returned."

Example:

```json
{
  "data": [
    [
      1234567890,
      "2019-01-23 10:58:38",
      "approved",
      "630.00",
      "UAH",
      "11.97",
      "test-25697841-1",
      "618.03",
      "EUR",
      "2019-01-24 08:00:00",
      "completed",
      "2426012568",
      "2019-01-23 10:58:38",
      "purchase",
      "Visa/MC",
      "test@test.com",
      "Test order 1",
      "[]",
      "Test payment 1",
      10000000001
    ],
    [
      1234567891,
      "2019-01-23 10:56:51",
      "approved",
      "572.86",
      "UAH",
      "10.88",
      "test-94341241-1",
      "561.98",
      "EUR",
      "2019-01-24 08:00:00",
      "completed",
      "2426012568",
      "2019-01-23 10:56:51",
      "purchase",
      "Visa/MC",
      "test2@test.com",
      "Test order 2",
      "[]",
      "Test payment 2",
      10000000002
    ]
  ],
  "fields": [
    "payment_id",
    "order_time",
    "order_status",
    "actual_amount",
    "currency",
    "fee",
    "order_id",
    "settlement_amount",
    "settlement_currency",
    "settlement_date",
    "settlement_status",
    "odb_ref",
    "tran_time",
    "settlement_type",
    "payment_system",
    "sender_email",
    "order_desc",
    "merchant_data",
    "settlement_desc",
    "transaction_id"
  ],
  "rows_count": 2,
  "rows_on_page": 10,
  "rows_page": 1
}
```