---
title: "Retrieve parts of a document transformed via ODD"
method: GET
path: "/api/parts/{doc}/{format}"
tags: ["documents"]
---

# Retrieve parts of a document transformed via ODD

`GET /api/parts/{doc}/{format}`

Retrieve a document fragment, usually a division or page, transformed to HTML via the ODD. This operation is internally used by pb-view, but can also be helpful with pb-load or in other contexts.

## Path parameters

- `doc` string, required
- `format` 'json' | 'html', required

## Query parameters

- `odd` string
- `view` 'page' | 'div' | 'single'
- `root` string
- `id` string
- `xpath` string
- `map` string
- `highlight` string
- `serialize` 'xml' | 'html5'
- `wrap` boolean

## Headers

- `If-Modified-Since` string

## Response `200`

OK

- object
  - `view` string — the view type used
  - `doc` string — path to the document from which the fragment was retrieved
  - `root` string, nullable
  - `odd` string — the ODD used for the transformation
  - `next` string, nullable — points to the next fragment in the document. Pass this value as `root` in a follow up request.
  - `previous` string, nullable — points to the previous fragment in the document. Pass this value as `root` in a follow up request.
  - `switchView` string, nullable
  - `content` string — the content of the fragment as HTML string
  - `footnotes` string, nullable

## Other responses

- `404` — Document not found

---

[API](https://skmtc.net/eeditiones/apis/tei-publisher-documentation-and-demo.md) · [All operations](https://skmtc.net/eeditiones/apis/tei-publisher-documentation-and-demo/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/eeditiones/tei-publisher-documentation-and-demo/revisions/07216792837f/schema)
