curl --request POST \
--url https://core.locusmedical.fr/v2/feedback \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"trace_id": "<string>",
"vote": 0,
"note": "<string>"
}
'import requests
url = "https://core.locusmedical.fr/v2/feedback"
payload = {
"trace_id": "<string>",
"vote": 0,
"note": "<string>"
}
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({trace_id: '<string>', vote: 0, note: '<string>'})
};
fetch('https://core.locusmedical.fr/v2/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://core.locusmedical.fr/v2/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([
'trace_id' => '<string>',
'vote' => 0,
'note' => '<string>'
]),
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://core.locusmedical.fr/v2/feedback"
payload := strings.NewReader("{\n \"trace_id\": \"<string>\",\n \"vote\": 0,\n \"note\": \"<string>\"\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://core.locusmedical.fr/v2/feedback")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"trace_id\": \"<string>\",\n \"vote\": 0,\n \"note\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://core.locusmedical.fr/v2/feedback")
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 \"trace_id\": \"<string>\",\n \"vote\": 0,\n \"note\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"trace_id": "<string>",
"vote": 123,
"ok": true
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Poser un retour utilisateur sur une réponse tracée
Attache un pouce levé/baissé à une réponse déjà servie, via le trace_id qu’elle portait.
Idempotent : re-poster écrase le vote précédent. C’est ce qui permet à l’utilisateur de changer d’avis, et à un client de re-tenter un envoi perdu sans compter deux fois.
404 quand le trace_id est inconnu — typiquement une réponse servie alors que la journalisation était coupée, ou plus vieille que la rétention. 503 quand la journalisation est désactivée sur cette instance : il n’y a alors aucune trace à noter, et le dire est plus utile que d’accepter un vote qui n’ira nulle part.
curl --request POST \
--url https://core.locusmedical.fr/v2/feedback \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"trace_id": "<string>",
"vote": 0,
"note": "<string>"
}
'import requests
url = "https://core.locusmedical.fr/v2/feedback"
payload = {
"trace_id": "<string>",
"vote": 0,
"note": "<string>"
}
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({trace_id: '<string>', vote: 0, note: '<string>'})
};
fetch('https://core.locusmedical.fr/v2/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://core.locusmedical.fr/v2/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([
'trace_id' => '<string>',
'vote' => 0,
'note' => '<string>'
]),
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://core.locusmedical.fr/v2/feedback"
payload := strings.NewReader("{\n \"trace_id\": \"<string>\",\n \"vote\": 0,\n \"note\": \"<string>\"\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://core.locusmedical.fr/v2/feedback")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"trace_id\": \"<string>\",\n \"vote\": 0,\n \"note\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://core.locusmedical.fr/v2/feedback")
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 \"trace_id\": \"<string>\",\n \"vote\": 0,\n \"note\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"trace_id": "<string>",
"vote": 123,
"ok": true
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Authorizations
Locus API key — paste the raw lsk_… value (no 'Bearer ' prefix) — or a B2B session token minted by POST /v2/session-token.
Body
L'identifiant rendu par /v2/retrieve (champ trace_id de la payload, ou de la ligne done du flux).
1 pouce levé · -1 pouce baissé · 0 vote retiré.
0 existe pour que se dédire soit un geste écrit comme un autre : sans lui, retirer un pouce obligerait à supprimer la ligne, et on perdrait la réponse tracée en même temps que l'avis.
-1 <= x <= 1Motif libre, facultatif — surtout utile après un pouce baissé.
2000