Create or update order feedback (frontend)
POST /v2/feedback/orders/{order_id}/rating
Create or update the feedback for an order.
info
Use this endpoint with a user access token for frontend implementations. For backend implementations, see Create or update order feedback (backend).
The following table describes the list of valid rating values:
Value | Description |
---|---|
STARS1 | Dissatisfied with the order. The lowest rating. |
STARS2 | Somewhat dissatisfied with the order. |
STARS3 | OK with the order. |
STARS4 | Satisfied with the order. |
STARS5 | Happy with the order. The highest rating. |
The following table describes the list of valid highlights:
Value | Description |
---|---|
QUALITY_ITEMS | The shopper selected quality items. |
SMART_BAGGING | The shopper proficiently bagged the items. |
EXTRA_EFFORT | The shopper made an extra effort with the order. |
HELPFUL_CHAT | The shopper provided helpful chat messages. |
GOOD_REPLACEMENTS | The shopper selected good replacement items. |
SMOOTH_DELIVERY | The shopper ensured a smooth delivery of the order. |
FAST_PICKUP | The pickup process was fast. |
CLEAR_PICKUP_INSTRUCTIONS | The pickup instructions were clear. |
EASY_PARKING | The pickup area enabled easy parking. |
SMOOTH_HANDOFF | The handoff of the pickup order was smooth. |
Security
Name | In | Description |
---|---|---|
Authorization | header | The Authorization header with the bearer token acquired during authentication. |
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
order_id | path | string | The ID of the order. |
Request
Field | Type | Required | Description |
---|---|---|---|
rating_value | string | The rating value. | |
highlights | Array(string) | The highlights. | |
thank_you_note | string | A thank you note. |
Request examples
- cURL
- Java
- Python
- Go
curl --request POST \
--url 'https://connect.instacart.com/v2/feedback/orders/{order_id}/rating' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"rating_value": "STARS1",
"highlights": [
"string"
],
"thank_you_note": "string"
}'
HttpResponse<String> response = Unirest.post("https://connect.instacart.com/v2/feedback/orders/{order_id}/rating")
.header("Accept", "application/json")
.header("Content-Type", "application/json")
.header("Authorization", "Bearer <token>")
.body("{\n \"rating_value\": \"STARS1\",\n \"highlights\": [\n \"string\"\n ],\n \"thank_you_note\": \"string\"\n}")
.asString();
import http.client
conn = http.client.HTTPSConnection("connect.instacart.com")
payload = "{\n \"rating_value\": \"STARS1\",\n \"highlights\": [\n \"string\"\n ],\n \"thank_you_note\": \"string\"\n}"
headers = {
'Accept': "application/json",
'Content-Type': "application/json",
'Authorization': "Bearer <token>"
}
conn.request("POST", "/v2/feedback/orders/{order_id}/rating", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
package main
import (
"fmt"
"strings"
"net/http"
"io/ioutil"
)
func main() {
url := "https://connect.instacart.com/v2/feedback/orders/{order_id}/rating"
payload := strings.NewReader("{\n \"rating_value\": \"STARS1\",\n \"highlights\": [\n \"string\"\n ],\n \"thank_you_note\": \"string\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Accept", "application/json")
req.Header.Add("Content-Type", "application/json")
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := ioutil.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
Response
Field | Type | Required | Description |
---|---|---|---|
success | boolean | Whether the request was successful. |
Response examples
200 Success
200
The request was successful
{
"success": true
}
4XX Errors
Error responses return either a single error or multiple errors.
HTTP Code | Cause | Error Message | Error Code | Error Meta |
---|---|---|---|---|
404 | Order not found | "Resource not found" | 4000 | Not applicable |