---
title: "Retrieve a formatted table of contents for the document"
method: GET
path: "/api/document/{id}/contents"
tags: ["documents"]
---

# Retrieve a formatted table of contents for the document

`GET /api/document/{id}/contents`

Retrieve a formatted table of contents for the document, transformed via ODD

## Path parameters

- `id` string, required

## Query parameters

- `collapse` boolean
- `odd` string
- `view` 'page' | 'div' | 'single'
- `target` string
- `icons` boolean

## Headers

- `If-Modified-Since` string

## Response `200`

Returns the formatted table of contents as HTML

## Other responses

- `404` — Document not found

## Changes

- **2026-07-17** `07216792837f` — 1 info
  - added the new optional `query` request parameter `collapse`
- **2022-04-27** `d17d03cb77e8` — 1 info
  - added the new optional `header` request parameter `If-Modified-Since`
- **2020-10-14** `b70359972942` — 2 warning
  - deleted the `header` request parameter `If-Modified-Since`
  - deleted the `query` request parameter `collapse`

[Change history](https://skmtc.dev/eeditiones/apis/tei-publisher-documentation-and-demo/changes/api/document/:id/contents/get.md)

---

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