---
title: "Corte Suprema de Justicia de El Salvador Law"
method: POST
path: "/sv/csj-sv/law/v1"
tags: ["El Salvador", "Corte Suprema de Justicia de El Salvador"]
---

# Corte Suprema de Justicia de El Salvador Law

`POST /sv/csj-sv/law/v1`

## Request

- Base URL: `https://api.croma.run`
- URL: `https://api.croma.run/sv/csj-sv/law/v1`
- Auth: HTTP bearer

Retrieve one legal text of El Salvador by its `id` from a search result (e.g. `558819`, the Código Penal) or its `official_url`: its consolidated text, status, every amendment with its act and Croma's copy of its own text, the rulings related to it, and every version of its document Croma has kept. 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
  - `law_id` string, required: The act's `id` from a search result, e.g. `558819`. 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

- CsjSvLawResponse
  - `data` CsjSvLawData, required
    - `as_of` string, nullable, required: How current the data in this response is.
    - `found` boolean, required
    - `law_id` string, required
    - `law` object, nullable, required
      - `id` string, required: The document's permanent number at the Corte Suprema's documentation center, e.g. "558819" (the Código Penal).
      - `title` string, required: The document's name, e.g. "CODIGO PENAL".
      - `type` string, nullable, required: The kind of document: "Decretos Legislativos", "Decretos Ejecutivos", "Decretos Institucionales", "Acuerdos", "Reglamentos", "Ordenanzas Municipales" or "Documentos Generales".
      - `nature` string, nullable, required: The legal nature of the act, e.g. "Decreto Legislativo", "Decreto Municipal", "Acuerdo Ejecutivo".
      - `number` string, nullable, required: The decree or agreement number, e.g. "1030".
      - `status` 'vigente' | 'caducada' | 'derogada', nullable, required: Whether the document is in force: `vigente`, `caducada` (expired) or `derogada` (repealed), as the documentation center records it.
      - `subject` string, nullable, required: The area of law, e.g. "Penal", "Tributaria", "Administrativa".
      - `issuing_body` string, nullable, required: Who issued it, e.g. "ORGANO LEGISLATIVO", "ORGANO EJECUTIVO (Ministerio de Salud)".
      - `state_organ` string, nullable, required: The branch of the state, when recorded: "Legislativo", "Ejecutivo", "Judicial" or "Instituciones autónomas".
      - `municipality` string, nullable, required: The municipality of an ordinance.
      - `department` string, nullable, required: The department of an ordinance.
      - `issue_date` string, nullable, required: `yyyy-mm-dd` the act was issued.
      - `publication_date` string, required: `yyyy-mm-dd` the act was published in the Diario Oficial.
      - `year` number, required: The year of publication in the Diario Oficial.
      - `gazette_number` string, nullable, required: The number of the Diario Oficial that published it.
      - `gazette_volume` string, nullable, required: The volume (tomo) of the Diario Oficial that published it.
      - `considerations` string, nullable, required: The documentation center's summary of what the act is for.
      - `reforms` object[], required: Every amendment the documentation center records, oldest first, each with its act, dates and its own text.
        - `order` number, required: The amendment's place in the documentation center's list, 1 for the oldest.
        - `decree` string, nullable, required: The amending act as the documentation center cites it, e.g. "Decreto Legislativo No. 537 de fecha 26 de marzo de 2026, publicado en el Diario Oficial No. 61, Tomo 450 de fecha 27 de marzo de 2026".
        - `decree_number` string, nullable, required: The amending act's number, e.g. "537".
        - `issuing_body` string, nullable, required: Who issued the amending act, e.g. "ORGANO LEGISLATIVO".
        - `decree_date` string, nullable, required: `yyyy-mm-dd` the amending act was issued.
        - `publication_date` string, nullable, required: `yyyy-mm-dd` the amending act was published in the Diario Oficial.
        - `gazette_number` string, nullable, required: The number of the Diario Oficial that published it.
        - `gazette_volume` string, nullable, required: The volume (tomo) of the Diario Oficial that published it.
        - `document_url` string, nullable, required: Croma's copy of the amending act's text, byte for byte as the documentation center published it. Null when it publishes none.
        - `source_document_url` string, nullable, required: The amending act's text on the Corte Suprema's own site. Null when it links none.
      - `reform_count` number, required: How many amendments the documentation center records.
      - `related_rulings` string[], required: The `id`s of rulings of the Corte Suprema de Justicia de El Salvador the documentation center relates to this act (read them with the ruling endpoint).
      - `other_fields` object[], required: Any other field of the court's record for this act, by its label.
        - `label` string, required: The field's name as the court's record prints it.
        - `value` string, required
      - `text_status` 'ok' | 'scanned' | 'missing', required: `ok` when the full text is here; `scanned` when the document is an image with no text in it; `missing` when the court publishes no readable document.
      - `official_url` string, required: The act's record at the Corte Suprema's documentation center.
      - `document_url` string, nullable, required: Croma's copy of the current version of the act's document (PDF), byte for byte as the court published it. Null when the court publishes none.
      - `source_document_url` string, nullable, required: The act's document on the Corte Suprema's own site, which the court rewrites when it incorporates an amendment.
      - `document_modified_at` string, nullable, required: When the court last changed the current version of the document.
      - `document_versions` object[], required: Every version of the act's document Croma has kept, oldest first: the court rewrites a consolidated text in place when it incorporates an amendment, and each version stays available here.
        - `document_url` string, required: Croma's copy of this version of the document.
        - `modified_at` string, nullable, required: When the court last changed this version of the document, as its site reports it. Null when it reports nothing.
        - `bytes` number, required: The document's size in bytes.
      - `content` object, nullable, required: A range of the act's text, or null when `text_status` is not `ok`.
        - `text` string, required: The requested character range of the act'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/74c745980c60?raw)
