> ## 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 Supremo de Justicia

> Search the jurisprudencia of Bolivia's Tribunal Supremo de Justicia, about 90,000 autos supremos, sentencias and resoluciones of its chambers since 2001, with the court's jurisprudence notes; read any one in full.

The Tribunal Supremo de Justicia is Bolivia's highest court of ordinary jurisdiction. Its chambers (Civil, Penal, Social, Contenciosa y Contenciosa Administrativa, the Sala Plena and the liquidating chambers that closed the former court's backlog) have published about 90,000 resolutions since 2001. Each one here comes with its full text, the resolution and case numbers, the chamber, the kind of resolution and how the court resolved, the area of law, the department the case came from, the reporting justice, the jurisprudence notes the court drew from it (descriptor, restrictor, ratio decidendi, maxim, summary and precedent), the document as the court published it, and a link to the resolution on the court's own site.

Search across all of them at once, by chamber, kind of resolution, area of law, outcome, resolution or case number, reporting justice, department, year or date, or with free text that reaches into the notes and the body of every resolution. Each chamber numbers its own resolutions from one every year, so a resolution number can belong to several chambers; `id` names one 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/tsj-bo/rulings-search/v1` <a className="dataset-pill" href="/datasets">Dataset</a>

One search over the full text and the jurisprudence notes of every resolution since 2001, filtered by chamber, kind of resolution, area of law, outcome, number, reporting justice, department, year or date.

| Field | Type | Notes |
| - | - | - |
| `query` | string | Optional words matched against the resolution and case numbers, the chamber, the area of law, the outcome, the jurisprudence notes and the full text. |
| `chamber` | string | Optional chamber as `chamber` names it, e.g. `Sala Civil`, `Sala Penal`, `Sala Plena` or `Sala Social`, matched from the start. Case and accents are ignored. |
| `type` | enum | Optional kind of resolution: `auto_supremo`, `sentencia` or `resolucion`. |
| `subject` | string | Optional area of law as `subject` names it, e.g. `Civil`, `Penal`, `Familia`, `Social`, `Agrario`, matched from the start. Case and accents are ignored. |
| `outcome` | string | Optional outcome as `outcome` names it, e.g. `Infundado`, `Casa`, `Improcedente`, `Anula`, matched from the start. Case and accents are ignored. |
| `registration_number` | string | Optional resolution number as the court prints it, e.g. `AS/0001/2013` or `SE/0001/2023`. Each chamber numbers its own resolutions, so a number can return several; add `chamber` to narrow it. Case, spaces and punctuation are ignored. |
| `case_number` | string | Optional case file number (expediente) as the court prints it. Case, spaces and punctuation are ignored. |
| `reporting_judge` | string | Optional reporting justice (magistrado relator) as `reporting_judge` names them, matched from the start. Case and accents are ignored. |
| `department` | string | Optional department the case came from, e.g. `La Paz`, `Santa Cruz`, `Chuquisaca`, 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/tsj-bo/rulings-search/v1 \
  -H "Authorization: Bearer $CROMA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
        "query": "nulidad de contrato",
        "chamber": "Sala Civil",
        "type": "auto_supremo"
      }'
```

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. `11378`), `registration_number` (the resolution number, e.g. `AS/0001/2010`), `case_number` (the expediente), `ruling_date`, `year`, `chamber`, `type` (`auto_supremo`, `sentencia` or `resolucion`) with `type_label` and `subtype`, `outcome` (how the court resolved, e.g. `Infundado`, `Casa`), `subject` (the area of law), `proceeding`, `department`, `reporting_judge`, `jurisprudence` (the court's jurisprudence notes, each with `kind`, `descriptor`, `restrictor`, `ratio_decidendi`, `maxim`, `summary` and `precedent`), `descriptors`, `text_status` (`ok`, `scanned` or `missing`), `document_kind` (`scan`, `rendering` or `none`), `official_url` (the resolution's page on the court's site), `document_url` (Croma's copy of the document, byte for byte as the court served it, which stays available whatever happens to the court's link) and `source_document_url` (where the court publishes the document: the scan's own link, or the resolution's page). Fields the court leaves empty are null or empty lists; party names are never included.

<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 Supremo de Justicia de Bolivia Ruling endpoint.
</Note>

## One resolution, in full

`POST /bo/tsj-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. `11378`, 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/tsj-bo/ruling/v1 \
  -H "Authorization: Bearer $CROMA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "ruling_id": "11378" }'
```

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. `11378`), `registration_number` (the resolution number, e.g. `AS/0001/2010`), `case_number` (the expediente), `ruling_date`, `year`, `chamber`, `type` (`auto_supremo`, `sentencia` or `resolucion`) with `type_label` and `subtype`, `outcome` (how the court resolved, e.g. `Infundado`, `Casa`), `subject` (the area of law), `proceeding`, `department`, `reporting_judge`, `jurisprudence` (the court's jurisprudence notes, each with `kind`, `descriptor`, `restrictor`, `ratio_decidendi`, `maxim`, `summary` and `precedent`), `descriptors`, `text_status` (`ok`, `scanned` or `missing`), `document_kind` (`scan`, `rendering` or `none`), `official_url` (the resolution's page on the court's site), `document_url` (Croma's copy of the document, byte for byte as the court served it, which stays available whatever happens to the court's link) and `source_document_url` (where the court publishes the document: the scan's own link, or the resolution's page). Fields the court leaves empty are null or empty lists; party names are never included.

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