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

# booking_headers

> Booking headers from the general ledger, enriched with cost centre, person and creditor references and the associated floor area in m².



## OpenAPI

````yaml https://api.trassets.ai/openapi-v1.json get /v1/accounting/booking_headers
openapi: 3.1.0
info:
  title: Trassets Data API
  description: >

    The **Trassets Data API** exposes customer real-estate and market data as a
    REST API —

    objects, units, contracts and bookings, delivered as machine-readable JSON.
    See Versioning Policy below for the current URL-versioning status.


    ## Quickstart


    ```bash

    export TRASSETS_API_KEY="sk_live_…"

    curl -G "https://api.trassets.ai/property/properties" \
      -H "X-API-Key: $TRASSETS_API_KEY" \
      -d "limit=1"
    ```


    ## Authentication


    Send your API key on every request as the `X-API-Key` header.

    The key determines the customer scope and access tiers.

    Trassets stores only an HMAC-SHA-256 hash — the plaintext key is never shown
    again after creation.


    ## Endpoint Types


    ### Category Endpoints — `/{category}/{api_table}`


    Normalized master data and business queries. Use these for day-to-day
    integrations.


    - **Pagination:** Offset-based (`limit` / `offset` query parameters); `/v1/`
    uses cursor pagination (`limit` / `cursor`)

    - **Data character:** Normalized, business-ready data

    - **Use case:** Business queries, dashboards, incremental data fetches


    ### Raw Endpoints — `/raw/{table_name}`


    Full table access for bulk sync and export. Only API keys of type `raw` may
    use these endpoints;

    keys of type `transformed` get HTTP 403 on `/raw/{table_name}` and an empty
    list on `/raw/tables`.


    - **Pagination:** Cursor-based (`cursor` query parameter from `next_cursor`
    in response)

    - **Data character:** Raw source data, unfiltered

    - **Use case:** Bulk sync, full exports, data warehousing


    ## Pagination


    - **`/v1/` category endpoints**: response body `{"data", "count",
    "next_cursor", "total"}`; pass `next_cursor` as `cursor` for the next page,
    `null` = last page. `offset` is not supported (400).

    - **Legacy category endpoints** (unversioned): `X-Total-Count`,
    `X-Has-More`, `X-Next-Offset` and `X-Next-Cursor` response headers.

    - **Raw endpoints**: `next_cursor` in response body. Stable under concurrent
    writes.


    ## Error format


    Errors follow [RFC 7807](https://datatracker.ietf.org/doc/html/rfc7807)
    (`application/problem+json`):

    `type`, `title`, `status`, `detail`, `instance`.


    | Status | Meaning |

    |--------|---------|

    | 400 | Missing required filter |

    | 401 | Invalid API key |

    | 403 | Missing access tier |

    | 404 | Unknown endpoint |

    | 429 | Rate limit (500 req/h per API key; see `Retry-After` header) |

    | 500 | Internal error |


    ## Versioning Policy


    URL versioning (`/v1/`) is live as a **preview** and rolling out per table:
    it may still receive breaking changes

    (the response envelope and pagination were changed in preview). A table
    appears under `/v1/{category}/{api_table}`

    once it has passed content review; until then it is only reachable under the
    unversioned path.

    The unversioned (legacy) path stays available during the rollout but may
    still receive breaking changes.

    Raw endpoints (`/raw/tables`, `/raw/{table_name}`) are generic per customer
    and are available

    under both `/raw/` and `/v1/raw/` — no per-table review gate. Access
    requires an API key of type `raw`.


    ## Field Glossary


    Common fields across endpoints. See the [full Field
    Glossary](https://docs.trassets.ai/data-model/field-glossary)

    for all domain-specific fields.


    | Field | Description |

    |---|---|

    | `entrance` | Street name and house number, e.g. Musterstrasse 12 |

    | `address` | Comma-separated postal code and city, e.g. 10115, Berlin |

    | `name` | Full name as single field. No separate first/last name available.
    |

    | `floor_area_id` | References floor_area_id in the property_structure table
    |


    ## Request an API key


    API keys are issued via the [Trassets
    Console](https://portal.api.trassets.ai).
  version: 1.0.0
servers:
  - url: https://api.trassets.ai
    description: Production
security: []
paths:
  /v1/accounting/booking_headers:
    get:
      tags:
        - Accounting
      summary: booking_headers
      description: >-
        Booking headers from the general ledger, enriched with cost centre,
        person and creditor references and the associated floor area in m².
      operationId: accounting_booking_header_v1_handler_v1_accounting_booking_headers_get
      parameters:
        - name: limit
          in: query
          required: false
          schema:
            type: integer
            default: 1000
            minimum: 1
            maximum: 100000
          description: Maximum number of rows to return (max 100,000).
        - name: cursor
          in: query
          required: false
          schema:
            type: string
          description: >-
            Opaque pagination cursor from `next_cursor` in the response body of
            the previous page. Omit for the first page. When `next_cursor` is
            `null`, all rows have been fetched. Offset pagination is not
            supported on /v1/ endpoints.
        - name: property_id
          in: query
          required: false
          schema:
            type: string
          description: Filter by property_id
        - name: booking_date
          in: query
          required: false
          schema:
            type: string
          description: Filter by booking_date
        - name: person_id
          in: query
          required: false
          schema:
            type: string
          description: Filter by person_id
        - name: creditor_id
          in: query
          required: false
          schema:
            type: string
          description: Filter by creditor_id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        property_id:
                          type: string
                        creditor_id:
                          type: string
                        person_id:
                          type: string
                        booking_header_id:
                          type: integer
                        cost_center_id_name_concat:
                          type: string
                        booking_text:
                          type: string
                        initial_booking_text:
                          type: string
                        booking_barcode:
                          type: string
                        dms_link:
                          type: string
                        booking_date:
                          type: string
                          format: date
                        booking_value:
                          type: number
                        property_structure_account_id:
                          type: string
                        booking_number:
                          type: integer
                        sqm:
                          type: number
                  count:
                    type: integer
                    description: Number of rows in `data`.
                  next_cursor:
                    type: string
                    nullable: true
                    description: >-
                      Pass as `cursor` for the next page; `null` on the last
                      page.
                  total:
                    type: integer
                    description: >-
                      Rows matching the query from the cursor position onward
                      (on the first page: all matching rows).
                required:
                  - data
                  - count
                  - next_cursor
                  - total
        '400':
          description: Bad Request
          content:
            application/problem+json:
              example:
                type: about:blank
                title: Bad Request
                status: 400
                detail: 'Missing required filter(s): [''property_id'']'
                instance: /v1/accounting/booking_headers
        '401':
          description: Unauthorized
          content:
            application/problem+json:
              example:
                type: about:blank
                title: Unauthorized
                status: 401
                detail: API key required
                instance: /v1/accounting/booking_headers
        '403':
          description: Forbidden
          content:
            application/problem+json:
              example:
                type: about:blank
                title: Forbidden
                status: 403
                detail: Invalid or disabled API key
                instance: /v1/accounting/booking_headers
        '404':
          description: Not Found
          content:
            application/problem+json:
              example:
                type: about:blank
                title: Not Found
                status: 404
                detail: Category or table not found
                instance: /v1/accounting/booking_headers
        '409':
          description: Conflict
          content:
            application/problem+json:
              example:
                type: about:blank
                title: Conflict
                status: 409
                detail: Table was re-synced during pagination; restart without cursor.
                instance: /v1/accounting/booking_headers
        '422':
          description: Unprocessable Entity
          content:
            application/problem+json:
              example:
                type: about:blank
                title: Unprocessable Entity
                status: 422
                detail: 'query -> limit: Input should be greater than or equal to 1'
                instance: /v1/accounting/booking_headers
        '429':
          description: Too Many Requests
          content:
            application/problem+json:
              example:
                type: about:blank
                title: Too Many Requests
                status: 429
                detail: 'Rate limit exceeded: 500 per 1 hour'
                instance: /v1/accounting/booking_headers
      security:
        - APIKeyHeader: []
components:
  securitySchemes:
    APIKeyHeader:
      type: apiKey
      in: header
      name: X-API-Key

````

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