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

# RUAF

> Look up a person's social-security affiliations in Colombia by document.

Looks up what a person is affiliated to across Colombia's social-security
system — health, pensions, occupational risk, severance and family-compensation
funds — in the Ministerio de Salud's Registro Único de Afiliados (RUAF).

`POST /co/ruaf/affiliations/v1`

| Field             | Type   | Notes                                                                                                                                                                                       |
| ----------------- | ------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `document_type`   | enum   | Colombian document type (`CC`, `CE`, `TI`, `RC`, `PA`, `PEP`, `PPT`). Default `CC`.                                                                                                         |
| `document_number` | string | **Required.** Colombian cédula. 5-12 digits.                                                                                                                                                |
| `issue_date`      | string | **Required.** Date the document was issued (`YYYY-MM-DD`). The register requires it and refuses the lookup when it does not match. For `TI` and `RC` it asks for the date of birth instead. |

```bash theme={"dark"}
curl https://api.croma.run/co/ruaf/affiliations/v1 \
  -H "Authorization: Bearer $CROMA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "document_number": "1234567890", "issue_date": "2008-02-15" }'
```

The response echoes the document that was looked up and lists every affiliation
the register holds for it, across subsystems:

| Field                              | Notes                                                                                                                                                                                                                                               |
| ---------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `found`                            | `false` when the register has no record for this document.                                                                                                                                                                                          |
| `issue_date_matches`               | `false` when the register does not accept the document and `issue_date` together. It answers the same way whether the date is wrong or the document is not on file, so this alone does not tell those apart. Nothing else is returned in that case. |
| `document_type`                    | Document type the lookup used.                                                                                                                                                                                                                      |
| `document_type_label`              | Readable label for `document_type`, e.g. "Cédula de Ciudadanía".                                                                                                                                                                                    |
| `document_number`                  | Document number the lookup used.                                                                                                                                                                                                                    |
| `full_name`                        | Names and surnames on the register, or `null` when not found.                                                                                                                                                                                       |
| `sex`                              | Sex as the register reports it (`M` / `F`), or `null`.                                                                                                                                                                                              |
| `as_of`                            | The register's own cut-off date for the report, as `YYYY-MM-DD`.                                                                                                                                                                                    |
| `affiliations`                     | Affiliations found. Empty array when the person has none.                                                                                                                                                                                           |
| `affiliations[].system`            | Subsystem the affiliation belongs to: `Salud`, `Pensiones`, `Riesgos Laborales`, `Cesantías`, `Compensación Familiar`, `Pensionados` or `Programas de Asistencia Social`.                                                                           |
| `affiliations[].entity_name`       | Administrator the person is affiliated to.                                                                                                                                                                                                          |
| `affiliations[].regime`            | Regime or scheme, e.g. `Contributivo`, or `null`.                                                                                                                                                                                                   |
| `affiliations[].status`            | Affiliation status as the source words it, e.g. `Activo`, `Retirado`, or `null`.                                                                                                                                                                    |
| `affiliations[].affiliate_type`    | How the person is attached, e.g. `COTIZANTE`. Health only; `null` elsewhere.                                                                                                                                                                        |
| `affiliations[].start_date`        | Affiliation start date as `YYYY-MM-DD`, or `null`.                                                                                                                                                                                                  |
| `affiliations[].economic_activity` | Employer's economic activity. Occupational risk only; `null` elsewhere.                                                                                                                                                                             |
| `affiliations[].location`          | Department and municipality the affiliation is registered in, or `null`.                                                                                                                                                                            |
| `checked_at`                       | ISO timestamp of when the answer was read.                                                                                                                                                                                                          |

<Note>
  This lookup can take longer than a typical request. It's an
  [async job](/async-jobs). By default the request waits
  inline and returns `{ data }`, or you can poll / use a `callback_url`.
</Note>

<Card title="Full reference" icon="code" href="/api-reference/overview">
  Schemas, all response fields, and an interactive playground.
</Card>
