Submit feedback for a completed flight search
curl --request POST \
--url https://api.paywithlocus.com/api/wrapped/credits/locus-travel/flight-search/{runId}/feedback \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"helpful": true,
"selectedItineraryId": "<string>",
"note": "<string>"
}
'import requests
url = "https://api.paywithlocus.com/api/wrapped/credits/locus-travel/flight-search/{runId}/feedback"
payload = {
"helpful": True,
"selectedItineraryId": "<string>",
"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({helpful: true, selectedItineraryId: '<string>', note: '<string>'})
};
fetch('https://api.paywithlocus.com/api/wrapped/credits/locus-travel/flight-search/{runId}/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.paywithlocus.com/api/wrapped/credits/locus-travel/flight-search/{runId}/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([
'helpful' => true,
'selectedItineraryId' => '<string>',
'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://api.paywithlocus.com/api/wrapped/credits/locus-travel/flight-search/{runId}/feedback"
payload := strings.NewReader("{\n \"helpful\": true,\n \"selectedItineraryId\": \"<string>\",\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://api.paywithlocus.com/api/wrapped/credits/locus-travel/flight-search/{runId}/feedback")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"helpful\": true,\n \"selectedItineraryId\": \"<string>\",\n \"note\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.paywithlocus.com/api/wrapped/credits/locus-travel/flight-search/{runId}/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 \"helpful\": true,\n \"selectedItineraryId\": \"<string>\",\n \"note\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"runId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"helpful": true,
"selectedItineraryId": "<string>",
"reason": "price",
"updatedAt": "2023-11-07T05:31:56Z"
}
}Travel routing
Submit feedback for a completed flight search
Creates or replaces feedback for a completed run owned by the authenticated account. selectedItineraryId, when supplied, must belong to that run. End-user and Agent Connection access remains scoped exactly as it was for execution.
POST
/
wrapped
/
credits
/
locus-travel
/
flight-search
/
{runId}
/
feedback
Submit feedback for a completed flight search
curl --request POST \
--url https://api.paywithlocus.com/api/wrapped/credits/locus-travel/flight-search/{runId}/feedback \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"helpful": true,
"selectedItineraryId": "<string>",
"note": "<string>"
}
'import requests
url = "https://api.paywithlocus.com/api/wrapped/credits/locus-travel/flight-search/{runId}/feedback"
payload = {
"helpful": True,
"selectedItineraryId": "<string>",
"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({helpful: true, selectedItineraryId: '<string>', note: '<string>'})
};
fetch('https://api.paywithlocus.com/api/wrapped/credits/locus-travel/flight-search/{runId}/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.paywithlocus.com/api/wrapped/credits/locus-travel/flight-search/{runId}/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([
'helpful' => true,
'selectedItineraryId' => '<string>',
'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://api.paywithlocus.com/api/wrapped/credits/locus-travel/flight-search/{runId}/feedback"
payload := strings.NewReader("{\n \"helpful\": true,\n \"selectedItineraryId\": \"<string>\",\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://api.paywithlocus.com/api/wrapped/credits/locus-travel/flight-search/{runId}/feedback")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"helpful\": true,\n \"selectedItineraryId\": \"<string>\",\n \"note\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.paywithlocus.com/api/wrapped/credits/locus-travel/flight-search/{runId}/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 \"helpful\": true,\n \"selectedItineraryId\": \"<string>\",\n \"note\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"runId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"helpful": true,
"selectedItineraryId": "<string>",
"reason": "price",
"updatedAt": "2023-11-07T05:31:56Z"
}
}Authorizations
secretKeyendUserTokenagentConnection
Tenant secret key (lcr_…). Server-side only.
Headers
Required only when the end-user JWT carries sid. Send the original high-entropy session value; sid is its SHA-256 fingerprint. Ignored for secret-key authentication.
Required string length:
16 - 128Pattern:
^[A-Za-z0-9][A-Za-z0-9._:-]{15,127}$Secret keys must repeat the run's end-user identity, when any. Case-sensitive immutable ID in the tenant namespace. Prefer an identity-provider subject, not an email address.
Required string length:
1 - 200Pattern:
^[A-Za-z0-9][A-Za-z0-9._:@/-]{0,199}$Path Parameters
Body
application/json