Submit Feedback
curl --request POST \
--url https://api.centralcart.io/v1/webstore/order/{orderId}/feedback \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'x-store-domain: <x-store-domain>' \
--data '
{
"rating": 5,
"message": "Entrega instantânea, recomendo."
}
'import requests
url = "https://api.centralcart.io/v1/webstore/order/{orderId}/feedback"
payload = {
"rating": 5,
"message": "Entrega instantânea, recomendo."
}
headers = {
"x-store-domain": "<x-store-domain>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'x-store-domain': '<x-store-domain>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({rating: 5, message: 'Entrega instantânea, recomendo.'})
};
fetch('https://api.centralcart.io/v1/webstore/order/{orderId}/feedback', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.centralcart.io/v1/webstore/order/{orderId}/feedback",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'rating' => 5,
'message' => 'Entrega instantânea, recomendo.'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"x-store-domain: <x-store-domain>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.centralcart.io/v1/webstore/order/{orderId}/feedback"
payload := strings.NewReader("{\n \"rating\": 5,\n \"message\": \"Entrega instantânea, recomendo.\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-store-domain", "<x-store-domain>")
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.centralcart.io/v1/webstore/order/{orderId}/feedback")
.header("x-store-domain", "<x-store-domain>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"rating\": 5,\n \"message\": \"Entrega instantânea, recomendo.\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.centralcart.io/v1/webstore/order/{orderId}/feedback")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-store-domain"] = '<x-store-domain>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"rating\": 5,\n \"message\": \"Entrega instantânea, recomendo.\"\n}"
response = http.request(request)
puts response.read_body{
"id": 12,
"store_id": 1,
"order_id": 5671784,
"rating": 5,
"message": "Entrega instantânea, recomendo.",
"is_public": true,
"created_at": "2024-03-04T10:12:00.000-03:00"
}{
"errors": [
{
"message": "Faça login para avaliar este pedido."
}
]
}{
"errors": [
{
"message": "Pedido não encontrado."
}
]
}{
"errors": [
{
"message": "Este pedido já foi avaliado.",
"code": "FEEDBACK_ALREADY_EXISTS"
}
]
}Conta do cliente
Submit Feedback
Avalia um pedido aprovado.
O comprador chega por dois caminhos: a sessão (
Authorization: Bearer), quando ele está logado, ou o parâmetro ?t= do link do pedido, quando ele veio direto do e-mail sem fazer login. Um pedido só pode ser avaliado uma vez. Se a loja tiver publicação automática ligada, a avaliação já nasce pública; caso contrário, fica aguardando moderação do lojista.POST
/
webstore
/
order
/
{orderId}
/
feedback
Submit Feedback
curl --request POST \
--url https://api.centralcart.io/v1/webstore/order/{orderId}/feedback \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'x-store-domain: <x-store-domain>' \
--data '
{
"rating": 5,
"message": "Entrega instantânea, recomendo."
}
'import requests
url = "https://api.centralcart.io/v1/webstore/order/{orderId}/feedback"
payload = {
"rating": 5,
"message": "Entrega instantânea, recomendo."
}
headers = {
"x-store-domain": "<x-store-domain>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'x-store-domain': '<x-store-domain>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({rating: 5, message: 'Entrega instantânea, recomendo.'})
};
fetch('https://api.centralcart.io/v1/webstore/order/{orderId}/feedback', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.centralcart.io/v1/webstore/order/{orderId}/feedback",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'rating' => 5,
'message' => 'Entrega instantânea, recomendo.'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"x-store-domain: <x-store-domain>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.centralcart.io/v1/webstore/order/{orderId}/feedback"
payload := strings.NewReader("{\n \"rating\": 5,\n \"message\": \"Entrega instantânea, recomendo.\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-store-domain", "<x-store-domain>")
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.centralcart.io/v1/webstore/order/{orderId}/feedback")
.header("x-store-domain", "<x-store-domain>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"rating\": 5,\n \"message\": \"Entrega instantânea, recomendo.\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.centralcart.io/v1/webstore/order/{orderId}/feedback")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-store-domain"] = '<x-store-domain>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"rating\": 5,\n \"message\": \"Entrega instantânea, recomendo.\"\n}"
response = http.request(request)
puts response.read_body{
"id": 12,
"store_id": 1,
"order_id": 5671784,
"rating": 5,
"message": "Entrega instantânea, recomendo.",
"is_public": true,
"created_at": "2024-03-04T10:12:00.000-03:00"
}{
"errors": [
{
"message": "Faça login para avaliar este pedido."
}
]
}{
"errors": [
{
"message": "Pedido não encontrado."
}
]
}{
"errors": [
{
"message": "Este pedido já foi avaliado.",
"code": "FEEDBACK_ALREADY_EXISTS"
}
]
}Autorizações
access_token do comprador, devolvido por POST /webstore/auth/verify.
Cabeçalhos
Domínio da sua loja (ex: sualoja.centralcart.ai)
Parâmetros de caminho
Identificador público do pedido.
Parâmetros de consulta
Token de acesso do pedido, o mesmo que aparece no link enviado ao comprador. Alternativa à sessão.
Corpo
application/json
⌘I