Orders .: Create Feedback

API Reference / v15

Create Feedback

This endpoint creates feedback for an order. To create feedback for an order, you must have a user access token with the create_orders or read_qr_code permission.

Request Endpoint

POST /v15/orders/:uuid/feedback


Authorization Required – User token in Header

Authorization: token user="1123-15d2aeedc9f4e0e7094a9d283868f8fbe873cb85ceaa0c511727245aec8c9e"

Request Body

{
  "feedback": {
    "comment": "The service was quick and the restaurant was spotless!",
    "question_text": "How was your experience at our restaurant?",
    "rating": 4
  }
}

cURL Example

curl https://sandbox.thelevelup.com/v15/orders/7a223f5083d001322c2a5a56e9bb8aab/feedback \
  -H Accept:application/json \
  -H Content-Type:application/json \
  -H 'Authorization:token user="1123-15d2aeedc9f4e0e7094a9d283868f8fbe873cb85ceaa0c511727245aec8c9e"' \
  -d '{
    "feedback": {
      "comment": "The service was quick and the restaurant was spotless!",
      "question_text": "How was your experience at our restaurant?",
      "rating": 4
    }
  }'

Request Parameters

Parameters Type Required Description
comment String No The user’s comment in response to the prompt.
question_text String Yes The question that the user was asked to consider for the rating and comment.
rating Integer Yes The rating that the user provided (must be 1 - 5).
uuid String Yes The UUID of the order.

Example Response Body

HTTP/1.1 200 OK

{
  "feedback": {
    "id": 111
  }
}

Response Parameters

Param Type Description
id Integer The ID of the feedback created.

Error Responses

HTTP/1.1 error 404 Not Found - Order not found.

(No response body)