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

# Dirección del Trabajo

> The labour-law doctrine of Chile's Dirección del Trabajo: search about 13,000 dictámenes, ordinarios, circulares, órdenes de servicio and resoluciones by kind, number, date or text, and read any one in full with its original file.

The Dirección del Trabajo (DT) is Chile's labour authority: it inspects workplaces and interprets labour law for employers, workers and unions. Its interpretation is published as administrative doctrine, and that is what is here:

* **Dictámenes**: about 5,000 since 1990, the pronouncements that set the DT's doctrine, numbered `<number>/<correlative>` (e.g. `388/32`).
* **Ordinarios**: about 7,900, the DT's answers to specific consultations, which apply its doctrine.
* **Circulares, órdenes de servicio and resoluciones**: the DT's instructions and resolutions that bear on how labour law is applied.

Each comes with its number and date, its materias and summary, the labelled parts of its text (action, background, legal sources, concordances, who signs and who it is addressed to), the DT's index of concordant pronouncements and of the provisions cited, the full text, and every file the DT published with it, kept byte for byte. Search first, then read one 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 pronouncements

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

One search over every dictamen, ordinario, circular, orden de servicio and resolución the Dirección del Trabajo publishes, filtered by kind, number, year or date.

| Field | Type | Notes |
| - | - | - |
| `query` | string | Optional words in Spanish, matched against the title, the materias, the summary, the descriptors and the full text, e.g. `registro de asistencia`. Every word must appear. |
| `type` | enum | Optional kind: `dictamen` (sets doctrine), `ordinario` (answers a consultation), `circular`, `orden_de_servicio` or `resolucion`. |
| `number` | string | Optional number: `388/32` for a dictamen with its correlative, or `388` for every pronouncement numbered 388. Dots, spaces and leading zeros are ignored. |
| `year` | integer | Optional year it was issued. 0 searches every year. Default `0`. |
| `from_date` | string | Optional: only those issued on or after this date, `yyyy-mm-dd`. |
| `to_date` | string | Optional: only those issued 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/dt-cl/pronouncements-search/v1 \
  -H "Authorization: Bearer $CROMA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "query": "registro de asistencia", "type": "dictamen" }'
```

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 first. Every result carries `id` (the DT's permanent id, e.g. `129643`), `type` (`dictamen`, `ordinario`, `circular`, `orden_de_servicio` or `resolucion`), `title` (e.g. ORD.N°388/32), `number` (normalized, e.g. `388/32`) and `correlative` (a dictamen's part after `/`), `issued_at` and `year`, `subjects` (the materias), `summary`, `keywords` (the DT's descriptors), the labelled parts of the text: `action` (ACTUACIÓN), `background` (ANTECEDENTES), `legal_sources` (FUENTES), `concordances` (CONCORDANCIA), `sender` (DE) and `recipient` (A), and every part in order in `sections` (each with `label` and `text`), `concordance_tags` and `legal_references` (the DT's own index of concordant pronouncements and of the provisions cited), `related` (the pronouncements the DT lists as concordant, each with `id`, `type`, `title` and `issued_at`), `documents` (every file the DT publishes with it, each with `name`, `label`, `format`, `size_kb`, `document_url`, Croma's byte-identical copy, and `source_document_url`), `document_url` and `source_document_url` (those of the first file) and `text_source`. Fields the DT does not state are null or empty.

> [!NOTE]
>
> Search results leave out the full text. `query` still matches against it; read the text itself with the Dirección del Trabajo Chile Pronouncement endpoint.

## One pronouncement, in full

`POST /cl/dt-cl/pronouncement/v1` [Dataset](https://docs.usecroma.com/datasets.md)

| Field | Type | Notes |
| - | - | - |
| `pronouncement_id` | string | **Required.** The pronouncement's `id` from a search result, e.g. `129643`. |
| `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 pronouncements fit in one response. Default `200000`. |

```bash theme={"dark"}
curl https://api.croma.run/cl/dt-cl/pronouncement/v1 \
  -H "Authorization: Bearer $CROMA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "pronouncement_id": "129643" }'
```

Returns `as_of`, `found`, `pronouncement_id` and `pronouncement`, which carries everything the search returns plus `content` (a window onto the full text, with `text`, `offset`, `total_length`, `has_more` and `next_offset`). Every result carries `id` (the DT's permanent id, e.g. `129643`), `type` (`dictamen`, `ordinario`, `circular`, `orden_de_servicio` or `resolucion`), `title` (e.g. ORD.N°388/32), `number` (normalized, e.g. `388/32`) and `correlative` (a dictamen's part after `/`), `issued_at` and `year`, `subjects` (the materias), `summary`, `keywords` (the DT's descriptors), the labelled parts of the text: `action` (ACTUACIÓN), `background` (ANTECEDENTES), `legal_sources` (FUENTES), `concordances` (CONCORDANCIA), `sender` (DE) and `recipient` (A), and every part in order in `sections` (each with `label` and `text`), `concordance_tags` and `legal_references` (the DT's own index of concordant pronouncements and of the provisions cited), `related` (the pronouncements the DT lists as concordant, each with `id`, `type`, `title` and `issued_at`), `documents` (every file the DT publishes with it, each with `name`, `label`, `format`, `size_kb`, `document_url`, Croma's byte-identical copy, and `source_document_url`), `document_url` and `source_document_url` (those of the first file) and `text_source`. Fields the DT does not state are null or empty.

> [!NOTE]
>
> Long texts 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 Dirección del Trabajo 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.