> ## Documentation Index
> Fetch the complete documentation index at: https://docs.usecroma.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Judiciary norms catalogue (SIDN)

> Search the norms Colombia's judiciary catalogues in its library system: laws, decrees, resolutions, acuerdos, legislative acts and bills from 1866 on, by the words of their text, each with its legislative history, amendments, repeals and a copy of the published document.

The Sistema de Información Doctrinario y Normativo (SIDN) is the catalogue the documentation centre of Colombia's judiciary keeps for judges and court staff. Its norms collection holds about 23,000 laws, decrees, resolutions, acuerdos, legislative acts, bills, circulars and directives, from the nineteenth century to this week's Diario Oficial. What sets it apart is the cataloguing: each norm carries its epigraph, the body that issued it, the issue and pages of the official publication it appeared in, the areas of law and descriptors a librarian assigned to it, and the documents tied to it: the bill's path through Congress in the Gaceta del Congreso, the norms that amended, repealed or developed it, and rulings on it. Croma keeps every norm with a copy of its published document and its full text, searchable by its words down to the article.

## Search the norms

`POST /co/sidn/norms-search/v1` [Dataset 1 credit](https://docs.usecroma.com/datasets.md)

One search over every norm in the catalogue, by the words of its text or filtered by type, number, year or date.

**Request**

| Field | Type | Notes |
| - | - | - |
| `query` | string | Optional words or a question, matched against the full text of each norm, its designation, its epigraph and its topics, the best match first, e.g. `extinción de dominio`, `carrera judicial` or `término para interponer el recurso de apelación`. |
| `type` | string | Optional kind of norm as the catalogue names it, e.g. `Ley`, `Decreto`, `Resolución`, `Acuerdo`, `Acto Legislativo`, `Circular`, `Proyecto de Ley` or `Directiva Presidencial`. Capitals and accents do not matter. |
| `number` | string | Optional number of the norm, e.g. `599`. Leading zeros and separators do not matter; combine it with `type` and `year`. |
| `year` | integer | Optional year of the norm, 1800 or later. 0 searches every year. Default `0`. |
| `issued_from` | string | Optional: only norms issued on or after this day, `yyyy-mm-dd`. |
| `issued_to` | string | Optional: only norms issued on or before this day, `yyyy-mm-dd`. |
| `page` | integer | 1-based page number. Default `1`. |
| `per_page` | integer | Results per page (1-50). Default `20`. |

```bash theme={"dark"}
curl https://api.croma.run/co/sidn/norms-search/v1 \
  -H "Authorization: Bearer $CROMA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "query": "extinción de dominio", "type": "Ley" }'
```

**Response**

Returns `as_of` (how current the data is), the applied filters, `total` and `total_is_exact`, `page`, `per_page`, `total_pages`, `count` and `results[]`, newest year first (best match first when `query` is set). Every result carries `id`, `title` (the norm as it is cited, e.g. `Ley 599 de 2000`), `type`, `number`, `year`, `issued_at`, `subject` (its epigraph), `entity` (the body that issued it), `publication`, `publication_number`, `publication_pages` and `published_at` (the official publication it appeared in), `validity` and `notes` (the catalogue's remarks, when it has any), `areas` and `topics` (how the catalogue classifies it), `related[]`, `official_url`, `document_name`, `document_format`, `document_bytes`, `document_url`, `source_document_url`, `text_url` and `text_length`. `related[]` lists the documents the catalogue ties to the norm, each with `section` (the catalogue's heading: `Antecedentes Legislativos`, `Modificaciones`, `Derogatorias`, `Desarrollo Normativo`, `Jurisprudencia`), `label` (its note, e.g. which article a later law repealed), `document_name`, `document_format`, `document_bytes`, `document_url` (Croma's copy of the file, byte for byte, often a whole issue of the Gaceta del Congreso; null when the catalogue links none, or while the copy is still pending), `source_document_url` and `viewer_url` (opens that file in Croma Viewer). `document_url` is Croma's copy of the norm's document, byte for byte as the source published it, usually the pages of the Diario Oficial that carry it, which stays available whatever happens to the source's link (null when the catalogue links no document, or while the copy is still pending); `source_document_url` is the same document at the source. `viewer_url` opens the document in Croma Viewer, a page for signed-in Croma users that shows the PDF with the cited passages highlighted: add `&cite=<start>-<end>` once per passage, up to 12 (null when Croma holds no PDF of it). When `query` is set, each result also carries `matches[]`: up to 3 passages of the document that answer the search, best first, each with `article` (its heading as the document has it, e.g. `ARTÍCULO 5`, or null where the text is not cut by articles), `text` (the passage, verbatim), `start` and `end` (where it sits in the document's text; `start` works as `offset` on the norm endpoint) and `viewer_url`. Answer and cite from `matches`, and read on through the norm endpoint: nothing has to be downloaded. The text is the one the published document carries; for documents printed before the 1990s it was recognized from the printed page and may hold errors, so check a quote against `document_url`.

| Field | Notes |
| - | - |
| `results[].id` | The norm's identifier in the catalogue, e.g. `N58431`. |
| `results[].title` | The norm as it is cited, e.g. `Ley 599 de 2000`. |
| `results[].type` | The kind of norm as the catalogue names it: `Ley`, `Decreto`, `Resolución`, `Acuerdo`, `Acto Legislativo`, `Circular`, `Proyecto de Ley`, `Directiva Presidencial`, ... |
| `results[].type_key` | The type as a filter compares it: lower case, no accents (`resolucion`). |
| `results[].number` | The norm's number as the catalogue prints it. Null when the designation carries none. |
| `results[].number_key` | The number as a filter compares it: upper-cased, separators and leading zeros dropped. |
| `results[].year` | The year in the norm's designation. |
| `results[].issued_at` | The date the norm was issued, `yyyy-mm-dd`. |
| `results[].subject` | The norm's epigraph: what it is about, in its own words, e.g. `Por la cual se expide el Código Penal`. |
| `results[].entity` | The body that issued it, e.g. `Congreso de la República`, `Consejo Superior de la Judicatura`, `Ministerio de Justicia y del Derecho`. |
| `results[].publication` | The official publication it appeared in: `Diario Oficial`, `Gaceta de la Judicatura`, `Gaceta del Congreso`, ... |
| `results[].publication_number` | The issue of that publication, e.g. `44097`. |
| `results[].publication_pages` | The pages of the issue, e.g. `1-24`. |
| `results[].published_at` | The date of that issue, `yyyy-mm-dd`. |
| `results[].validity` | The catalogue's note on when the norm takes effect or stops applying, when it carries one. |
| `results[].notes` | The catalogue's remarks on the norm, when it carries any (the bills it came from, for a law). |
| `results[].areas[]` | The areas of law the catalogue files the norm under, e.g. `DERECHO PENAL`. |
| `results[].topics[]` | The catalogue's descriptors for the norm, a qualifier after a dash when it has one. |
| `results[].related[]` | The documents the catalogue lists with the norm, under their headings: the bill's path through Congress, the norms that amend, repeal or develop it, and rulings on it. Each with the catalogue's note, Croma's copy and the source's link. |
| `results[].official_url` | The catalogue's search page. |
| `results[].document_name` | The file name the source published the norm's text under. Null when the catalogue links no text. |
| `results[].document_format` | The document's format from its content: `pdf`, `html`, `rtf`, ... |
| `results[].document_bytes` | Size of the document in bytes, when the copy was made. |
| `results[].document_url` | Croma's copy of the norm's text, byte for byte as the source published it: usually the pages of the official publication that carry it. Null when the catalogue links none, or while the copy is still pending. |
| `results[].source_document_url` | The same document at the source. Null when the catalogue links none. |
| `results[].text_url` | The document's whole text as one plain-text file. Null when it has none yet. |
| `results[].text_length` | Length of that text in characters. |
| `results[].viewer_url` | Opens the document in Croma Viewer, in a browser, for a signed-in Croma user: the link to give a reader who wants to see the original. Add `&cite=<start>-<end>` once per passage (up to 12) to open it with those passages highlighted. Null when Croma holds no PDF of the document. |
| `results[].matches[]` | The passages of the document that answer the search, best first, at most 3. Empty when the search has no words. |

## One norm, with its text

`POST /co/sidn/norm/v1` [Dataset 1 credit](https://docs.usecroma.com/datasets.md)

**Request**

| Field | Type | Notes |
| - | - | - |
| `norm_id` | string | **Required.** The norm's `id` from a search result, e.g. `N41`. |
| `article` | string | Optional: return only this article, whole and verbatim, by its number or name as the document heads it, e.g. `1`, `103`, `primero` or `transitorio`. |
| `offset` | integer | First character of the text to return. Pass the previous response's `next_offset` to read on, or a search match's `start` to read from that passage. Default `0`. |
| `limit` | integer | How many characters of the text to return. Default `200000`. |

```bash theme={"dark"}
curl https://api.croma.run/co/sidn/norm/v1 \
  -H "Authorization: Bearer $CROMA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "norm_id": "N41" }'
```

**Response**

Returns `as_of`, `found`, `norm_id` and `norm`. Every result carries `id`, `title` (the norm as it is cited, e.g. `Ley 599 de 2000`), `type`, `number`, `year`, `issued_at`, `subject` (its epigraph), `entity` (the body that issued it), `publication`, `publication_number`, `publication_pages` and `published_at` (the official publication it appeared in), `validity` and `notes` (the catalogue's remarks, when it has any), `areas` and `topics` (how the catalogue classifies it), `related[]`, `official_url`, `document_name`, `document_format`, `document_bytes`, `document_url`, `source_document_url`, `text_url` and `text_length`. `related[]` lists the documents the catalogue ties to the norm, each with `section` (the catalogue's heading: `Antecedentes Legislativos`, `Modificaciones`, `Derogatorias`, `Desarrollo Normativo`, `Jurisprudencia`), `label` (its note, e.g. which article a later law repealed), `document_name`, `document_format`, `document_bytes`, `document_url` (Croma's copy of the file, byte for byte, often a whole issue of the Gaceta del Congreso; null when the catalogue links none, or while the copy is still pending), `source_document_url` and `viewer_url` (opens that file in Croma Viewer). `document_url` is Croma's copy of the norm's document, byte for byte as the source published it, usually the pages of the Diario Oficial that carry it, which stays available whatever happens to the source's link (null when the catalogue links no document, or while the copy is still pending); `source_document_url` is the same document at the source. `viewer_url` opens the document in Croma Viewer, a page for signed-in Croma users that shows the PDF with the cited passages highlighted: add `&cite=<start>-<end>` once per passage, up to 12 (null when Croma holds no PDF of it).

The norm also carries its document's text, so nothing has to be downloaded:

| Field | Notes |
| - | - |
| `content.text`, `content.offset` | The text asked for, verbatim, and the character it starts at: a range of the document, or the one article named by `article`. |
| `content.total_length` | The length of the document's whole text in characters. |
| `content.has_more`, `content.next_offset` | Whether the text asked for continues, and the `offset` to send to read on. |
| `article` | The article `content` holds, when `article` was sent and the document has it. |
| `articles[]` | The document's articles in order, each with `article`, `start` and `end`. |
| `text_url` | The whole text as one plain-text file, for a client that can download. |

> [!NOTE]
>
> The document is usually the pages of the official publication that carry the norm, so its text can open or close with the end or the start of a neighbouring act. `content` is null when the document has no text or has no article of the name sent; `articles` lists the ones it has.

> [!NOTE]
>
> An `id` the catalogue does not carry returns `found: false` with HTTP 200, not an error.

> [card] [Full reference](https://docs.usecroma.com/api-reference/overview.md)
>
> Schemas, all response fields, and an interactive playground.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.