Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Next »

As of Versionproduct version 2021 Autumn | component version 0.3
Request MethodPOST
Response FormatHTTP status code
Description

Sends a feedback to the AI engine informing about the decision for a suggested object type.


After classification is done and predicted document types are shown to the user, the user decides which one is the actual type and store it. It is important to send the chosen document type back to the AI engine in order to improve future predictions by calling this feedback endpoint.

  • predictionId - id returned back by the AI engine when document classification is requested
  • objectTypeId - objectTypeId user chose for the document

Meaning of HTTP status codes:

HTTP Status CodeDescription
200 OKOK
400 Bad RequestRequest is bad.
404 Not FoundSpecified predictionId was not found.
500 Internal Server ErrorError while storing feedback.

If an error is thrown, it will be a JSON structure returned as response body.

Request Header

Content-Type: application/json

X-ID-TENANT-NAME: tenant_name

Request Example
/predict/classification/feedback
request body
{
   "properties": {
      "predictionId": {
          "value":473       
      },
      "feedbackData":{
          "objectTypeId": {
              "value": "Rechnung"          
          }
      }
   }
}

Result Example

(1) Successful

200 OK

(2) Not succelful:

400 Not Found

response body
{
    "statusCode": 400,
    "timestamp": "2020-12-25T09:42:33.386+00:00",
    "message": "JSON parse error: Unrecognized field \"objectTyyyyypeId\" (class com.os.ai.predict.domain.classification.ClassificationFeedbackRequestData), not marked as ignorable..."
}
  • No labels