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

# Migrating to API Version 2025-04-21

> Guide to upgrading from older API versions to the 2025-04-21 version

## Overview

The 2025-04-21 API version introduces a significant change to the structure of processor configuration objects. This new structure provides full control over all available options when configuring processors.

## How to Use the New API Version

To use the new API version, set the `Extend-Api-Version` header in your requests:

```
Extend-Api-Version: 2025-04-21
```

## Key Changes

The main change is in the structure of the `config` object used in various API endpoints. The new structure:

* Provides more granular control over processor behavior
* Exposes advanced options that were previously only available internally
* Standardizes option naming across different processor types
* Allows for more powerful configuration of processing behavior

For detailed specifications of the new configuration structure, refer to the [Processor Configs](/api-reference/guides/processor_configs20250421) documentation.

We've also updated the output shape of splitters to use the term `"splits"` instead of `"subDocumentClassifications"`. These changes affect most of our endpoints when using a Splitter. For more details, refer to the [Splitter output types documentation](/api-reference/guides/output_types20250421#splitter-output-type).

## Affected Endpoints

These API endpoints now use the new configuration structure:

* [Run Processor](/api-reference/endpoint/run_processor)
* [Get Processor Run](/api-reference/endpoint/get_processor_run)
* [Get Processor Version](/api-reference/endpoint/get_processor_version)
* [List Processor Versions](/api-reference/endpoint/get_processor_versions)
* [Publish Processor Version](/api-reference/endpoint/publish_processor_version)
* [Update Processor](/api-reference/endpoint/update_processor)
* [Create Processor](/api-reference/endpoint/create_processor)

## Backward Compatibility

The config changes are breaking changes. If you do not send an API version header, you will be pinned to the previous 2024-12-23 API version to avoid breaking changes.

## Example Comparison

### Extraction Processor - Before:

```typescript theme={null}
{
  "type": "EXTRACT",
  "fields": [...],
  "customExtractionRules": "...",
  "includeBoundingBoxCitations": true
}
```

### Extraction Processor - After:

```typescript theme={null}
{
  "type": "EXTRACT",
  "fields": [...],
  "extractionRules": "...",
  "advancedOptions": {
    "citationsEnabled": true,
    "modelReasoningInsightsEnabled": true,
    "chunkingOptions": {
      "chunkingStrategy": "semantic"
    }
  }
}
```

### Classification Processor - Before:

```typescript theme={null}
{
  "type": "CLASSIFY",
  "fields": [...],
  "customClassificationRules": "...",
}
```

### Classification Processor - After:

```typescript theme={null}
{
  "type": "CLASSIFY",
  "classifications": [...],
  "classificationRules": "...",
  "advancedOptions": {
    "context": "max"
  }
}
```

### Splitting Processor - Before:

```typescript theme={null}
{
  "type": "SPLITTER",
  "subDocumentClassifications": [...],
  "customSplitterRules": "...",
  "customReminders": "...",
  "identifierRules": "..."
}
```

### Splitting Processor - After:

```typescript theme={null}
{
  "type": "SPLITTER",
  "splitClassifications": [...],
  "splitRules": "...",
  "advancedOptions": {
    "splitIdentifierRules": "...",
    "splitMethod": "high_precision",
    "splitExcelDocumentsBySheetEnabled": true
  }
}
```

### Example using the `update_processor` endpoint:

```bash theme={null}
curl --location --request POST 'https://api-prod.extend.app/v1/processors/processor_1234' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer YOUR_API_KEY' \
--header 'Extend-Api-Version: 2025-04-21' \
--data '{
  "name": "Updated Invoice Processor",
  "config": {
    "type": "EXTRACT",
    "fields": [
      {
        "id": "invoice_number",
        "name": "Invoice Number",
        "type": "string",
        "description": "The invoice identifier"
      },
      {
        "id": "date",
        "name": "Invoice Date",
        "type": "date",
        "description": "Date the invoice was issued"
      },
      {
        "id": "total",
        "name": "Total Amount",
        "type": "currency",
        "description": "Total amount including tax"
      }
    ],
    "extractionRules": "Extract invoice details from the header section. The total amount should include all taxes and fees.",
    "advancedOptions": {
      "citationsEnabled": true,
      "modelReasoningInsightsEnabled": true,
      "chunkingOptions": {
        "chunkingStrategy": "semantic"
      }
    }
  }
}'
```

## Need Help?

If you encounter any issues while migrating, please contact our support team at [support@extend.com](mailto:support@extend.com).
