Submit Corrections

POST
/api/v1/document/{extractionSchemaId}/process-file/{fileId}/submit-corrections

Accept or modify the extracted data from document processing. This endpoint supports both accepting all results at once or making granular corrections including deleting, updating, and adding new rows.

Request Parameters

Path Parameters
required
extractionSchemaIdstring

The unique identifier of the extraction schema used for processing.

required
fileIdstring

The unique identifier of the processed file (returned from process-file endpoint).

Request Body

The request body must contain either acceptAll: true for accepting all extracted data, or a tables object for granular corrections.

optional
acceptAllboolean

Set to true to accept all extracted rows without modifications.

optional
tablesobject

Object containing granular corrections for specific tables. Keys are table IDs, values contain arrays of deletedRowIds, updatedRows, and newRows.

Headers
required
Authorizationstring

Bearer token for authentication. Format: Bearer your-api-token-here

required
Content-Typestring

Must be set to application/json.

Data Types and Expected Formats

Column Type Specifications

When submitting cell values, ensure they match the expected format for each column type. The API will automatically validate and format values according to these specifications.

data-types-example.json

Code Examples

Accept All Rows
accept-all-request.js
Granular Corrections

Make specific changes to extracted data including deletions, updates, and additions.

granular-corrections-request.js

Response

Success Response (200)

Returns the updated data with row statuses changed to "ACCEPTED" and a summary of changes made.

success-response.json
Error Responses

Common error responses you might encounter.

error-responses.json

Summary Object

Change Summary

The response includes a summary object with statistics about the changes made.

rowsAccepted
number

Number of rows that were accepted

rowsDeleted
number

Number of rows that were deleted

rowsUpdated
number

Number of rows that were modified

rowsAdded
number

Number of new rows that were added

tablesAffected
array

List of table IDs that were modified