# File Requirements

| Property | Value |
|  --- | --- |
| Accepted types | PDF, HL7, XML, JSON, CSV, Parquet, PNG, JPEG, HEIC, HEIF, GIF, AVIF, WEBP, BMP, TIFF |
| Max file size | 10 MB |
| Filename | Prefer ASCII; avoid special symbols |


### Supported formats breakdown

- **Documents**: PDF (`.pdf`)
- **Structured Data**: HL7 v2 (`.hl7`), FHIR / XML (`.xml`), JSON (`.json`), CSV (`.csv`), Apache Parquet (`.parquet`)
- **Images**: PNG (`.png`), JPEG (`.jpg`, `.jpeg`), HEIC / HEIF (`.heic`, `.heif`), GIF (`.gif`), AVIF (`.avif`), WebP (`.webp`), BMP (`.bmp`), TIFF (`.tiff`, `.tif`)


> **Need test files?** Download our synthetic, non-PHI sample documents to test the upload pipeline:
- 📄 sample-lab-Haematology.pdf (PDF)
- 🖼️ sample-lab-CBC.png (CBC Image)
- 🖼️ sample-lab-blood_urine.png (Biochemistry & Urinalysis Image)

See full details on the [Sample Files](/docs/sample-files) page.


## Form field name

The file field name is `deviceImage`.

```
Content-Disposition: form-data; name="deviceImage"; filename="your-file.pdf"
```

## Single file upload

```bash
curl --location 'https://app.jondax.eu/api/master?module=pathology' \
--header 'Authorization: Bearer <JONDAX_API_KEY>' \
--form 'deviceImage=@"/path/to/lab-report.pdf"'
```

**Response:**

```json
{
  "success": true,
  "data": {
    "type": "pathology",
    "status": "uploaded",
    "uploads": [
      {
        "uploadId": "<uploadId>",
        "fileName": "E46UNRB_96dpi_1.png",
        "message": "File uploaded successfully"
      }
    ],
    "filesCount": 1,
    "message": "1 pathology file(s) uploaded successfully"
  }
}
```

## Multiple files

You can upload up to **10 files** in a single request by sending multiple `deviceImage` fields. Each file is processed independently and gets its own `uploadId` in the response.

```bash
curl --location 'https://app.jondax.eu/api/master?module=pathology' \
--header 'Authorization: Bearer <JONDAX_API_KEY>' \
--form 'deviceImage=@"/path/to/report-1.pdf"' \
--form 'deviceImage=@"/path/to/report-2.pdf"'
```

**Response:**

```json
{
  "success": true,
  "data": {
    "type": "pathology",
    "status": "uploaded",
    "uploads": [
      {
        "uploadId": "<uploadId-1>",
        "fileName": "report-1.pdf",
        "message": "File uploaded successfully"
      },
      {
        "uploadId": "<uploadId-2>",
        "fileName": "report-2.pdf",
        "message": "File uploaded successfully"
      }
    ],
    "filesCount": 2,
    "message": "2 pathology file(s) uploaded successfully"
  }
}
```

## Upload response field reference

| Field | Type | Description |
|  --- | --- | --- |
| `data.type` | string | Always `"pathology"` |
| `data.status` | string | Always `"uploaded"` on success |
| `data.uploads` | array | One entry per uploaded file |
| `data.uploads[].uploadId` | string | UUID to track this upload — store it for status polling |
| `data.uploads[].fileName` | string | Original filename as received |
| `data.uploads[].message` | string | Always `"File uploaded successfully"` |
| `data.filesCount` | integer | Number of files accepted in this request |
| `data.message` | string | Human-readable summary |