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="123897-99SCvr3kSe3TqqQid3DyPXfo2Kq98MyhF6CaNPqoDeMhJ18Uopq19uddcznu6R"

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="123897-99SCvr3kSe3TqqQid3DyPXfo2Kq98MyhF6CaNPqoDeMhJ18Uopq19uddcznu6R"' \
  -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)