> For the complete documentation index, see [llms.txt](https://docs.facephi.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.facephi.com/docs.facephi-en/rest-api/identity-api/identity-api-reference/onboarding/civil-registry/chile-cow.md).

# Chile COW

Allows you to verify the **validity and status** of Chilean identity cards by integrating with the system **COW** (Certificate of Validity) of the Civil Registry of Chile.

### Endpoint

```
POST /civil-registry/vigencia-cow
```

### Authentication

| Type    | Location | Name          |
| ------- | -------- | ------------- |
| API Key | Header   | **x-api-key** |

### Request body

**Content-Type:** `application/json`

#### Parameters

| Parameter          | Type   | Required | Description                                                        |
| ------------------ | ------ | -------- | ------------------------------------------------------------------ |
| `RUN`              | string | **Yes**  | Chilean user identification number, **including the check digit**. |
| `credentialNumber` | string | **Yes**  | Unique credential number associated with the identification.       |

#### Request example

```bash
curl --location '{IDENTITY_API_BASE_URL}/civil-registry/vigencia-cow' \
--header 'x-api-key: {API_KEY}' \
--data-raw '{
  "RUN": "12345678-9",
  "credentialNumber": "000000000"
}'
```

### Responses

#### `200` Success

#### Response parameters

| Parameter      | Type   | Required | Description                |
| -------------- | ------ | -------- | -------------------------- |
| `responseData` | object | **Yes**  | Contains transaction data. |
| `identity`     | array  | **Yes**  | Contains identity details. |

#### Response parameters — `responseData`

| Parameter           | Type   | Required | Description                                                                                                                                                                         |
| ------------------- | ------ | -------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `idTransaction`     | string | **Yes**  | Unique transaction identifier.                                                                                                                                                      |
| `transactionDate`   | string | **Yes**  | Transaction date in format **YYYY-MM-DD**.                                                                                                                                          |
| `statusTransaction` | string | **Yes**  | Transaction status. Possible values: `000` (ACK), `201` (Technical error), `206` (Invalid format), `301` (Non-existent data), `304` (Poor quality), `306` (No fingerprint provided) |
| `errorDescription`  | string | **Yes**  | Description of the transaction status. Possible values: `ACK`, `Technical error`, `Invalid format`, `Non-existent data`, `Poor quality`, `No fingerprint provided`                  |

#### Response parameters — `identity`

| Parameter             | Type   | Required | Description                                                                                                                      |
| --------------------- | ------ | -------- | -------------------------------------------------------------------------------------------------------------------------------- |
| `RUN`                 | string | **Yes**  | Chilean national identification number (RUT).                                                                                    |
| `credentialProfileId` | string | **Yes**  | Credential type. Possible values: `CEDULA`, `CEDULA_EXT`, `Passport`, `DOC_VIAJE`, `TITULO_VIAJE`, `SALVO_CONDUCTO`              |
| `credentialNumber`    | string | **Yes**  | Document number associated with the credential.                                                                                  |
| `expiryDate`          | string | **Yes**  | Credential expiration date.                                                                                                      |
| `validityStatus`      | string | **Yes**  | Credential validity status. Possible values: `VALID`, `NOT VALID`                                                                |
| `status`              | string | **Yes**  | Detailed credential status. Possible values: `NOT BLOCKED`, `CREATION/RENEWAL`, `TEMPORARY`, `TEMPORARY PERMANENT`, `DEFINITIVE` |

#### Response example

```json
{
  "responseData": {
    "idTransaction": "03a10a56-cf9f-4248-bd60-5ce992562930",
    "transactionDate": "2024-12-13",
    "statusTransaction": "000",
    "errorDescription": "ACK"
  },
  "identity": [
    {
      "status": "NO BLOQUEADO",
      "run": "12345678-9",
      "credentialProfileId": "CEDULA",
      "credentialNumber": "000000000",
      "expiryDate": "2029-06-22",
      "validityStatus": "VIGENTE"
    }
  ]
}
```

#### `400` Bad Request

```json
{
  "status": 400,
  "title": "Bad Request",
  "detail": "Invalid request.",
  "type": "https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/400",
  "errors": []
}
```

#### `401` Unauthorized

```json
{
  "message": "Unauthorized"
}
```

#### `403` Forbidden

```json
{
  "Message": "User is not authorized to access this resource with an explicit deny"
}
```

#### `502` Bad Gateway

```json
{
  "status": 502,
  "title": "Bad Gateway",
  "detail": "Server got an invalid response.",
  "type": "https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/502"
}
```

#### `504` Gateway Timeout

```json
{
  "message": "Endpoint request timed out"
}
```
