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

# Autocomplete affiliations

> Returns up to 5 suggestions of affiliations (institutions, groups, departments or faculties) whose name starts with the given text.

## Path parameters

**aff\_type** `string` *required*

Affiliation subtype. Allowed values:

| Value | Description | Example path |
| - | - | - |
| `institution` | Institutions (universities, research centres) | `/completer/affiliations/institution/univ` |
| `group` | Research groups | `/completer/affiliations/group/bio` |
| `department` | Academic departments | `/completer/affiliations/department/ing` |
| `faculty` | Faculties | `/completer/affiliations/faculty/med` |

**text** `string` *required*

Prefix of the affiliation name. Example: `univ` returns affiliations
whose name starts with "univ".

> [!NOTE]
>
> The search uses Elasticsearch and matches by **prefix**. It always returns
> at most 5 results.

## Response

An array of up to 5 objects with the following fields:

**\[]** `object[]`

List of suggestions.

**properties of each suggestion**

**\_id** `string`

Identifier of the affiliation in the database.

**name** `string`

Name of the affiliation (longest available variant).

**text** `string`

Text used by Elasticsearch for the suggestion.

**\_score** `number`

Elasticsearch relevance score.

**\_source** `object`

Internal Elasticsearch document. It contains `name` (an object with the field
`input`), `full_name`, `country_code` and `types`.

```json 200 — institution theme={null}
[
  {
    "_id": "03bp5hc83",
    "_index": "kahi_dev_institution",
    "_score": 10.0,
    "name": "Universidad de Antioquia",
    "text": "UdeA",
    "_source": {
      "full_name": "Universidad de Antioquia",
      "name": { "input": ["Universidad"], "weight": 10 },
      "country_code": "CO",
      "types": [{ "source": "ror", "type": "Education" }]
    }
  }
]
```

```json 200 — group theme={null}
[
  {
    "_id": "COL0000000",
    "_index": "kahi_dev_group",
    "_score": 10.0,
    "name": "Grupo de Biología Molecular",
    "text": "Biologia Molecular",
    "_source": {
      "name": { "input": ["Biologia Molecular"], "weight": 10 }
    }
  }
]
```

```json 400 theme={null}
{ "error": "mensaje de error" }
```


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