curl --request POST \
--url https://apiv2.gomarketbox.com/v1/projects/{projectId}/bookings/{bookingId}/reviews \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"direction": "CLIENT_TO_SUPPLIER",
"ratingStars": 5,
"reviewText": "Turned up on time and was a pleasure to work with."
}
'import requests
url = "https://apiv2.gomarketbox.com/v1/projects/{projectId}/bookings/{bookingId}/reviews"
payload = {
"direction": "CLIENT_TO_SUPPLIER",
"ratingStars": 5,
"reviewText": "Turned up on time and was a pleasure to work with."
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
direction: 'CLIENT_TO_SUPPLIER',
ratingStars: 5,
reviewText: 'Turned up on time and was a pleasure to work with.'
})
};
fetch('https://apiv2.gomarketbox.com/v1/projects/{projectId}/bookings/{bookingId}/reviews', 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://apiv2.gomarketbox.com/v1/projects/{projectId}/bookings/{bookingId}/reviews",
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([
'direction' => 'CLIENT_TO_SUPPLIER',
'ratingStars' => 5,
'reviewText' => 'Turned up on time and was a pleasure to work with.'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>"
],
]);
$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://apiv2.gomarketbox.com/v1/projects/{projectId}/bookings/{bookingId}/reviews"
payload := strings.NewReader("{\n \"direction\": \"CLIENT_TO_SUPPLIER\",\n \"ratingStars\": 5,\n \"reviewText\": \"Turned up on time and was a pleasure to work with.\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<api-key>")
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://apiv2.gomarketbox.com/v1/projects/{projectId}/bookings/{bookingId}/reviews")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"direction\": \"CLIENT_TO_SUPPLIER\",\n \"ratingStars\": 5,\n \"reviewText\": \"Turned up on time and was a pleasure to work with.\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://apiv2.gomarketbox.com/v1/projects/{projectId}/bookings/{bookingId}/reviews")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"direction\": \"CLIENT_TO_SUPPLIER\",\n \"ratingStars\": 5,\n \"reviewText\": \"Turned up on time and was a pleasure to work with.\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"reviewId": "<string>",
"supplierId": "<string>",
"projectId": "<string>",
"ratingStars": 123,
"direction": "CLIENT_TO_SUPPLIER",
"subjectType": "SUPPLIER",
"subjectId": "<string>",
"createdAt": "<string>",
"clientId": "<string>",
"reviewText": "<string>",
"reviewerId": "<string>",
"bookingId": "<string>",
"supplierName": "<string>",
"clientName": "<string>"
}
}{
"code": "NOT_FOUND",
"message": "Booking not found",
"statusCode": 404,
"requestId": "a3f1c2de-9b64-4a2f-8f0e-5c9d1b7a2e10"
}{
"code": "NOT_FOUND",
"message": "Booking not found",
"statusCode": 404,
"requestId": "a3f1c2de-9b64-4a2f-8f0e-5c9d1b7a2e10"
}{
"code": "NOT_FOUND",
"message": "Booking not found",
"statusCode": 404,
"requestId": "a3f1c2de-9b64-4a2f-8f0e-5c9d1b7a2e10"
}{
"code": "NOT_FOUND",
"message": "Booking not found",
"statusCode": 404,
"requestId": "a3f1c2de-9b64-4a2f-8f0e-5c9d1b7a2e10"
}{
"code": "NOT_FOUND",
"message": "Booking not found",
"statusCode": 404,
"requestId": "a3f1c2de-9b64-4a2f-8f0e-5c9d1b7a2e10"
}{
"code": "NOT_FOUND",
"message": "Booking not found",
"statusCode": 404,
"requestId": "a3f1c2de-9b64-4a2f-8f0e-5c9d1b7a2e10"
}Review a booking, in either direction
Records one side of a booking rating the other, and folds the rating into the rated party’s running average in the same atomic write. Both parties are read off the booking in the URL — the body carries no ids at all, so a review can only ever be attributed to the supplier and client who were actually on that booking.
direction picks who is rating whom. CLIENT_TO_SUPPLIER is the client rating the supplier; SUPPLIER_TO_CLIENT is the supplier rating the client. The response tells you which party the review is about without re-deriving it: subjectType is SUPPLIER or CLIENT, and subjectId is that party’s id.
The booking does not have to be COMPLETED. Nothing in MarketBox moves a booking to COMPLETED automatically — the status is only ever set deliberately — so requiring it would make this endpoint unusable for most tenants. Any booking is reviewable except a CANCELLED one, which returns 422. A booking with no supplier assigned is a legal state, but there is no supplier to rate or to rate from, so it also returns 422.
At most one review per booking per direction, enforced by a uniqueness item written inside the same transaction rather than by a read beforehand — two simultaneous submits cannot both win. A second review in the same direction returns 409 REVIEW_ALREADY_EXISTS. Reviews posted through the older project-level POST /reviews route carry no such guard, so this endpoint also runs a best-effort index lookup first and will report 409 for one it can see; that lookup reads an eventually-consistent index, so treat it as a courtesy rather than the guarantee.
Treat a review as permanent — there is no update or delete route, and the average it moved stays moved.
The response carries best-effort display names (supplierName, clientName) resolved from the two profiles, so a hosted review page can render a name without a second call. A counterparty whose profile cannot be resolved keeps its bare id and the corresponding name is absent. No email address is returned for either party.
curl --request POST \
--url https://apiv2.gomarketbox.com/v1/projects/{projectId}/bookings/{bookingId}/reviews \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"direction": "CLIENT_TO_SUPPLIER",
"ratingStars": 5,
"reviewText": "Turned up on time and was a pleasure to work with."
}
'import requests
url = "https://apiv2.gomarketbox.com/v1/projects/{projectId}/bookings/{bookingId}/reviews"
payload = {
"direction": "CLIENT_TO_SUPPLIER",
"ratingStars": 5,
"reviewText": "Turned up on time and was a pleasure to work with."
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
direction: 'CLIENT_TO_SUPPLIER',
ratingStars: 5,
reviewText: 'Turned up on time and was a pleasure to work with.'
})
};
fetch('https://apiv2.gomarketbox.com/v1/projects/{projectId}/bookings/{bookingId}/reviews', 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://apiv2.gomarketbox.com/v1/projects/{projectId}/bookings/{bookingId}/reviews",
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([
'direction' => 'CLIENT_TO_SUPPLIER',
'ratingStars' => 5,
'reviewText' => 'Turned up on time and was a pleasure to work with.'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>"
],
]);
$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://apiv2.gomarketbox.com/v1/projects/{projectId}/bookings/{bookingId}/reviews"
payload := strings.NewReader("{\n \"direction\": \"CLIENT_TO_SUPPLIER\",\n \"ratingStars\": 5,\n \"reviewText\": \"Turned up on time and was a pleasure to work with.\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<api-key>")
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://apiv2.gomarketbox.com/v1/projects/{projectId}/bookings/{bookingId}/reviews")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"direction\": \"CLIENT_TO_SUPPLIER\",\n \"ratingStars\": 5,\n \"reviewText\": \"Turned up on time and was a pleasure to work with.\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://apiv2.gomarketbox.com/v1/projects/{projectId}/bookings/{bookingId}/reviews")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"direction\": \"CLIENT_TO_SUPPLIER\",\n \"ratingStars\": 5,\n \"reviewText\": \"Turned up on time and was a pleasure to work with.\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"reviewId": "<string>",
"supplierId": "<string>",
"projectId": "<string>",
"ratingStars": 123,
"direction": "CLIENT_TO_SUPPLIER",
"subjectType": "SUPPLIER",
"subjectId": "<string>",
"createdAt": "<string>",
"clientId": "<string>",
"reviewText": "<string>",
"reviewerId": "<string>",
"bookingId": "<string>",
"supplierName": "<string>",
"clientName": "<string>"
}
}{
"code": "NOT_FOUND",
"message": "Booking not found",
"statusCode": 404,
"requestId": "a3f1c2de-9b64-4a2f-8f0e-5c9d1b7a2e10"
}{
"code": "NOT_FOUND",
"message": "Booking not found",
"statusCode": 404,
"requestId": "a3f1c2de-9b64-4a2f-8f0e-5c9d1b7a2e10"
}{
"code": "NOT_FOUND",
"message": "Booking not found",
"statusCode": 404,
"requestId": "a3f1c2de-9b64-4a2f-8f0e-5c9d1b7a2e10"
}{
"code": "NOT_FOUND",
"message": "Booking not found",
"statusCode": 404,
"requestId": "a3f1c2de-9b64-4a2f-8f0e-5c9d1b7a2e10"
}{
"code": "NOT_FOUND",
"message": "Booking not found",
"statusCode": 404,
"requestId": "a3f1c2de-9b64-4a2f-8f0e-5c9d1b7a2e10"
}{
"code": "NOT_FOUND",
"message": "Booking not found",
"statusCode": 404,
"requestId": "a3f1c2de-9b64-4a2f-8f0e-5c9d1b7a2e10"
}Authorizations
API key minted in the MarketBox dashboard. Scope is restricted to the projects you select at creation time. Every route needs the key's standard API access (*) except POST /v1/projects/{projectId}/events, which needs events:write; a key without * is refused with 403 CAPABILITY_NOT_GRANTED.
Path Parameters
Body
Review data