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

# Download QR Code

> Download a QR Code image in multiple formats (PNG, JPG, PDF, SVG, EPS) with a customizable size. The size parameter defines both the width and height in pixels (range: 10–1000, default: 300). Authentication required.

##

## Path Parameter

| Name   | Type     | Required | Description                                           |
| :----- | :------- | :------- | :---------------------------------------------------- |
| `qrid` | `string` | ✅        | Unique QR Code identifier (e.g., `Q3493df1c0e074ac7`) |

***

## Query Parameters

| Name        | Type      | Required | Default | Description                                                                                                |
| :---------- | :-------- | :------- | :------ | :--------------------------------------------------------------------------------------------------------- |
| `file`      | `string`  | No       | `png`   | Output file format. Supported values: `png`, `jpg`, `pdf`, `svg`, `eps`                                    |
| `size`      | `integer` | No       | `300`   | Image width and height in pixels (min: `10`, max: `1000`)                                                  |
| `for_print` | `boolean` | No       | `false` | When `true`, returns a print-optimized QR code (e.g. black and white, suitable for professional printing). |

## Examples

### Download QR Code with Default Size

```bash theme={null}
curl -X GET "https://management.scanova.io/qr/Q3493df1c0e074ac7/download/" \
  -H "Authorization: YOUR_API_KEY" \
  -o "qr-code.png"
```

### Download in Different Formats

```bash theme={null}
# Download as PNG (default)
curl -X GET "https://management.scanova.io/qr/Q3493df1c0e074ac7/download/?file=png" \
  -H "Authorization: YOUR_API_KEY" \
  -o "qr-code.png"

# Download as PDF
curl -X GET "https://management.scanova.io/qr/Q3493df1c0e074ac7/download/?file=pdf" \
  -H "Authorization: YOUR_API_KEY" \
  -o "qr-code.pdf"

# Download as SVG
curl -X GET "https://management.scanova.io/qr/Q3493df1c0e074ac7/download/?file=svg" \
  -H "Authorization: YOUR_API_KEY" \
  -o "qr-code.svg"
```

### Download QR Code with Custom Size

```bash theme={null}
# Download 500x500 pixel QR code
curl -X GET "https://management.scanova.io/qr/Q3493df1c0e074ac7/download/?size=500" \
  -H "Authorization: YOUR_API_KEY" \
  -o "qr-code-500px.png"

# Download small 100x100 pixel QR code
curl -X GET "https://management.scanova.io/qr/Q3493df1c0e074ac7/download/?size=100" \
  -H "Authorization: YOUR_API_KEY" \
  -o "qr-code-small.png"

# Download large 1000x1000 pixel QR code
curl -X GET "https://management.scanova.io/qr/Q3493df1c0e074ac7/download/?size=1000" \
  -H "Authorization: YOUR_API_KEY" \
  -o "qr-code-large.png"
```

### Download with Different Sizes for Different Use Cases

```bash theme={null}
# Small size for web thumbnails
curl -X GET "https://management.scanova.io/qr/Q3493df1c0e074ac7/download/?size=150" \
  -H "Authorization: YOUR_API_KEY" \
  -o "qr-thumbnail.png"

# Medium size for print materials
curl -X GET "https://management.scanova.io/qr/Q3493df1c0e074ac7/download/?size=300" \
  -H "Authorization: YOUR_API_KEY" \
  -o "qr-print.png"

# Large size for high-resolution displays
curl -X GET "https://management.scanova.io/qr/Q3493df1c0e074ac7/download/?size=800" \
  -H "Authorization: YOUR_API_KEY" \
  -o "qr-hd.png"
```

### Download for Print

```bash theme={null}
# Print-optimized QR code (black and white, suitable for professional printing)
curl -X GET "https://management.scanova.io/qr/Q3493df1c0e074ac7/download/?for_print=true" \
  -H "Authorization: YOUR_API_KEY" \
  -o "qr-print-ready.png"

# Print-optimized with custom size
curl -X GET "https://management.scanova.io/qr/Q3493df1c0e074ac7/download/?for_print=true&size=300" \
  -H "Authorization: YOUR_API_KEY" \
  -o "qr-print-300px.png"
```

