> ## 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 del Servicio Civil

> Search every resolution Peru's civil-service tribunal has issued since 2010, by number, chamber, entity or date, and read any one's full text.

The Tribunal del Servicio Civil is the body that decides appeals by Peru's public servants against the entities they work for: discipline, pay, promotion, the end of a posting. Its two chambers have issued more than 140,000 resolutions since 2010, and they are the working case law of Peruvian public employment.

Each resolution here comes with its number, chamber, session date and the link to the document as published. Resolutions from 2017 onward also carry their full text, along with the entity, the case file, the employment regime, the subject and the tribunal's own summary. Earlier ones were published as images, so they carry the reference and the link but no text.

Search across both chambers at once, by number, year, chamber or session 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 /pe/servir-tsc/resolutions-search/v1` <a className="dataset-pill" href="/datasets">Dataset</a>

One search over both chambers and the full text of every resolution since 2010, filtered by number, year, chamber or session date.

| Field               | Type    | Notes                                                                                                         |
| ------------------- | ------- | ------------------------------------------------------------------------------------------------------------- |
| `query`             | string  | Optional words matched against the resolution number, the entity, the summary and the full text.              |
| `chamber`           | string  | Optional chamber: `primera_sala` or `segunda_sala`. `Primera Sala` and `1` work too.                          |
| `resolution_number` | string  | Optional resolution number, with or without its year, e.g. `05763-2025` or `5763`. Leading zeros are ignored. |
| `year`              | integer | Optional year of the resolution's number. 0 searches every year. Default `0`.                                 |
| `from_date`         | string  | Optional: only resolutions of a session on or after this date, `yyyy-mm-dd`.                                  |
| `to_date`           | string  | Optional: only resolutions of a session 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/pe/servir-tsc/resolutions-search/v1 \
  -H "Authorization: Bearer $CROMA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "query": "régimen disciplinario", "chamber": "primera_sala" }'
```

Returns `as_of` (how current the data is), the applied filters, `total` (matches across every page), `page`, `per_page`, `total_pages`, `count` and `results[]`, most recent session first. Every result carries `id` (the resolution's permanent identifier), `resolution_number` and `resolution_year` (e.g. `5763` of `2025`), `chamber` (`primera_sala` or `segunda_sala`), `resolution_key` (how it is cited, e.g. `5763-2025-primera_sala`), `title`, `resolution_date` (the session it belongs to), `entity` (the public entity the case is against), `expediente`, `regime`, `subject`, `summary` (the tribunal's own sumilla), `text_status` (`ok`, `scanned` or `missing`), `document_url`, `page_url` and `uploaded_at`.

<Note>
  Search results leave out the text: a single resolution can run to tens of thousands of characters. `query` still matches against it, so a phrase from the body finds the resolution; read the text itself with the Tribunal del Servicio Civil Resolution endpoint.
</Note>

## One resolution, in full

`POST /pe/servir-tsc/resolution/v1` <a className="dataset-pill" href="/datasets">Dataset</a>

| Field           | Type    | Notes                                                                                                      |
| --------------- | ------- | ---------------------------------------------------------------------------------------------------------- |
| `resolution_id` | string  | **Required.** The resolution's `id` from a search result, e.g. `7586381`, or its `page_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/pe/servir-tsc/resolution/v1 \
  -H "Authorization: Bearer $CROMA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "resolution_id": "7586381" }'
```

Returns `as_of`, `found`, `resolution_id` and `resolution`, 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 resolution's permanent identifier), `resolution_number` and `resolution_year` (e.g. `5763` of `2025`), `chamber` (`primera_sala` or `segunda_sala`), `resolution_key` (how it is cited, e.g. `5763-2025-primera_sala`), `title`, `resolution_date` (the session it belongs to), `entity` (the public entity the case is against), `expediente`, `regime`, `subject`, `summary` (the tribunal's own sumilla), `text_status` (`ok`, `scanned` or `missing`), `document_url`, `page_url` and `uploaded_at`.

<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 `scanned` (the tribunal published that resolution as an image) or `missing`; `document_url` still links the document.
</Note>

<Note>
  An `id` the tribunal 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>
