---
title: "DIAN Doctrina Document"
method: POST
path: "/co/dian/doctrina/v1"
tags: ["Colombia", "DIAN"]
---

# DIAN Doctrina Document

`POST /co/dian/doctrina/v1`

## Request

- Base URL: `https://api.croma.run`
- URL: `https://api.croma.run/co/dian/doctrina/v1`
- Auth: HTTP bearer

Retrieve the text of one DIAN doctrine document by the `document_id` returned by `dian-doctrina-search`: the official title and the body of the oficio, concepto or norm. Compiled norms run to millions of characters, so the body is returned in character ranges: `content.total_length` is the full size, and when `content.has_more` is true request the next range with `offset: content.next_offset`. `found: false` when no document carries that id.

## Headers

- `Idempotency-Key` string

## Request body

- object
  - `document_id` string, required: `document_id` devuelto por la búsqueda (p. ej. `oficio_dian_18075_2023`).
  - `offset` integer: First character of the range to return. Pass the previous response's `next_offset` to continue reading.
  - `limit` integer: Maximum characters to return (1000-1000000).

## Response `200`

Successful response

- DianDoctrinaDocumentResponse
  - `data` DianDoctrinaDocumentData, required
    - `found` boolean, required
    - `document_id` string, required
    - `title` string, nullable, required
    - `content` object, nullable, required
      - `text` string, required
      - `offset` number, required
      - `total_length` number, required
      - `has_more` boolean, required
      - `next_offset` number, nullable, required
    - `url` string, required

## Other responses

- `400`: Invalid request body
- `401`: Missing or invalid API key
- `429`: Rate limit exceeded
- `500`: Internal error
- `502`: Upstream source returned an error

---

[API](https://skmtc.dev/usecroma/apis/croma-marketplace-api.md) · [All operations](https://skmtc.dev/usecroma/apis/croma-marketplace-api/llms.txt) · [OpenAPI document](https://skmtc.dev/usecroma/apis/croma-marketplace-api/revisions/df016cdb29d7?raw)