## Successful Responses

| HTTP Status | Description                     | Response Type                                                                                         |
| :---------- | :------------------------------ | :---------------------------------------------------------------------------------------------------- |
| `200 OK`    | QR Code downloaded successfully | Binary file (`image/png`, `image/jpeg`, `application/pdf`, `image/svg+xml`, `application/postscript`) |

Returned file will match the requested format and size.

### Example Outputs by Format

| Format | MIME Type                | Description                                                      |
| :----- | :----------------------- | :--------------------------------------------------------------- |
| `png`  | `image/png`              | High-quality raster image (default, recommended for general use) |
| `jpg`  | `image/jpeg`             | Compressed raster image (smaller file size)                      |
| `pdf`  | `application/pdf`        | Printable vector format                                          |
| `svg`  | `image/svg+xml`          | Scalable vector graphic (editable in Illustrator/Figma)          |
| `eps`  | `application/postscript` | Print-ready format (for professional printing)                   |

## Error Handling

### Invalid Size Parameter

If the size parameter is outside the allowed range (10-1000), the API will return an error:

```json theme={null}
{
  "error": "Invalid size parameter",
  "message": "Size must be between 10 and 1000 pixels"
}
```

### QR Code Not Found

If the QR code ID doesn't exist:

```json theme={null}
{
  "error": "Not found",
  "message": "QR code not found"
}
```

## Best Practices

* **Use SVG or EPS** for scalable, high-resolution print or design work.
* **Use PNG** for digital and web usage.
* **Avoid extremely large sizes (>800px)** unless required — larger images increase load times and API latency.
* **Protect API keys:** store keys securely in environment variables, not directly in scripts.
* For bulk downloads, loop over QR IDs with a delay or queue to avoid hitting rate limits.


## OpenAPI

````yaml GET /qr/{qrid}/download/
openapi: 3.1.0
info:
  title: Scanova QR Code API
  description: QR Code management endpoints for creating, updating, and managing QR codes
  version: 1.0.0
servers:
  - url: https://management.scanova.io
    description: Production server
security:
  - apiKeyAuth: []
paths:
  /qr/{qrid}/download/:
    get:
      tags:
        - QR Code
      summary: Download QR Code
      description: >-
        Downloads a QR code in various formats with customizable size. The size
        parameter allows you to specify the dimensions of the QR code image
        (10-1000 pixels, default 300). Requires authentication.
      parameters:
        - name: qrid
          in: path
          required: true
          schema:
            type: string
          description: QR Code ID
        - name: file
          in: query
          schema:
            type: string
            enum:
              - png
              - jpg
              - pdf
              - svg
              - eps
            default: png
          description: Download format
        - name: size
          in: query
          schema:
            type: integer
            minimum: 10
            maximum: 1000
            default: 300
          description: >-
            Size of the QR code image in pixels (width and height). Must be
            between 10 and 1000 pixels.
          example: 500
        - name: for_print
          in: query
          required: false
          schema:
            type: boolean
            default: false
          description: >-
            When true, returns a print-optimized QR code (e.g. black and white,
            suitable for professional printing).
      responses:
        '200':
          description: QR Code file
          content:
            image/png:
              schema:
                type: string
                format: binary
            image/jpeg:
              schema:
                type: string
                format: binary
            application/pdf:
              schema:
                type: string
                format: binary
            image/svg+xml:
              schema:
                type: string
                format: binary
        '401':
          description: Unauthorized - Invalid API key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AuthenticationErrorResponse'
        '404':
          description: QR Code not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  detail:
                    type: string
                    example: Not found.
      security:
        - apiKeyAuth: []
components:
  schemas:
    AuthenticationErrorResponse:
      type: object
      properties:
        detail:
          type: string
          description: Authentication error message
          example: Invalid token.
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      in: header
      name: Authorization
      description: >-
        API key authentication. Enter your API key directly in the Authorization
        header.

````