> ## Documentation Index
> Fetch the complete documentation index at: https://docs.aiployees.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Получаване на документ

> Получаване на единичен документ по ID

Този endpoint връща подробностите за конкретен документ в дадена база знания.

### Path параметри

<ParamField path="knowledgebaseId" type="integer" required>
  Уникалният идентификатор на базата знания
</ParamField>

<ParamField path="documentId" type="integer" required>
  Уникалният идентификатор на документа
</ParamField>

### Отговор

<ResponseField name="data" type="object">
  Обектът документ

  <Expandable title="свойства на документа">
    <ResponseField name="id" type="integer">
      Уникалният идентификатор на документа
    </ResponseField>

    <ResponseField name="name" type="string">
      Името на документа
    </ResponseField>

    <ResponseField name="description" type="string">
      Незадължително описание на документа
    </ResponseField>

    <ResponseField name="type" type="string">
      Тип документ: `website`, `pdf`, `txt`, или `docx`
    </ResponseField>

    <ResponseField name="type_label" type="string">
      Четим етикет за типа
    </ResponseField>

    <ResponseField name="status" type="string">
      Статус на обработка: `processing`, `active`, или `failed`
    </ResponseField>

    <ResponseField name="status_label" type="string">
      Четим етикет за статуса
    </ResponseField>

    <ResponseField name="created_at" type="string">
      ISO 8601 timestamp на създаване
    </ResponseField>

    <ResponseField name="updated_at" type="string">
      ISO 8601 timestamp на последна актуализация
    </ResponseField>
  </Expandable>
</ResponseField>

<ResponseExample>
  ```json 200 Response theme={null}
  {
    "data": {
      "id": 1,
      "name": "Product Manual",
      "description": "Complete product user manual",
      "type": "pdf",
      "type_label": "PDF",
      "status": "active",
      "status_label": "Active",
      "created_at": "2025-01-05T10:30:00.000000Z",
      "updated_at": "2025-01-05T10:35:00.000000Z"
    }
  }
  ```

  ```json 404 Knowledgebase Not Found theme={null}
  {
    "error": "Knowledgebase not found."
  }
  ```

  ```json 404 Document Not Found theme={null}
  {
    "error": "Document not found."
  }
  ```
</ResponseExample>
