Avaliação de pedido
curl --request POST \
--url https://public-api.repediu.com.br/sale-ratings \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
[
{
"customerId": "242150",
"saleId": "1",
"stars": 5,
"review": "Ótimo atendimento, refeição muito boa!",
"ratingDate": "2025-09-26T11:39:51Z",
"externalId": "126"
}
]
'import requests
url = "https://public-api.repediu.com.br/sale-ratings"
payload = [
{
"customerId": "242150",
"saleId": "1",
"stars": 5,
"review": "Ótimo atendimento, refeição muito boa!",
"ratingDate": "2025-09-26T11:39:51Z",
"externalId": "126"
}
]
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify([
{
customerId: '242150',
saleId: '1',
stars: 5,
review: 'Ótimo atendimento, refeição muito boa!',
ratingDate: '2025-09-26T11:39:51Z',
externalId: '126'
}
])
};
fetch('https://public-api.repediu.com.br/sale-ratings', 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://public-api.repediu.com.br/sale-ratings",
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([
[
'customerId' => '242150',
'saleId' => '1',
'stars' => 5,
'review' => 'Ótimo atendimento, refeição muito boa!',
'ratingDate' => '2025-09-26T11:39:51Z',
'externalId' => '126'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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://public-api.repediu.com.br/sale-ratings"
payload := strings.NewReader("[\n {\n \"customerId\": \"242150\",\n \"saleId\": \"1\",\n \"stars\": 5,\n \"review\": \"Ótimo atendimento, refeição muito boa!\",\n \"ratingDate\": \"2025-09-26T11:39:51Z\",\n \"externalId\": \"126\"\n }\n]")
req, _ := http.NewRequest("POST", url, payload)
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://public-api.repediu.com.br/sale-ratings")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("[\n {\n \"customerId\": \"242150\",\n \"saleId\": \"1\",\n \"stars\": 5,\n \"review\": \"Ótimo atendimento, refeição muito boa!\",\n \"ratingDate\": \"2025-09-26T11:39:51Z\",\n \"externalId\": \"126\"\n }\n]")
.asString();require 'uri'
require 'net/http'
url = URI("https://public-api.repediu.com.br/sale-ratings")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "[\n {\n \"customerId\": \"242150\",\n \"saleId\": \"1\",\n \"stars\": 5,\n \"review\": \"Ótimo atendimento, refeição muito boa!\",\n \"ratingDate\": \"2025-09-26T11:39:51Z\",\n \"externalId\": \"126\"\n }\n]"
response = http.request(request)
puts response.read_body{
"result": "Sales ratings received. Batch id: e0f104ab-0c47-4812-806c-53142984b6a4",
"error": null,
"timeGenerated": "2025-09-26T18:36:03.0791284Z",
"success": true
}{
"result": null,
"error": {
"message": "Only 500 sale ratings per requisition are allowed",
"notifications": null,
"errorDetails": null
},
"timeGenerated": "2025-09-26T18:36:03.0791284Z",
"success": false
}"To many requests, try again in 1 minutes."Avaliação de pedido
Envie a nota da pesquisa de satisfação do cliente para até 500 pedidos por requisição
POST
/
sale-ratings
Avaliação de pedido
curl --request POST \
--url https://public-api.repediu.com.br/sale-ratings \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
[
{
"customerId": "242150",
"saleId": "1",
"stars": 5,
"review": "Ótimo atendimento, refeição muito boa!",
"ratingDate": "2025-09-26T11:39:51Z",
"externalId": "126"
}
]
'import requests
url = "https://public-api.repediu.com.br/sale-ratings"
payload = [
{
"customerId": "242150",
"saleId": "1",
"stars": 5,
"review": "Ótimo atendimento, refeição muito boa!",
"ratingDate": "2025-09-26T11:39:51Z",
"externalId": "126"
}
]
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify([
{
customerId: '242150',
saleId: '1',
stars: 5,
review: 'Ótimo atendimento, refeição muito boa!',
ratingDate: '2025-09-26T11:39:51Z',
externalId: '126'
}
])
};
fetch('https://public-api.repediu.com.br/sale-ratings', 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://public-api.repediu.com.br/sale-ratings",
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([
[
'customerId' => '242150',
'saleId' => '1',
'stars' => 5,
'review' => 'Ótimo atendimento, refeição muito boa!',
'ratingDate' => '2025-09-26T11:39:51Z',
'externalId' => '126'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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://public-api.repediu.com.br/sale-ratings"
payload := strings.NewReader("[\n {\n \"customerId\": \"242150\",\n \"saleId\": \"1\",\n \"stars\": 5,\n \"review\": \"Ótimo atendimento, refeição muito boa!\",\n \"ratingDate\": \"2025-09-26T11:39:51Z\",\n \"externalId\": \"126\"\n }\n]")
req, _ := http.NewRequest("POST", url, payload)
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://public-api.repediu.com.br/sale-ratings")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("[\n {\n \"customerId\": \"242150\",\n \"saleId\": \"1\",\n \"stars\": 5,\n \"review\": \"Ótimo atendimento, refeição muito boa!\",\n \"ratingDate\": \"2025-09-26T11:39:51Z\",\n \"externalId\": \"126\"\n }\n]")
.asString();require 'uri'
require 'net/http'
url = URI("https://public-api.repediu.com.br/sale-ratings")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "[\n {\n \"customerId\": \"242150\",\n \"saleId\": \"1\",\n \"stars\": 5,\n \"review\": \"Ótimo atendimento, refeição muito boa!\",\n \"ratingDate\": \"2025-09-26T11:39:51Z\",\n \"externalId\": \"126\"\n }\n]"
response = http.request(request)
puts response.read_body{
"result": "Sales ratings received. Batch id: e0f104ab-0c47-4812-806c-53142984b6a4",
"error": null,
"timeGenerated": "2025-09-26T18:36:03.0791284Z",
"success": true
}{
"result": null,
"error": {
"message": "Only 500 sale ratings per requisition are allowed",
"notifications": null,
"errorDetails": null
},
"timeGenerated": "2025-09-26T18:36:03.0791284Z",
"success": false
}"To many requests, try again in 1 minutes."Envia avaliações de pedidos (nota, comentário) para a Repediu. Suporta até 500 avaliações por requisição e é sempre processado de forma assíncrona — use Status avaliação pedido com o
Batch id retornado para acompanhar o processamento.
Envie ao menos um de
saleId ou customerId — os dois ausentes são rejeitados. stars deve ser um inteiro entre 1 e 5. externalId é obrigatório e não pode ser vazio/espaços em branco.ratingDate aceita hora UTC (sufixo Z) ou hora local ingênua (sem offset, ex.: 2025-09-01T16:04:00). Um offset numérico explícito (ex.: -03:00) é rejeitado com uma mensagem específica — normalize a data antes de enviar.Erros
Esta rota tem dois formatos de erro diferentes:| HTTP | Formato | Quando acontece |
|---|---|---|
400 | Envelope padrão (error.message) | Lista vazia ou mais de 500 itens |
400 | ModelState bruto do ASP.NET (ex.: {"[0].Stars": ["Stars must be between 1 and 5"]}) | Falha de validação por item: stars fora de 1–5, nem saleId nem customerId, ratingDate com offset, externalId vazio |
Status avaliação pedido
Acompanhe o processamento do lote enviado aqui.
Autorizações
Token emitido por POST /authentication/users/accessToken. Envie no header Authorization como Bearer <token>. Válido por 6 horas.
Corpo
application/json
Maximum array length:
500Intervalo obrigatório:
1 <= x <= 5saleId e/ou customerId — ao menos um dos dois é obrigatório.
Envie hora UTC (sufixo Z) ou hora local ingênua (sem offset). Offsets numéricos explícitos (ex.: -03:00) são rejeitados.
⌘I

