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

# Update Feedback

> This endpoint will update a user's feedback record.

<Note>
  Please review proper request headers [here](/consumer/usage/headers).
</Note>

### Parameters

<ParamField path="id" type="string" required>
  The feedback id
</ParamField>

### Parameters

<ParamField body="rating" type="integer" required>
  NPS Score, 1-10
</ParamField>

<ParamField body="review" type="string">
  Customer feedback
</ParamField>

### Response

<Snippet file="entities/feedback.mdx" />

<RequestExample>
  ```bash theme={null}
  curl https://api.thanxsandbox.com/feedbacks/590485d6f0 \
    -X PATCH \
    -H "Content-Type: application/json"  \
    -H "Accept-Version: v4.0" \
    -H "Accept: application/json" \
    -H "Authorization: Bearer ${token}" \
    -H "X-ClientId: ${client_id}" 
    -d '{
      "feedback": {
        "rating": 10,
        "review": "Lorem ipsum dolor sit amet"
      }
    }'
  ```
</RequestExample>

<ResponseExample>
  ```json theme={null}
  {
    "feedback": {
      "id": "590485d6f0",
      "user_id": "weorifsdf",
      "merchant_id": "9a1f0772c",
      "location_id": "fgr2349gh",
      "state": "reviewed",
      "expires_at": "2020-01-07T20:00:00Z",
      "rating": 10,
      "review": "Lorem ipsum dolor sit amet",
      "response": null,
      "purchase": {
        "id": "wourhfiwer",
        "purchased_at": "2020-01-01T20:00:00Z",
        "amount": 9.99,
        "order": {
          "id": "aepo3cme2p",
          "provider": "Toast"
        }
      }
    }
  }
  ```
</ResponseExample>
