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

# core.document.upload_with_issues

> Fired when a document upload finishes processing but issues were detected — the document is available but may require review.

## Event

```
core.document.upload_with_issues
```

This event fires when document processing completes but Chamelio detected one or more issues (e.g., unsupported content, partially readable pages, or metadata extraction failures). The document is stored and accessible, but action may be required.

## Payload Example

```json theme={null}
{
  "event": "core.document.upload_with_issues",
  "event_id": "evt_01HXYZ9876543210",
  "organization_id": "org_abc123",
  "timestamp": "2025-06-01T14:35:22Z",
  "data": {
    "document_processing_id": 12345,
    "file_id": "file_abc123",
    "file_name": "scanned_contract.pdf",
    "file_extension": "pdf",
    "uploaded_by": "john.doe@example.com",
    "issues": [
      {
        "code": "Duplicate",
        "message": "Document is duplicate",
      }
    ]
  }
}
```

## Payload Fields

### Envelope

| Field             | Type   | Description                                     |
| ----------------- | ------ | ----------------------------------------------- |
| `event`           | string | Always `core.document.upload_with_issues`       |
| `event_id`        | string | Unique delivery ID — use to deduplicate retries |
| `organization_id` | string | ID of the organization that owns the document   |
| `timestamp`       | string | ISO 8601 UTC timestamp of the event             |
| `data`            | object | Event-specific payload (see below)              |

### Data Object

| Field                    | Type    | Description                                      |
| ------------------------ | ------- | ------------------------------------------------ |
| `document_processing_id` | integer | ID of the async processing job                   |
| `file_id`                | string  | Permanent unique identifier for the document     |
| `file_name`              | string  | Original file name                               |
| `file_extension`         | string  | File extension (e.g., `pdf`, `docx`)             |
| `uploaded_by`            | string  | Email of the user who triggered the upload       |
| `issues`                 | array   | List of issue objects detected during processing |

### Issue Object

| Field     | Type   | Description                             |
| --------- | ------ | --------------------------------------- |
| `code`    | string | Machine-readable issue code             |
| `message` | string | Human-readable description of the issue |
| `pages`   | array  | Page numbers affected (if applicable)   |

## Notes

<Warning>
  Documents with issues are still stored and accessible, but the extracted content or metadata may be incomplete. Review the document in the Chamelio web application to assess the impact.
</Warning>
