---
title: "Batch fetch sentences for quotation card hydration"
method: POST
path: "/api/sentences/batch"
tags: ["sentences"]
---

# Batch fetch sentences for quotation card hydration

`POST /api/sentences/batch`

## Request

- The document declares no server URL.
- Auth: none declared

## Request body

- BatchSentencesRequest
  - `items` BatchSentenceRequest[], required
    - `book_slug` string, required
    - `end_id` string, nullable
    - `end_number` integer, nullable
    - `kind` 'body' | 'footnote' | 'figure', required: Stored as the Postgres enum `sentence_kind`.
    - `node_slug` string, required
    - `start_id` string, nullable
    - `start_number` integer, nullable: Body/footnote sentence-number addressing. Optional when `start_id` addresses the range by sentence UUID instead (quotations anchored on unnumbered sentences: figure captions, headings).

## Response `200`

Sentence data

- BatchSentencesResponse
  - `items` BatchSentenceResponseItem[], required
    - `book_slug` string, required
    - `book_title` string, required
    - `citation` CitationPart[], required: Resolved citation parts (ordered by `cite_priority`). Empty = no default citation system; the card falls back to `s. N`.
      - `first_ref` string, required
      - `last_ref` string, nullable
      - `template` string, required
    - `figure_html` string, nullable: For a quotation anchored on a figure's caption: the figure block's verbatim `<figure>` markup, so the embed renders the whole figure exactly as the reader does.
    - `figure_number` integer, nullable: The figure's book-wide display number — the reader deep-link key is `fig{N}`.
    - `figure_original_html` string, nullable
    - `language` string, required: ISO code of the book the quoted sentences come from (e.g. "grc", "de", "en"). Used to set the `lang` attribute so non-Latin scripts render in the right face.
    - `node_label` string, required
    - `node_slug` string, required
    - `parent_node_label` string, nullable: Label of the cited node's parent in the toc tree, when one exists. For bibles this is the bible-book ("Romans"); for Milton the work ("Paradise Lost"). Substituted into `{parent}` of a citation template.
    - `sentences` SentenceData[], required
      - `html` string, required
      - `id` string, required: Sentence row id. Shared by both layers (the source layer's `original_html` sits on the same row), so quotation trims anchor to it.
      - `original_html` string, nullable
      - `sentence_number` integer, required
      - `speaker_html` string, nullable: The speech's curated speaker line, verbatim — the character name plus any italic stage parenthetical, exactly as the reader shows it.
      - `speaker_original_html` string, nullable: The same line in the source layer, resolved like `original_html`: the book's own reviewed layer, else the linked source book's speaker (an English translation resolves the Norwegian name).
      - `speech_id` string, nullable: Id of the `speaker` block owning the speech this sentence belongs to, in a drama node. Consecutive sentences sharing it are one speech, so a quoted range crossing several speeches renders with a speaker label at each boundary. `None` outside drama, and for a stage direction standing before the node's first speaker.
    - `source` SourceContext, nullable
      - `book_slug` string, required
      - `book_title` string, required
      - `language` string, required: ISO code of the *source* book, which differs from the quoted book's own `language` whenever a translation edition is quoted (a Greek source under an English translation). Sets the `lang` attribute on the source pane so a non-Latin script renders in its own face.
      - `node_label` string, required
      - `node_slug` string, required

## Other responses

- `404`: Book or node not found

## Changes

- **2026-12-01** `684b3751bfd3`: 1 info
  - added the required property `items/items/sentences/items/id` to the response with the `200` status
- **2026-09-11** `42e08468232b`: 3 info
  - added the optional property `items/items/sentences/items/speaker_html` to the response with the `200` status
  - added the optional property `items/items/sentences/items/speaker_original_html` to the response with the `200` status
  - added the optional property `items/items/sentences/items/speech_id` to the response with the `200` status
- **2026-09-10** `95fbdb1b2a1c`: 2 info
  - added the required property `items/items/language` to the response with the `200` status
  - added the required property `items/items/source/oneOf[#/components/schemas/SourceContext]/language` to the response with the `200` status
- **2026-08-30** `aaba588b2a85`: 7 info
  - added the new optional request property `items/items/end_id`
  - added the new optional request property `items/items/start_id`
  - the request property `items/items/start_number` became nullable
  - the request property `items/items/start_number` became optional
  - …3 more
- **2026-08-22** `1f567b50f90c`: 1 breaking, 3 info
  - request property `items/items/kind` was restricted to a list of enum values
  - added the new `body` enum value to the request property `items/items/kind`
  - added the new `figure` enum value to the request property `items/items/kind`
  - added the new `footnote` enum value to the request property `items/items/kind`

[Operation history](https://skmtc.dev/scholia-study/apis/scholia-api/changes/api/sentences/batch/post.md)

---

[API](https://skmtc.dev/scholia-study/apis/scholia-api.md) - [All operations](https://skmtc.dev/scholia-study/apis/scholia-api/llms.txt) - [OpenAPI document](https://skmtc.dev/scholia-study/apis/scholia-api/revisions/684b3751bfd3?raw)
