> ## Documentation Index
> Fetch the complete documentation index at: https://help.impactu.colav.co/llms.txt
> Use this file to discover all available pages before exploring further.

# Send CIARP file

> Uploads a CIARP Excel file (.xlsx), validates it and returns a quality report in PDF.

> [!NOTE]
>
> Requires an active session. The JWT is read from the `access_token_cookie` cookie
> and the request must carry the `X-CSRF-TOKEN` header. It is sent as
> `multipart/form-data`.

The quality report is emailed every time the file can be validated. If the file has no errors, it is also saved in the institution's folder on Google Drive, or in the server's local storage if Drive fails.

## Request body

**file** `file` *required*

Excel `.xlsx` file with the CIARP data. Another format, a file that cannot
be read or a file without data return `400`.

## Response

**success** `boolean`

`true` if the file has no errors. With errors, the response is `400` with
the same report.

**errors** `integer`

Number of errors found in the file.

**warnings** `integer`

Number of warnings.

**duplicates** `integer`

Number of duplicate records detected.

**pdf\_base64** `string | null`

Quality report in PDF format encoded in Base64. `null` if the file
has no errors, warnings or duplicates.

**file\_msg** `string`

Only with `200`: result of saving, with the name under which the
file was stored.

**msg** `string`

Only on errors: reason for the rejection. If columns are missing or there are unnamed columns, the
response is `422` and `details` lists each problem.

```json 200 theme={null}
{
  "success": true,
  "errors": 0,
  "warnings": 3,
  "duplicates": 0,
  "pdf_base64": "JVBERi0xLjQKJ...",
  "file_msg": "Archivo ciarp_example-institution-id_2026-10-15_14:32.xlsx guardado correctamente."
}
```

```json 400 theme={null}
{ "success": false, "msg": "Archivo requerido" }
```

```json 400 — file with errors theme={null}
{ "success": false, "errors": 2, "warnings": 1, "duplicates": 1, "pdf_base64": "JVBERi0xLjQKJ..." }
```

```json 400 — empty file theme={null}
{ "success": false, "msg": "El archivo cargado está vacío. Verifique que contenga información." }
```

```json 401 theme={null}
{"msg": "Token inválido o expirado", "success": false}
```

```json 422 theme={null}
{
  "success": false,
  "errors": 1,
  "duplicates": 0,
  "msg": "El archivo enviado no cumple con el formato requerido de columnas",
  "details": ["Columnas faltantes: identificación"],
  "pdf_base64": "JVBERi0xLjQKJ..."
}
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.