---
title: "Get records (flat)"
method: GET
path: "/datasets/{id}/records-flat"
tags: ["Datasets"]
---

# Get records (flat)

`GET /datasets/{id}/records-flat`

## Request

- Base URL: `https://klaaro.ai/api/v1`
- URL: `https://klaaro.ai/api/v1/datasets/{id}/records-flat`
- Auth: HTTP bearer

Field-centric record list with flat fields map keyed by path (FieldView per field). (flat)

## Path parameters

- `id` string, uuid, required

## Query parameters

- `classification` string
- `class` string: Alias for classification
- `approval` 'pending' | 'approved' | 'approved_with_changes' | 'rejected'
- `createdAfter` string, date-time
- `createdBefore` string, date-time
- `updatedAfter` string, date-time
- `include` string: Comma-separated: events,comments
- `limit` integer
- `cursor` string

## Response `200`

OK

- object
  - `data` Record[]
    - `id` string, uuid, required
    - `documentId` string, uuid, required
    - `datasetId` string, uuid, required: UUID of the dataset this record belongs to
    - `datasetSlug` string, required: Slug of the dataset this record belongs to
    - `rowIndex` integer, required
    - `class` RecordClassRef, required
      - `slug` string, nullable, required
      - `name` string, nullable, required
      - `schemaHash` string, nullable, required: SHA-256 of field definitions at extraction time (pinned on record).
      - `classHash` string, nullable, required: SHA-256 of full class definition at extraction time (pinned on record).
    - `sourcePage` integer, nullable
    - `createdAt` string, date-time, required
    - `updatedAt` string, date-time, required
    - `approval` object, nullable
      - `status` 'pending' | 'approved' | 'approved_with_changes' | 'rejected'
      - `triggeredBy` string[]
    - `crossField` object, required
      - `validation` FieldValidation
        - `violations` Violation[]
          - `ruleId` string
          - `ruleKind` string
          - `status` 'fail' | 'error'
          - `message` string
        - `hasViolations` boolean
    - `comments` object, required
      - `count` integer
      - `preview` Comment[]
        - `id` string, required: UUID for native field_events rows; legacy rows use `legacy:comment:{uuid}`.
        - `body` string, required
        - `author` object, required
          - `kind` 'user' | 'api_key'
          - `id` string, uuid, nullable
          - `name` string, nullable
        - `createdAt` string, date-time, required
        - `updatedAt` string, date-time, required
        - `source` string, nullable: Present when sourced from legacy record_comments.
    - `fields` object, required: Keyed by field path (e.g. 'line_items[0].amount')
  - `meta` ListMeta
    - `nextCursor` string, nullable, required
    - `hasMore` boolean, required

## Other responses

- `401`: Unauthorized
- `403`: Forbidden
- `404`: Not found
- `429`: Rate limited

---

[API](https://skmtc.dev/klaaro/apis/klaaro-api.md) · [All operations](https://skmtc.dev/klaaro/apis/klaaro-api/llms.txt) · [OpenAPI document](https://skmtc.dev/klaaro/apis/klaaro-api/revisions/053a1638b76c?raw)
