---
title: "Tribunal Constitucional Ruling"
method: POST
path: "/pe/tribunal-constitucional/ruling/v1"
tags: ["Peru", "Tribunal Constitucional"]
---

# Tribunal Constitucional Ruling

`POST /pe/tribunal-constitucional/ruling/v1`

## Request

- Base URL: `https://api.croma.run`
- URL: `https://api.croma.run/pe/tribunal-constitucional/ruling/v1`
- Auth: HTTP bearer

Retrieve one resolution of the Tribunal Constitucional del Perú by its `id` from a search result (e.g. `2026/05005-2025-HC.pdf`) or its `official_url`: its full text, the case file number, the kind of resolution and of proceeding, the chamber and the link to the document on the court's own site. The text comes back a character range at a time (`offset`, `limit`); follow `next_offset` until `has_more` is false.

**Dataset endpoint**: answers from the whole source in milliseconds and carries `as_of`.

## Headers

- `Idempotency-Key` string

## Request body

- object
  - `ruling_id` string, required: The resolution's `id` from a search result, e.g. `2026/05005-2025-HC.pdf`. Its `official_url` works too.
  - `offset` integer: First character of the range to return. Pass the previous response's `next_offset` to continue reading.
  - `limit` integer: Maximum characters to return (1000-1000000).

## Response `200`

Successful response

- TribunalConstitucionalRulingResponse
  - `data` TribunalConstitucionalRulingData, required
    - `as_of` string, nullable, required: How current the data in this response is.
    - `found` boolean, required
    - `ruling_id` string, required
    - `ruling` object, nullable, required
      - `id` string, required: The document's permanent identifier: its path on the court's site, e.g. "2026/05005-2025-HC.pdf" or "2021/04841-2019-HC Aclaracion.pdf". One case can have several documents, so the case file number is not unique.
      - `registration_number` string, required: The case file number (expediente) as the court prints it, e.g. "05005-2025-HC".
      - `proceeding_type_code` string, nullable, required: The kind of proceeding as the court's code, read off the case file number: `AA` amparo, `HC` hábeas corpus, `HD` hábeas data, `AC` cumplimiento, `AI` or `PI` inconstitucionalidad, `CC` competencial, `Q` queja.
      - `proceeding_type` string, nullable, required: The kind of proceeding by name: "Amparo", "Hábeas corpus", "Hábeas data", "Cumplimiento", "Inconstitucionalidad", "Competencial" or "Queja". Null for a code outside that list.
      - `type` 'sentencia' | 'auto' | 'sentencia_interlocutoria', nullable, required: The kind of resolution: `sentencia`, `auto` (autos and decretos) or `sentencia_interlocutoria`.
      - `number` string, nullable, required: The number the court gives a sentencia, e.g. "181/2026". Null on autos and on many older sentencias.
      - `publication_date` string, required: `yyyy-mm-dd` the court published the resolution on its site.
      - `year` number, required: The year of publication.
      - `chamber` string, nullable, required: "Pleno", "Sala Primera" or "Sala Segunda". Null when the court records none.
      - `judicial_district` string, nullable, required: The judicial district the case came from, e.g. "Distrito Judicial de Lima". Recorded for about half the resolutions.
      - `case_id` number, nullable, required: The court's own identifier for the case, shared by every document of that case.
      - `text_status` 'ok' | 'scanned' | 'missing', required: `ok` when the full text is here; `scanned` when the court published the resolution as an image with no text in it; `missing` when it published no readable document.
      - `official_url` string, required: The resolution's document on the Tribunal Constitucional's own site.
      - `case_url` string, nullable, required: The case's page on the Tribunal Constitucional's own site.
      - `content` object, nullable, required: A range of the resolution's text, or null when `text_status` is not `ok`.
        - `text` string, required: The requested character range of the resolution's text.
        - `offset` number, required: First character of the range, which is where the reading actually started.
        - `total_length` number, required: Length of the whole text in characters, however much of it this response carries.
        - `has_more` boolean, required: Whether the text continues past this range.
        - `next_offset` number, nullable, required: Pass this back as `offset` to read the next range. Null at the end of the text.

## Other responses

- `400`: Invalid request body
- `401`: Missing or invalid API key
- `429`: Rate limit exceeded
- `500`: Internal error
- `502`: Upstream source returned an error

---

[API](https://skmtc.dev/usecroma/apis/croma-marketplace-api.md) · [All operations](https://skmtc.dev/usecroma/apis/croma-marketplace-api/llms.txt) · [OpenAPI document](https://skmtc.dev/usecroma/apis/croma-marketplace-api/revisions/df016cdb29d7?raw)
