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

# COMPRASAL

> El Salvador's public procurement: every contract award, the supplier register with its sanctions, the processes open for offers, and which of them fit what a supplier already sells.

COMPRASAL is El Salvador's public procurement system, run by the Dirección Nacional de Compras Públicas (DINAC) of the Ministerio de Hacienda. Every ministry, municipality and autonomous entity publishes its purchases there: about 150,000 contract awards since the current system opened in December 2024, a register of some 8,600 suppliers, the list of suppliers sanctioned from contracting, and the 500-odd processes open for offers at any time.

Croma keeps all of it, so questions COMPRASAL itself cannot answer have an answer: every award to one supplier across every entity, the amounts it has sold and to whom, whether its name appears on the sanctions list, and which open processes read like what it has sold before. Search the register by name (spelling-tolerant), read one supplier's profile, search awards and open processes, read one award's report with its bidders and budget codes, and match a supplier to the tenders it could bid on this week.

## Search suppliers

`POST /sv/comprasal-sv/suppliers-search/v1` [Dataset](https://docs.usecroma.com/datasets.md)

Find a supplier's `id` by its name, however it was spelled.

| Field | Type | Notes |
| - | - | - |
| `query` | string | Optional supplier name or trade name, e.g. `Textiles Varios`. Leave it empty to page through the whole register. |
| `sanctioned_only` | boolean | When true, only suppliers COMPRASAL flags as sanctioned. Default `false`. |
| `page` | integer | 1-based page number. Default `1`. |
| `per_page` | integer | Results per page (1-100). Default `20`. |

```bash theme={"dark"}
curl https://api.croma.run/sv/comprasal-sv/suppliers-search/v1 \
  -H "Authorization: Bearer $CROMA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "query": "Textiles Varios" }'
```

Returns `as_of` (how current the data is), the applied filters, `total` and `total_is_exact`, `page`, `per_page`, `total_pages`, `count` and `results[]`. Each supplier carries `id`, `name` (a company's legal name, or a person's name for a sole trader), `trade_name`, `sanctioned` and `score` (0 to 100, how close the name is to `query`; null without one).

> [!NOTE]
>
> COMPRASAL's register does not publish suppliers' NITs, so search by name.

## A supplier's profile

`POST /sv/comprasal-sv/supplier/v1` [Dataset](https://docs.usecroma.com/datasets.md)

Everything public procurement knows about one supplier, in one answer.

| Field | Type | Notes |
| - | - | - |
| `supplier_id` | integer | **Required.** The supplier's `id` from the suppliers search, e.g. `392`. |

```bash theme={"dark"}
curl https://api.croma.run/sv/comprasal-sv/supplier/v1 \
  -H "Authorization: Bearer $CROMA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "supplier_id": 392 }'
```

Returns `as_of`, `found`, `supplier_id`, `supplier` (`id`, `name`, `trade_name`, `sanctioned`), `sanctions[]` (`name`, `start_date`, `end_date`, `sanctioning_entity`, `list`, `active`, `score`) and `awards`: `total`, `summarized` and `summary_is_complete` (the amounts add up the 2,000 most recent awards), `amount`, `first_awarded_date`, `last_awarded_date`, `entities[]` (`entity_id`, `entity_name`, `awards`, `amount`) and `latest[]`, the ten most recent awards.

> [!NOTE]
>
> An id the register does not hold returns `found: false` with HTTP 200, not an error. Sanctions are matched by name, since the list carries no supplier id: check `score` before relying on a match.

## Search awards

`POST /sv/comprasal-sv/awards-search/v1` [Dataset](https://docs.usecroma.com/datasets.md)

Every award, by supplier, entity, process, date or words.

| Field | Type | Notes |
| - | - | - |
| `query` | string | Optional words matched against what was bought, the process code, the supplier and the entity, e.g. `uniformes`. |
| `supplier_id` | integer | Optional supplier `id` from the suppliers search: only that supplier's awards. Default `0`. |
| `entity_id` | integer | Optional contracting entity `entity_id`, as awards carry it, e.g. `438`. Default `0`. |
| `process_code` | string | Optional process code, e.g. `1000009-2026-P0003`. |
| `from_date` | string | Optional: awards made on or after this date, `yyyy-mm-dd`. |
| `to_date` | string | Optional: awards made on or before this date, `yyyy-mm-dd`. |
| `page` | integer | 1-based page number. Default `1`. |
| `per_page` | integer | Results per page (1-100). Default `20`. |

```bash theme={"dark"}
curl https://api.croma.run/sv/comprasal-sv/awards-search/v1 \
  -H "Authorization: Bearer $CROMA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "query": "uniformes", "from_date": "2026-01-01" }'
```

Returns `as_of` (how current the data is), the applied filters, `total` and `total_is_exact`, `page`, `per_page`, `total_pages`, `count` and `results[]`. Each award carries `id`, `amount` (US dollars), `awarded_date`, `process_id`, `process_code`, `process_name` (what was bought), `contracting_method` and `contracting_method_code`, `entity_id`, `entity_code`, `entity_name`, `supplier_id`, `supplier_name`, `supplier_trade_name` and `official_url` (the award on COMPRASAL).

## One award's report

`POST /sv/comprasal-sv/award/v1` [Lookup](https://docs.usecroma.com/datasets.md#lookups)

> [!NOTE]
>
> Answers from Croma's copy when it holds a recent answer for the key, otherwise reads the source and keeps the answer. Every response says when the source was last asked (`checked_at`) and where the answer came from (`served_from`).

| Field | Type | Notes |
| - | - | - |
| `award_id` | integer | **Required.** The award's `id` from an awards search, e.g. `587047`. |

```bash theme={"dark"}
curl https://api.croma.run/sv/comprasal-sv/award/v1 \
  -H "Authorization: Bearer $CROMA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "award_id": 587047 }'
```

Returns `found`, `award_id`, `checked_at`, `served_from` and `award`: `contract_name`, `contracting_method`, `term_days`, `planned_amount`, `certified_amount`, `published_at`, `opened_at`, `closed_at`, `process_status`, `signed_at`, `budget_codes[]`, `bidders[]` (`name`, `submitted_at`), `modifications`, `payments` and `official_url`.

> [!NOTE]
>
> An id COMPRASAL does not hold returns `found: false` with HTTP 200, not an error.

## Search open tenders

`POST /sv/comprasal-sv/tenders-search/v1` [Dataset](https://docs.usecroma.com/datasets.md)

The processes taking offers now, soonest deadline first.

| Field | Type | Notes |
| - | - | - |
| `query` | string | Optional words matched against what is being bought, the process code and the entity, e.g. `uniformes`. |
| `activity_code` | string | Optional economic activity code the process is open to, e.g. `46592`. |
| `open_only` | boolean | When true (the default), only processes whose offers are still due. Default `true`. |
| `page` | integer | 1-based page number. Default `1`. |
| `per_page` | integer | Results per page (1-100). Default `20`. |

```bash theme={"dark"}
curl https://api.croma.run/sv/comprasal-sv/tenders-search/v1 \
  -H "Authorization: Bearer $CROMA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "query": "uniformes" }'
```

Returns `as_of` (how current the data is), the applied filters, `total` and `total_is_exact`, `page`, `per_page`, `total_pages`, `count` and `results[]`. Each process carries `id`, `code`, `name` (what is being bought), `entity_name`, `contracting_method` and `contracting_method_code`, `status`, `stage`, `current_stages[]` and `stages[]` (`name`, `starts_at`, `ends_at`), `offers_due_at` (when offers close), `activities[]` (`code`, `name`: the economic activities it is open to) and `activity_codes`.

## Tenders a supplier fits

`POST /sv/comprasal-sv/tenders-for-supplier/v1` [Dataset](https://docs.usecroma.com/datasets.md)

From what a supplier has sold to what it could bid on this week.

| Field | Type | Notes |
| - | - | - |
| `supplier_id` | integer | **Required.** The supplier's `id` from the suppliers search, e.g. `392`. |
| `limit` | integer | How many matched tenders to return (1-50). Default `10`. |

```bash theme={"dark"}
curl https://api.croma.run/sv/comprasal-sv/tenders-for-supplier/v1 \
  -H "Authorization: Bearer $CROMA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "supplier_id": 392 }'
```

Returns `as_of`, `found`, `supplier_id`, `supplier_name`, `awards_considered`, `count` and `results[]`, best match first. Each process carries `id`, `code`, `name` (what is being bought), `entity_name`, `contracting_method` and `contracting_method_code`, `status`, `stage`, `current_stages[]` and `stages[]` (`name`, `starts_at`, `ends_at`), `offers_due_at` (when offers close), `activities[]` (`code`, `name`: the economic activities it is open to) and `activity_codes`. Each match adds `score`, `matched_terms` and `similar_award_ids`.

> [!NOTE]
>
> A supplier with no awards gets no matches: the match reads its words from what it has sold.

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