Feedback
curl --request POST \
--url https://api.compose.market/v1/feedback \
--header 'Content-Type: application/json' \
--data '
{
"targetType": "<string>",
"targetId": "<string>",
"rating": 123,
"comment": "<string>"
}
'import requests
url = "https://api.compose.market/v1/feedback"
payload = {
"targetType": "<string>",
"targetId": "<string>",
"rating": 123,
"comment": "<string>"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({targetType: '<string>', targetId: '<string>', rating: 123, comment: '<string>'})
};
fetch('https://api.compose.market/v1/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.compose.market/v1/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([
'targetType' => '<string>',
'targetId' => '<string>',
'rating' => 123,
'comment' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"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.compose.market/v1/feedback"
payload := strings.NewReader("{\n \"targetType\": \"<string>\",\n \"targetId\": \"<string>\",\n \"rating\": 123,\n \"comment\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
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.compose.market/v1/feedback")
.header("Content-Type", "application/json")
.body("{\n \"targetType\": \"<string>\",\n \"targetId\": \"<string>\",\n \"rating\": 123,\n \"comment\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.compose.market/v1/feedback")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"targetType\": \"<string>\",\n \"targetId\": \"<string>\",\n \"rating\": 123,\n \"comment\": \"<string>\"\n}"
response = http.request(request)
puts response.read_bodySystem
Feedback
Submit, list, and summarize feedback for Compose targets.
POST
/
v1
/
feedback
Feedback
curl --request POST \
--url https://api.compose.market/v1/feedback \
--header 'Content-Type: application/json' \
--data '
{
"targetType": "<string>",
"targetId": "<string>",
"rating": 123,
"comment": "<string>"
}
'import requests
url = "https://api.compose.market/v1/feedback"
payload = {
"targetType": "<string>",
"targetId": "<string>",
"rating": 123,
"comment": "<string>"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({targetType: '<string>', targetId: '<string>', rating: 123, comment: '<string>'})
};
fetch('https://api.compose.market/v1/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.compose.market/v1/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([
'targetType' => '<string>',
'targetId' => '<string>',
'rating' => 123,
'comment' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"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.compose.market/v1/feedback"
payload := strings.NewReader("{\n \"targetType\": \"<string>\",\n \"targetId\": \"<string>\",\n \"rating\": 123,\n \"comment\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
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.compose.market/v1/feedback")
.header("Content-Type", "application/json")
.body("{\n \"targetType\": \"<string>\",\n \"targetId\": \"<string>\",\n \"rating\": 123,\n \"comment\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.compose.market/v1/feedback")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"targetType\": \"<string>\",\n \"targetId\": \"<string>\",\n \"rating\": 123,\n \"comment\": \"<string>\"\n}"
response = http.request(request)
puts response.read_bodyFeedback can be anonymous, tied to a wallet session header, or tied to a Compose Key when the bearer token is valid.
Routes
| Method | Path | Description |
|---|---|---|
POST | /v1/feedback | Submit feedback. |
GET | /v1/feedback | List feedback for one target. |
GET | /v1/feedback/summary | Return aggregate feedback for one target. |
Request body
string
required
Feedback target type. Must match one of the target types accepted by the API validator.
string
required
Target identifier.
number
Numeric rating when the selected target accepts ratings.
string
Free-form feedback text.
Query parameters
string
required
Required by
GET /v1/feedback and GET /v1/feedback/summary.string
required
Required by
GET /v1/feedback and GET /v1/feedback/summary.number
Maximum feedback records to return. Clamped to
1..100; default is 50.number
Maximum recent records included in the summary. Clamped to
1..100; default is 10.Headers
string
Optional
Bearer compose-...; valid keys attach the reviewer wallet to the feedback.string
Optional wallet address fallback when no Compose Key is present.
number
Optional chain ID paired with
x-session-user-address.