POST
/
partner
/
feedbacks
/
:id
/
respond
curl https://api.thanxsandbox.com/feedbacks/590485d6f0/response \
  -X POST \
  $AUTH_HEADERS \
  -d '{
    "feedback": {
      "response": "Merchant's written response to the customer's review."
    }
  }'
{
  "feedback": {
    "id": "590485d6f0",
    "user_id": "weorifsdf",
    "merchant_id": "9a1f0772c",
    "location_id": "fgr2349gh",
    "state": "reviewed",
    "purchased_at": "2020-01-05T20:00:00Z",
    "viewed_at": "2020-01-06T20:00:00Z",
    "rated_at": "2020-01-06T20:02:00Z",
    "reviewed_at": "2020-01-06T20:03:00Z",
    "responded_at": null,
    "expires_at": "2020-01-07T20:00:00Z",
    "rating": 10,
    "review": "Customer's written review for their latest purchase.",
    "response": "Merchant's written response to the customer's review.",
    "purchase": {
      "id": "wourhfiwer",
      "purchased_at": "2020-01-01T20:00:00Z",
      "amount": 9.99,
      "order": {
        "id": "aepo3cme2p",
        "provider": "Toast"
      }
    }
  }
}

This endpoint allows a merchant or partner to programmatically respond to a customer’s feedback with a text-based response. This will trigger a message to the Thanx customer on behalf of the merchant. Only a single merchant response is allowed for a given feedback record.

Scope required: feedbacks.write

Parameters

id
string
required

Feedback ID

Parameters

response
string
required

Merchant’s response to the user’s feedback

Response

id
string

The ID of the feedback record

user_id
string

The user ID

merchant_id
string

The merchant ID

location_id
string

Location ID

state
enum

The state of the feedback record

  • unviewed - User has an opportunity to leave feedback for a purchase they have made, but has not been displayed the feedback prompt yet.
  • viewed - User viewed the opportunity to leave feedback, but they have not left a NPS or review yet.
  • expired - User did not leave a NPS or review before the feedback expired
  • rated - User has left a net promoter score
  • reviewed - User has left a review
  • responded - Merchant has responded to the user's feedback
expires_at
string

The feedback expiration time in ISO8601-format. Users cannot submit a rating or review for the associated purchase after this time has elapsed.

purchased_at
string

The ISO8601 timestamp of the purchase the feedback was associated with.

viewed_at
string

The ISO8601 timestamp the feedback was viewed by the consumer

rated_at
string

The ISO8601 timestamp the feedback was rated by the consumer

reviewed_at
string

The ISO8601 timestamp the feedback was reviewed by the consumer

responded_at
string

The ISO8601 timestamp the feedback was responded to by the merchant

rating
integer

NPS score (null or 1-10)

review
string

Customer feedback

response
string

Merchant response

purchase
hash

The associated purchase record

curl https://api.thanxsandbox.com/feedbacks/590485d6f0/response \
  -X POST \
  $AUTH_HEADERS \
  -d '{
    "feedback": {
      "response": "Merchant's written response to the customer's review."
    }
  }'
{
  "feedback": {
    "id": "590485d6f0",
    "user_id": "weorifsdf",
    "merchant_id": "9a1f0772c",
    "location_id": "fgr2349gh",
    "state": "reviewed",
    "purchased_at": "2020-01-05T20:00:00Z",
    "viewed_at": "2020-01-06T20:00:00Z",
    "rated_at": "2020-01-06T20:02:00Z",
    "reviewed_at": "2020-01-06T20:03:00Z",
    "responded_at": null,
    "expires_at": "2020-01-07T20:00:00Z",
    "rating": 10,
    "review": "Customer's written review for their latest purchase.",
    "response": "Merchant's written response to the customer's review.",
    "purchase": {
      "id": "wourhfiwer",
      "purchased_at": "2020-01-01T20:00:00Z",
      "amount": 9.99,
      "order": {
        "id": "aepo3cme2p",
        "provider": "Toast"
      }
    }
  }
}