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

# Tribunales Tributarios y Aduaneros

> The sentencias of Chile's tax and customs courts: search about 15,000 first-instance final judgments since 2010 by RUC, RIT, court, office or date, and read any of them in full with its original signed PDF.

Chile's Tribunales Tributarios y Aduaneros (TTA) are the 18 first-instance courts that hear taxpayers' claims against the Servicio de Impuestos Internos (assessments, tax collection orders, property valuations, fines) and against the Servicio Nacional de Aduanas. Each sentencia here is one first-instance final judgment with the case's RUC and RIT, the caption, the court and its region, the office whose act is challenged, the procedure and the subject matter, the sentence and filing dates, the court's extract, whether the TTA publishes it in its jurisprudence collection, the signed PDF kept byte for byte, and its text.

The collection is complete: every sentencia the TTA publishes since 2010, about 15,000, including those it does not list as jurisprudence. Search by RUC, RIT, court, office, date or free text that reaches into the sentencia itself. Search first, then read one sentencia in full.

> [!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](https://docs.usecroma.com/datasets.md).

## Search the sentencias

`POST /cl/tta/rulings-search/v1` [Dataset](https://docs.usecroma.com/datasets.md)

One search over every sentencia the 18 TTA courts have published since 2010, filtered by RUC, RIT, court, office or date.

| Field | Type | Notes |
| - | - | - |
| `query` | string | Optional words matched against the caption, the RUC and RIT, the court, the procedure, the subject, the extract and the sentencia's text, e.g. `crédito fiscal`. Every word must appear. |
| `case_ruc` | string | Optional RUC of the case, e.g. `13-9-0000546-0`. |
| `registration_number` | string | Optional RIT of the case, e.g. `GR-14-00071-2013`. Case is ignored. |
| `court_id` | integer | Optional court number, as in a result's `court_id`, e.g. `14` for Valparaíso or `15` to `18` for the four courts of the Región Metropolitana. `0` searches every court. Default `0`. |
| `agency` | enum | Optional office whose act is challenged: `sii` (tax) or `sna` (customs). |
| `jurisprudence_only` | boolean | When `true`, only the sentencias the TTA publishes in its jurisprudence collection. Default `false`. |
| `from_date` | string | Optional: only sentencias dated on or after this date, `yyyy-mm-dd`. |
| `to_date` | string | Optional: only sentencias dated 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/cl/tta/rulings-search/v1 \
  -H "Authorization: Bearer $CROMA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "query": "crédito fiscal", "agency": "sii" }'
```

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 sentencia first. Every result is one sentencia: `id`, `case_file_id`, `case_ruc` (the rol único de causa) and `registration_number` (the RIT, e.g. `GR-14-00071-2013`), `caption` (the carátula: the claimant against the tax or customs office, in lower case, as the TTA lists it), `court`, `court_id` and `region`, `agency` (`SII` or `SNA`) and `agency_name`, `procedure` and `procedure_id`, `subject` and `subject_id`, `sentence_date`, `year`, `filing_date`, `summary` (the court's extract, when it gives one), `jurisprudence` (whether the TTA publishes it in its jurisprudence collection), `pages`, `bytes`, `text_status`, `text_truncated` (true only for the rare text over 600,000 characters, cut there; the PDF is always whole), `document_url` (Croma's byte-identical copy of the signed PDF) and `source_document_url` (always null: the TTA publishes no direct link to the file). Fields the court does not state are null.

> [!NOTE]
>
> Search results leave out the sentencia's text. `query` still matches against it; read the text itself with the TTA Ruling endpoint.

> [!NOTE]
>
> Every first-instance final judgment the TTA publishes is here, about 15,000 since 2010, including the quarter it does not list as jurisprudence. Send `jurisprudence_only: true` for the jurisprudence collection alone.

## One sentencia, in full

`POST /cl/tta/ruling/v1` [Dataset](https://docs.usecroma.com/datasets.md)

| Field | Type | Notes |
| - | - | - |
| `id` | string | **Required.** The sentencia's `id` from a search result, 32 hexadecimal characters, e.g. `ff8080813ecc6f1d013ed1f2633c13b7`. |
| `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 sentencias fit in one response. Default `200000`. |

```bash theme={"dark"}
curl https://api.croma.run/cl/tta/ruling/v1 \
  -H "Authorization: Bearer $CROMA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "id": "ff8080813ecc6f1d013ed1f2633c13b7" }'
```

Returns `as_of`, `found`, `id` and `ruling`, which carries everything the search returns plus `content` (a window onto the sentencia's text, with `text`, `offset`, `total_length`, `has_more` and `next_offset`). Every result is one sentencia: `id`, `case_file_id`, `case_ruc` (the rol único de causa) and `registration_number` (the RIT, e.g. `GR-14-00071-2013`), `caption` (the carátula: the claimant against the tax or customs office, in lower case, as the TTA lists it), `court`, `court_id` and `region`, `agency` (`SII` or `SNA`) and `agency_name`, `procedure` and `procedure_id`, `subject` and `subject_id`, `sentence_date`, `year`, `filing_date`, `summary` (the court's extract, when it gives one), `jurisprudence` (whether the TTA publishes it in its jurisprudence collection), `pages`, `bytes`, `text_status`, `text_truncated` (true only for the rare text over 600,000 characters, cut there; the PDF is always whole), `document_url` (Croma's byte-identical copy of the signed PDF) and `source_document_url` (always null: the TTA publishes no direct link to the file). Fields the court does not state are null.

> [!NOTE]
>
> Long sentencias 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.

> [!NOTE]
>
> An id the TTA has not published returns `found: false` with HTTP 200, not an error.

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