> ## Documentation Index
> Fetch the complete documentation index at: https://docs.fyvel.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Bookings

> Postings behind one line and one period.

```bash cURL theme={null}
curl --request POST \
  --url https://api.fyvel.io/v1/reports/{reportId}/bookings \
  --header 'Authorization: <authorization>' \
  --header 'Content-Type: application/json' \
  --data '{
  "companyIds": ["11111111-1111-4111-8111-111111111111"],
  "periodFrom": "2026-01",
  "periodTo": "2026-06",
  "aggregation": "monthly",
  "layerIds": ["44444444-4444-4444-8444-444444444444"],
  "costCenterCodes": [100],
  "key": "account:aaaaaaaa-aaaa-4aaa-8aaa-aaaaaaaaaaaa",
  "period": "2026-03",
  "page": 1,
  "pageSize": 50
}'
```

```json Body theme={null}
{
  "companyIds": ["11111111-1111-4111-8111-111111111111"],
  "periodFrom": "2026-01",
  "periodTo": "2026-06",
  "aggregation": "monthly",
  "layerIds": ["44444444-4444-4444-8444-444444444444"],
  "costCenterCodes": [100],
  "key": "account:aaaaaaaa-aaaa-4aaa-8aaa-aaaaaaaaaaaa",
  "period": "2026-03",
  "page": 1,
  "pageSize": 50
}
```

```json 200 theme={null}
{
  "reportId": "66666666-6666-4666-8666-666666666666",
  "snapshot": false,
  "pagination": {
    "page": 1,
    "pageSize": 50,
    "hasNext": false,
    "hasPrevious": false
  },
  "bookings": [
    {
      "bookingId": "bbbbbbbb-bbbb-4bbb-8bbb-bbbbbbbbbbbb",
      "date": "2026-03-18",
      "reportingPeriod": "2026-03-01",
      "documentNumber": "INV-100",
      "text": "License March",
      "debit": null,
      "credit": 8000,
      "amount": 8000,
      "costCenter": "100",
      "accountNumber": 8400,
      "accountName": "Revenue",
      "offsetAccountNumber": 1200,
      "offsetAccountName": "Bank",
      "manual": false
    }
  ]
}
```

**Authorization** `string` *required*

`Bearer` and the API key. See [Authentication](https://docs.fyvel.io/en/api/authentication.md).

## Path parameters

**reportId** `string` *required*

Report id from [Reports](https://docs.fyvel.io/en/api/reports.md).

## Body

The [values filter](https://docs.fyvel.io/en/api/report-values.md) plus the cell fields. `costCenterCodes` and `costCenterGroupIds` limit the postings to those cost centers, the same way they do for values. Use the same selection, or the postings will not add up to the number.

**companyIds** `string[]` *required*

One or more company ids.

**periodFrom** `string` *required*

Inclusive, format `YYYY-MM`.

**periodTo** `string` *required*

Inclusive, format `YYYY-MM`. Must not be before `periodFrom`.

**aggregation** `string` (default: monthly)

`monthly`, `quarterly`, or `yearly`.

**layerIds** `string[]`

Booking layers.

**layerGroupIds** `string[]`

Layer groups.

**costCenterCodes** `number[]`

Cost center codes. The postings include only these cost centers.

**costCenterGroupIds** `string[]`

Cost center groups.

**costCenter2Codes** `string[]`

Cost object codes.

**costCenter2GroupIds** `string[]`

Cost object groups.

**displayCurrency** `string`

Three letters, for a consolidated result.

**key** `string` *required*

`key` from the [lines](https://docs.fyvel.io/en/api/report-lines.md), `account:<id>` or `category:<id>`. `header`, `spacer`, and `calculated` have no bookings.

**period** `string`

One cell from the response: `2026-03`, `2026-Q1`, or `2026`. It must match `aggregation` and fall inside the filter. Omit it to use `periodFrom` and `periodTo`, the whole row.

**page** `number` (default: 1)

Page, from 1 to 100. See [Pagination](https://docs.fyvel.io/en/api/pagination.md). Pages are ordered by date and booking id, newest first.

**pageSize** `number` (default: 500)

1 to 1000.

## Response

**reportId** `string` *required*

Report id from the path.

**snapshot** `boolean` *required*

`true` when a selected layer is a snapshot. `bookings` is then empty. That is not zero activity.

**pagination** `object` *required*

See [Pagination](https://docs.fyvel.io/en/api/pagination.md).

**page** `number` *required*

Requested page.

**pageSize** `number` *required*

Size of this page.

**hasNext** `boolean` *required*

`true` when another page follows.

**hasPrevious** `boolean` *required*

`true` when `page` is greater than 1.

**bookings** `object[]` *required*

**bookingId** `string` *required*

Booking id.

**date** `string` *required*

Document date, `YYYY-MM-DD`.

**reportingPeriod** `string` *required*

Reporting period, `YYYY-MM-DD`.

**documentNumber** `string | null` *required*

Document number.

**text** `string | null` *required*

Posting text.

**debit** `number | null` *required*

Debit.

**credit** `number | null` *required*

Credit.

**amount** `number` *required*

Amount.

**costCenter** `string | null` *required*

Cost center code.

**accountNumber** `number | null` *required*

Account number.

**accountName** `string | null` *required*

Account name.

**offsetAccountNumber** `number | null` *required*

Offset account number.

**offsetAccountName** `string | null` *required*

Offset account name.

**manual** `boolean` *required*

Manual booking.

This version does not turn adjustment layers into synthetic postings. An invalid `key` or a period outside the filter returns 400 and `INVALID_REQUEST`.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.