> ## 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.

# Tribunal Constitucional Plurinacional

> Search about 99,000 resolutions of Bolivia's Tribunal Constitucional Plurinacional and its predecessor since 1999, and read any one in full with its original document.

The Tribunal Constitucional Plurinacional de Bolivia publishes every resolution it hands down, and those of the Tribunal Constitucional that preceded it from 1999 to 2010: about 99,000 sentencias, autos, declaraciones and votes on amparo, libertad, inconstitucionalidad, conflicts of competence and the constitutional review of statutes and autonomy charters. Each one here comes with its full text, the resolution number, the chamber, the reporting justice, the constitutional action, the department the case came from, its case files, the original document as the court published it, and a link to its page at the court.

Search across all of them at once, by kind of resolution, chamber, action, reporting justice, department, resolution or case number, year or date, or with free text that reaches into the body of every resolution.

<Note>
  The whole source, organized and ready to query: every endpoint on this page answers in milliseconds. Every response carries `as_of`: how current the data is. [How datasets work](/datasets).
</Note>

## Search the resolutions

`POST /bo/tcp-bo/rulings-search/v1` <a className="dataset-pill" href="/datasets">Dataset</a>

One search over the full text of every constitutional resolution since 1999, filtered by kind, chamber, action, reporting justice, department, number, year or date.

| Field | Type | Notes |
| - | - | - |
| `query` | string | Optional words matched against the resolution number, the case numbers, the chamber, the action and the full text. |
| `type` | enum | Optional kind of resolution: `sentencia`, `auto`, `declaracion`, `voto_disidente`, `voto_aclaratorio` or `decreto`. |
| `chamber` | string | Optional chamber as `chamber` names it, e.g. `Sala Primera`, `Sala Plena` or `Comisión de Admisión`, matched from the start. Case and accents are ignored. |
| `proceeding_type` | string | Optional constitutional action as `proceeding_type` names it, e.g. `Acción de amparo constitucional`, `Acción de libertad` or `Recurso de habeas corpus`, matched from the start. Case and accents are ignored. |
| `registration_number` | string | Optional resolution number as the court prints it, e.g. `0049/2024-S2`. Returns every resolution of that number, including the votes attached to it. Case, leading zeros, spaces and punctuation are ignored. |
| `case_number` | string | Optional case file number (expediente), e.g. `52034-2022-105-AL`. Case, spaces and punctuation are ignored. |
| `reporting_judge` | string | Optional reporting justice, matched from the start of the name without titles, e.g. `Carlos Alberto Calderón`. Case and accents are ignored. |
| `department` | string | Optional department the case came from, e.g. `La Paz`, `Santa Cruz` or `Cochabamba`, matched from the start. Case and accents are ignored. |
| `year` | integer | Optional year of the resolution. 0 searches every year. Default `0`. |
| `from_date` | string | Optional: only resolutions handed down on or after this date, `yyyy-mm-dd`. |
| `to_date` | string | Optional: only resolutions handed down on or before this date, `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/bo/tcp-bo/rulings-search/v1 \
  -H "Authorization: Bearer $CROMA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
        "query": "debido proceso",
        "type": "sentencia",
        "proceeding_type": "Acción de amparo"
      }'
```

Returns `as_of` (how current the data is), the applied filters, `total` and `total_is_exact`, `page`, `per_page`, `total_pages`, `count` and `results[]`, most recent resolution first. Every result carries `id` (the resolution's permanent number, e.g. `202697`), `registration_number` (the resolution number as the court prints it, e.g. `0049/2024-S2`), `type` (`sentencia`, `auto`, `declaracion`, `voto_disidente`, `voto_aclaratorio` or `decreto`), `type_label` (the court's own label), `ruling_date`, `year`, `chamber` (e.g. `SALA SEGUNDA`, `SALA PLENA`, `COMISIÓN DE ADMISIÓN`), `proceeding_type` (the constitutional action), `reporting_judge`, `department`, `case_numbers` (the case files it decides), `text_status` (`ok`, `scanned` or `missing`), `official_url` (the resolution's page at the court), `document_url` (Croma's copy of the original document, byte for byte as the court published it) and `source_document_url` (always null: the court gives its documents no link of their own). Fields the resolution does not state are null or empty lists; party names are never included as fields.

<Note>
  Search results leave out the text. `query` still matches against it, so a phrase from the body finds the resolution; read the text itself with the Tribunal Constitucional Plurinacional de Bolivia Ruling endpoint.
</Note>

## One resolution, in full

`POST /bo/tcp-bo/ruling/v1` <a className="dataset-pill" href="/datasets">Dataset</a>

| Field | Type | Notes |
| - | - | - |
| `ruling_id` | string | **Required.** The resolution's `id` from a search result, e.g. `202697`, or its `official_url`. |
| `offset` | integer | First character of the text to return. Pass the previous response's `next_offset` to read on. Default `0`. |
| `limit` | integer | How many characters of the text to return. Most resolutions fit in one response. Default `200000`. |

```bash theme={"dark"}
curl https://api.croma.run/bo/tcp-bo/ruling/v1 \
  -H "Authorization: Bearer $CROMA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "ruling_id": "202697" }'
```

Returns `as_of`, `found`, `ruling_id` and `ruling`, which carries everything the search returns plus `content`: a window onto the resolution's full text, with `text`, `offset`, `total_length`, `has_more` and `next_offset`. Every result carries `id` (the resolution's permanent number, e.g. `202697`), `registration_number` (the resolution number as the court prints it, e.g. `0049/2024-S2`), `type` (`sentencia`, `auto`, `declaracion`, `voto_disidente`, `voto_aclaratorio` or `decreto`), `type_label` (the court's own label), `ruling_date`, `year`, `chamber` (e.g. `SALA SEGUNDA`, `SALA PLENA`, `COMISIÓN DE ADMISIÓN`), `proceeding_type` (the constitutional action), `reporting_judge`, `department`, `case_numbers` (the case files it decides), `text_status` (`ok`, `scanned` or `missing`), `official_url` (the resolution's page at the court), `document_url` (Croma's copy of the original document, byte for byte as the court published it) and `source_document_url` (always null: the court gives its documents no link of their own). Fields the resolution does not state are null or empty lists; party names are never included as fields.

<Note>
  Long resolutions are read a range at a time: send `offset` and `limit`, then pass the response's `next_offset` back as `offset` until `has_more` is false. `content` is null when `text_status` is not `ok`; `document_url` still gives the original document when the court published one.
</Note>

<Note>
  An `id` the court has not published returns `found: false` with HTTP 200, not an error.
</Note>

<Card title="Full reference" icon="code" href="/api-reference/overview">
  Schemas, all response fields, and an interactive playground.
</Card>


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