Migrating to API Version 2025-04-21

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 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.

Affected Endpoints

These API endpoints now use the new configuration structure:

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:

1{
2 "type": "EXTRACT",
3 "fields": [...],
4 "customExtractionRules": "...",
5 "includeBoundingBoxCitations": true
6}

Extraction Processor - After:

1{
2 "type": "EXTRACT",
3 "fields": [...],
4 "extractionRules": "...",
5 "advancedOptions": {
6 "citationsEnabled": true,
7 "modelReasoningInsightsEnabled": true,
8 "chunkingOptions": {
9 "chunkingStrategy": "semantic"
10 }
11 }
12}

Classification Processor - Before:

1{
2 "type": "CLASSIFY",
3 "fields": [...],
4 "customClassificationRules": "...",
5}

Classification Processor - After:

1{
2 "type": "CLASSIFY",
3 "classifications": [...],
4 "classificationRules": "...",
5 "advancedOptions": {
6 "context": "max"
7 }
8}

Splitting Processor - Before:

1{
2 "type": "SPLITTER",
3 "subDocumentClassifications": [...],
4 "customSplitterRules": "...",
5 "customReminders": "...",
6 "identifierRules": "..."
7}

Splitting Processor - After:

1{
2 "type": "SPLITTER",
3 "splitClassifications": [...],
4 "splitRules": "...",
5 "advancedOptions": {
6 "splitIdentifierRules": "...",
7 "splitMethod": "high_precision",
8 "splitExcelDocumentsBySheetEnabled": true
9 }
10}

Example using the update_processor endpoint:

$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.app.