> For the complete documentation index, see [llms.txt](https://docs.go-data.app/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.go-data.app/obogashenie-dannykh.md).

# Обогащение данных

Обогащение данных: получение дополнительных сведений о персоне на основе известного идентификатора. Поддерживаемые направления: `phone → fio_birth`, `phone → address`, `fio_birth → phone`, `inn/snils/passport → phone`, `inn/snils/passport → fio_birth`.

## Создать задачу массового обогащения (JSON)

> Создание задания на массовое обогащение из списка запросов.\
> \
> Параметры:\
> \- queries: список запросов (до 10000)\
> \- from\_type: тип исходных данных ("phone", "fio\_birth", "inn", "snils" или "passport")\
> \- to\_type: тип данных для обогащения ("phone", "fio\_birth" или "address")\
> \- limit: максимальное количество результатов на запрос (опционально, по умолчанию 500)\
> \
> Баланс списывается сразу за все запросы.\
> Результаты доступны через эндпоинт /enrichment/task/{task\_id}/result после завершения обработки.

```json
{"openapi":"3.1.0","info":{"title":"GoData API","version":"1.0.0"},"tags":[{"name":"Обогащение данных","description":"Обогащение данных: получение дополнительных сведений о персоне на основе известного идентификатора. Поддерживаемые направления: `phone → fio_birth`, `phone → address`, `fio_birth → phone`, `inn/snils/passport → phone`, `inn/snils/passport → fio_birth`."}],"security":[{"HTTPBearer":[]}],"components":{"securitySchemes":{"HTTPBearer":{"type":"http","scheme":"bearer"}},"schemas":{"BatchEnrichmentRequest":{"properties":{"queries":{"anyOf":[{"items":{"type":"string"},"type":"array","maxItems":10000},{"type":"null"}],"title":"Queries","description":"List of queries for enrichment (up to 10000 items). Format depends on `from_type`. Empty strings and duplicates are ignored."},"from_type":{"type":"string","enum":["phone","fio_birth","inn","snils","passport"],"title":"From Type","description":"Source data type. Allowed values:\n- `phone` - phone number (e.g. `+79991234567`)\n- `fio_birth` - full name + date of birth (e.g. `Ivanov Ivan 01.01.1990`)\n- `inn` - tax ID: 12 digits (individual) or 10 digits (legal entity)\n- `snils` - pension insurance number (11 digits)\n- `passport` - RF passport series and number"},"to_type":{"type":"string","enum":["phone","fio_birth","address"],"title":"To Type","description":"Target data type to retrieve. Allowed values:\n- `phone` - phone numbers\n- `fio_birth` - full name and date of birth\n- `address` - residential or registration address"},"limit":{"type":"integer","maximum":500,"minimum":1,"title":"Limit","description":"Maximum number of records per query result (1-500)","default":500}},"type":"object","required":["from_type","to_type"],"title":"BatchEnrichmentRequest","description":"Batch data enrichment task request.\n\nEnrichment retrieves additional information about a person based on a\nknown identifier. For example, find full name by phone number, or address\nby full name + date of birth.\n\nBalance is charged upfront for all queries. Results are available after\ncompletion via `GET /enrichment/task/{task_id}/result`."},"BatchEnrichmentResponse":{"properties":{"task_id":{"type":"string","format":"uuid","title":"Task Id","description":"UUID of the created task - used in subsequent status and result requests"},"task_type":{"type":"string","title":"Task Type","description":"Task type - always `batch`"},"total_queries":{"type":"integer","title":"Total Queries","description":"Number of accepted queries in the task"},"status":{"type":"string","title":"Status","description":"Initial task status - always `pending`"},"from_type":{"type":"string","enum":["phone","fio_birth","inn","snils","passport"],"title":"From Type","description":"Source data type (as passed in request)"},"to_type":{"type":"string","enum":["phone","fio_birth","address"],"title":"To Type","description":"Target data type (as passed in request)"}},"type":"object","required":["task_id","task_type","total_queries","status","from_type","to_type"],"title":"BatchEnrichmentResponse","description":"Response to a batch enrichment task creation.\n\nThe task is queued (`status: pending`) and processed asynchronously.\nTrack progress via `GET /enrichment/task/{task_id}/status`."},"ErrorResponse":{"properties":{"detail":{"type":"string","title":"Detail","description":"Человекочитаемое сообщение об ошибке"}},"type":"object","required":["detail"],"title":"ErrorResponse","description":"Стандартный ответ с ошибкой."},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}},"paths":{"/enrichment/batch":{"post":{"tags":["Обогащение данных"],"summary":"Создать задачу массового обогащения (JSON)","description":"Создание задания на массовое обогащение из списка запросов.\n\nПараметры:\n- queries: список запросов (до 10000)\n- from_type: тип исходных данных (\"phone\", \"fio_birth\", \"inn\", \"snils\" или \"passport\")\n- to_type: тип данных для обогащения (\"phone\", \"fio_birth\" или \"address\")\n- limit: максимальное количество результатов на запрос (опционально, по умолчанию 500)\n\nБаланс списывается сразу за все запросы.\nРезультаты доступны через эндпоинт /enrichment/task/{task_id}/result после завершения обработки.","operationId":"create_batch_enrichment_enrichment_batch_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BatchEnrichmentRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BatchEnrichmentResponse"}}}},"401":{"description":"Не авторизован — отсутствует или недействителен API-ключ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"Недостаточно запросов на балансе","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}}}
```

## Статус задачи обогащения

> Проверка статуса задания обогащения.\
> \
> Возвращает текущий статус задания, количество обработанных запросов и найденных результатов.

```json
{"openapi":"3.1.0","info":{"title":"GoData API","version":"1.0.0"},"tags":[{"name":"Обогащение данных","description":"Обогащение данных: получение дополнительных сведений о персоне на основе известного идентификатора. Поддерживаемые направления: `phone → fio_birth`, `phone → address`, `fio_birth → phone`, `inn/snils/passport → phone`, `inn/snils/passport → fio_birth`."}],"security":[{"HTTPBearer":[]}],"components":{"securitySchemes":{"HTTPBearer":{"type":"http","scheme":"bearer"}},"schemas":{"EnrichmentTaskStatusResponse":{"properties":{"task_id":{"type":"string","format":"uuid","title":"Task Id","description":"Task UUID"},"status":{"type":"string","title":"Status","description":"Status: pending | processing | completed | failed"},"task_type":{"type":"string","title":"Task Type","description":"Task type - always `batch`"},"from_type":{"type":"string","enum":["phone","fio_birth","inn","snils","passport"],"title":"From Type","description":"Source data type"},"to_type":{"type":"string","enum":["phone","fio_birth","address"],"title":"To Type","description":"Target data type"},"total_queries":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Total Queries","description":"Total number of queries in the task"},"processed_queries":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Processed Queries","description":"Number of queries already processed"},"found_queries":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Found Queries","description":"Number of queries with results found"},"spent_requests":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Spent Requests","description":"Requests actually deducted from balance"},"error_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Message","description":"Error message (only when status=failed)"},"created_at":{"type":"string","title":"Created At","description":"Task creation time in ISO 8601"},"started_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Started At","description":"Processing start time in ISO 8601 (None if not yet started)"},"completed_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Completed At","description":"Completion time in ISO 8601 (None if not yet completed)"}},"type":"object","required":["task_id","status","task_type","from_type","to_type","created_at"],"title":"EnrichmentTaskStatusResponse","description":"Current status of an enrichment task.\n\nPossible `status` values:\n- `pending` - waiting to be processed\n- `processing` - currently being processed\n- `completed` - finished, result is available\n- `failed` - finished with error (see `error_message`)"},"ErrorResponse":{"properties":{"detail":{"type":"string","title":"Detail","description":"Человекочитаемое сообщение об ошибке"}},"type":"object","required":["detail"],"title":"ErrorResponse","description":"Стандартный ответ с ошибкой."},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}},"paths":{"/enrichment/task/{task_id}/status":{"get":{"tags":["Обогащение данных"],"summary":"Статус задачи обогащения","description":"Проверка статуса задания обогащения.\n\nВозвращает текущий статус задания, количество обработанных запросов и найденных результатов.","operationId":"get_enrichment_task_status_enrichment_task__task_id__status_get","parameters":[{"name":"task_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Task Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnrichmentTaskStatusResponse"}}}},"401":{"description":"Не авторизован — отсутствует или недействителен API-ключ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Доступ запрещён — ресурс принадлежит другому пользователю","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Ресурс не найден","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}}}
```

## Получить результаты задачи обогащения (JSON)

> Получение результатов задания обогащения.\
> \
> Возвращает результаты обогащения списком JSON-объектов (по объекту на строку).\
> Поддерживает постраничную выдачу через \`\`limit\`\`/\`\`offset\`\` (макс. лимит — 5000).\
> Доступен только после завершения обработки задания.

```json
{"openapi":"3.1.0","info":{"title":"GoData API","version":"1.0.0"},"tags":[{"name":"Обогащение данных","description":"Обогащение данных: получение дополнительных сведений о персоне на основе известного идентификатора. Поддерживаемые направления: `phone → fio_birth`, `phone → address`, `fio_birth → phone`, `inn/snils/passport → phone`, `inn/snils/passport → fio_birth`."}],"security":[{"HTTPBearer":[]}],"components":{"securitySchemes":{"HTTPBearer":{"type":"http","scheme":"bearer"}},"schemas":{"EnrichmentTaskResultResponse":{"properties":{"task_id":{"type":"string","format":"uuid","title":"Task Id","description":"Task UUID"},"limit":{"type":"integer","title":"Limit","description":"Applied page size (max 5000)"},"offset":{"type":"integer","title":"Offset","description":"Applied row offset"},"count":{"type":"integer","title":"Count","description":"Number of rows returned in this page"},"results":{"items":{"additionalProperties":{"type":"string"},"type":"object"},"type":"array","title":"Results","description":"List of enriched rows; each object maps semantic field names to values"}},"type":"object","required":["task_id","limit","offset","count","results"],"title":"EnrichmentTaskResultResponse","description":"Enrichment task result as a JSON list.\n\nEach item in `results` is one row of the enriched dataset, with semantic\nkeys instead of raw column headers. The exact set of keys depends on the\ntask's `from_type`/`to_type`:\n\n- `phone` - phone number in international format without `+` (e.g. `79991234567`)\n- `full_name` - full name in \"Lastname Firstname Patronymic\" title case\n- `birth_date` - date of birth in `DD.MM.YYYY`\n- `inn` / `snils` / `passport` - digits only\n- `address` - address string\n\nThe source field that enrichment was performed *from* is returned verbatim\n(exactly as received in the input), without any normalization. For example,\nfor `from_type=phone` the `phone` field keeps its original formatting.\n\nUse `limit` (max 5000) and `offset` for pagination over large results."},"ErrorResponse":{"properties":{"detail":{"type":"string","title":"Detail","description":"Человекочитаемое сообщение об ошибке"}},"type":"object","required":["detail"],"title":"ErrorResponse","description":"Стандартный ответ с ошибкой."},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}},"paths":{"/enrichment/task/{task_id}/result":{"get":{"tags":["Обогащение данных"],"summary":"Получить результаты задачи обогащения (JSON)","description":"Получение результатов задания обогащения.\n\nВозвращает результаты обогащения списком JSON-объектов (по объекту на строку).\nПоддерживает постраничную выдачу через ``limit``/``offset`` (макс. лимит — 5000).\nДоступен только после завершения обработки задания.","operationId":"get_enrichment_task_result_enrichment_task__task_id__result_get","parameters":[{"name":"task_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Task Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":5000,"minimum":1,"description":"Максимум строк в ответе (макс. 5000).","default":5000,"title":"Limit"},"description":"Максимум строк в ответе (макс. 5000)."},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"description":"Сколько строк результата пропустить.","default":0,"title":"Offset"},"description":"Сколько строк результата пропустить."}],"responses":{"200":{"description":"JSON-список строк результата обогащения","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnrichmentTaskResultResponse"}}}},"401":{"description":"Не авторизован — отсутствует или недействителен API-ключ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Доступ запрещён — ресурс принадлежит другому пользователю","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Ресурс не найден","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}}}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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.go-data.app/obogashenie-dannykh.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.
