Docpier IDP API
  1. agent
Docpier IDP API
  • IDP API
  • Webhook
  • Endpoints
    • agent
      • Upload a document
        POST
      • Retrieve structured data
        GET
      • Stream Document Content
        GET
      • Provide feedback
        PATCH
      • Get Document Feedback
        GET
  1. agent

Provide feedback

PATCH
/v1/workspaces/{workspaceId}/documents/{documentId}/feedback
Allows clients to send feedback (e.g., corrections, accuracy ratings) for a specific document
processing result.
This feedback loop helps Docpier's machine learning models improve accuracy and extraction quality.
Feedback types:
Overall rating: Overall accuracy rating (1=Poor, 5=Excellent)
Comments: Free-form text comments about extraction quality or specific issues/praise
Field corrections: JSON object containing specific field corrections. The structure should
mirror the extracted document's schema, allowing clients to send corrected values for specific
paths (e.g., invoice.items[0].description).
This provides granular feedback and helps retrain models.

Request

Authorization
JWT Bearer
Add the parameter
Authorization
to Headers
Example:
Authorization: ********************
or
Path Params

Body Params application/jsonRequired

Examples

Responses

🟢200
application/json
Feedback successfully received. Thank you for your input!
Body

🟠400
🟠401
🟠403
🟠404
🔴500
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request PATCH 'https://test.your-api-server.com/v1/workspaces//documents//feedback' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data-raw '{
    "overallRating": 1,
    "comments": "string",
    "fieldCorrections": {
        "property1": "string",
        "property2": "string"
    }
}'
Response Response Example
200 - Example 1
{
    "feedbackId": "string",
    "documentId": "string",
    "status": "string",
    "message": "string",
    "timestamp": "2019-08-24T14:15:22.123Z"
}
Modified at 2026-01-06 20:52:46
Previous
Stream Document Content
Next
Get Document Feedback
Built with