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

# Send classification feedback

> Tell the classifier when a suggestion was right or wrong.

Requires the `classify:read` scope. Feedback improves future suggestions for
your workspace.

<ParamField body="description" type="string" required>
  The product description that was classified (up to 2000 chars).
</ParamField>

<ParamField body="predicted_hs_code" type="string" required>
  The code the classifier suggested (2–13 chars; dots are stripped).
</ParamField>

<ParamField body="correct_hs_code" type="string">
  The code it should have been, if you know it.
</ParamField>

<ParamField body="feedback_type" type="string" default="negative">
  `positive` or `negative`.
</ParamField>

<ParamField body="reason_type" type="string">
  One of `wrong_code`, `wrong_chapter`, `close_but_wrong`,
  `material_mismatch`, `missing_context`, `other`.
</ParamField>

<ParamField body="reason" type="string">
  Free-text explanation (up to 2000 chars).
</ParamField>

<ParamField body="mode" type="string">
  The mode that produced the prediction.
</ParamField>

<ParamField body="destination_country" type="string">
  ISO alpha-2 destination the prediction was for.
</ParamField>

<RequestExample>
  ```bash cURL theme={null}
  curl -X POST https://{partner}.mytraddal.com/admin/api/v1/classify/feedback \
    -H 'Content-Type: application/json' \
    -H 'Authorization: Bearer {access_token}' \
    -d '{
      "description": "Nylon hiking backpack 40L",
      "predicted_hs_code": "4202.92.3131",
      "correct_hs_code": "4202.92.3120",
      "feedback_type": "negative",
      "reason_type": "close_but_wrong",
      "destination_country": "US"
    }'
  ```
</RequestExample>

<ResponseExample>
  ```json 201 theme={null}
  {
    "success": true,
    "message": "Feedback recorded",
    "feedback_id": 512,
    "feedback_type": "negative",
    "created_at": "2026-07-30T10:15:02.000Z"
  }
  ```
</ResponseExample>
