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

# Submit Feedback

> Report an incorrect enrichment result so we can improve matching accuracy.

Use this endpoint to flag a transaction enrichment that returned wrong data — wrong merchant name, wrong category, or a misidentified merchant entirely.

All submissions are reviewed. We update the underlying cache and LLM prompts based on real-world reports.

## Request Body

<ParamField body="raw_input" type="string" required>
  The raw transaction string you passed to `/v1/enrich`.
</ParamField>

<ParamField body="returned_name" type="string">
  The merchant name ParseTx returned (for context — helps us locate the cached entry).
</ParamField>

<ParamField body="returned_category" type="string">
  The category ParseTx returned.
</ParamField>

<ParamField body="correct_name" type="string">
  What the merchant name should be.
</ParamField>

<ParamField body="correct_category" type="string">
  What the category should be.
</ParamField>

<ParamField body="notes" type="string">
  Any additional context. Max 1,000 characters.
</ParamField>

## Response

Returns `201 Created` on success.

<ResponseField name="id" type="string">
  UUID of the feedback record.
</ResponseField>

<ResponseField name="message" type="string">
  Confirmation message.
</ResponseField>

<RequestExample>
  ```bash cURL theme={null}
  curl -X POST https://api.parsetx.dev/v1/feedback \
    -H "X-API-Key: ptx_live_..." \
    -H "Content-Type: application/json" \
    -d '{
      "raw_input": "AMZN MKTP US*1A2B3C",
      "returned_name": "Amazon Fresh",
      "returned_category": "Grocery",
      "correct_name": "Amazon Marketplace",
      "correct_category": "Shopping",
      "notes": "This was a standard marketplace purchase, not Amazon Fresh."
    }'
  ```

  ```python Python theme={null}
  import requests

  response = requests.post(
      "https://api.parsetx.dev/v1/feedback",
      headers={"X-API-Key": "ptx_live_..."},
      json={
          "raw_input": "AMZN MKTP US*1A2B3C",
          "returned_name": "Amazon Fresh",
          "correct_name": "Amazon Marketplace",
          "correct_category": "Shopping",
      }
  )
  print(response.json())
  ```
</RequestExample>

<ResponseExample>
  ```json 201 Created theme={null}
  {
    "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    "message": "Thank you for your feedback. We review all submissions."
  }
  ```

  ```json 400 Validation Error theme={null}
  {
    "error": "Validation failed",
    "details": {
      "raw_input": ["String must contain at least 1 character(s)"]
    }
  }
  ```
</ResponseExample>
