# Person code validator

## getPersonCodeValidator

<mark style="color:green;">`POST`</mark> `https://in.bisnode.ee/rest/getPersonCodeValidator`

**Needed headers:** Content-type: application/json\
\
This endpoint allows you to validate a personal code and extract personal information from it such as:\
`* Country`\
&#x20;   ``empty if Estonia or Lithuania (identical codes) - country can`t be detected``\
&#x20;   `Latvia (LVA)`\
&#x20;   `Finland (FIN)`\
`* Birthday` \
&#x20;   ``empty if Latvia - can`t be detected``\
`* Gender:`\
&#x20;   `Male (M)`\
&#x20;   `Female (F)`\
If response is **empty array \[ ]** - this means your **code is invalid**.\
\
Example Curl request:\
`curl -X POST -k -H 'Content-type: application/json' -i 'https://in.bisnode.ee/rest/getPersonCodeValidator' --data '{`\
&#x20;   `"token": "0c43592834623946u464e963570304596",`\
&#x20;   `"code": "11111111111"`\
`}'`

#### Query Parameters

| Name | Type   | Description    |
| ---- | ------ | -------------- |
| code | string | Personal code. |

{% tabs %}
{% tab title="200 Country = 'EST' or 'LTU' (lines 1-4 in example response)
Country = 'LVA' (lines 6-9)
Country = 'FIN' (lines 11-15)
'not valid code' (returns empty array \[ ] , line 17)
see example responses below:" %}

```javascript
{
    "gender": "F",
    "birthdate": "1990-06-15"
}
or
{
    "birthdate": "1980-10-03",
    "country": "LVA"
}
or
{
    "gender": "F",
    "birthdate": "1977-04-26",
    "country": "FIN"
}
or
[]
```

{% endtab %}

{% tab title="400 Invalid country code" %}

```javascript
{
    "error": "error",
    "code": 400,
    "message": "Code is mandatory"
}
```

{% endtab %}

{% tab title="401 Invalid token" %}

```javascript
{
    "error": "error",
    "code": 401,
    "message": "Token is wrong"
}
```

{% endtab %}

{% tab title="402 Not enough credit" %}

```javascript
{
    "error": "error",
    "code": 402,
    "message": "Monthly requests limit exceeded"
}
```

{% endtab %}

{% tab title="403 " %}

```javascript
{
    "error": "error",
    "code": 403,
    "message": "This request is not allowed for you"
}
```

{% endtab %}

{% tab title="409 " %}

```javascript
{
    "error": "error",
    "code": 409,
    "message": "Something went wrong"
}
```

{% endtab %}

{% tab title="422 Validation failed" %}

```javascript
{
    "error": "error",
    "code": 422,
    "message": "Schema validation error"
}
```

{% endtab %}

{% tab title="423 " %}

```javascript
{
    "error": "error",
    "code": 423,
    "message": "Locked. Wait for previous request to complete"
}
```

{% endtab %}

{% tab title="500 " %}

```javascript
{
    "error": "error",
    "code": 500,
    "message": "Internal Server Error"
}
```

{% endtab %}
{% endtabs %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.bisnode.ee/tools/personcodevalidator.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
