curl --request POST \
--url https://apiv2.gomarketbox.com/v1/projects/{projectId}/bookings/{bookingId}/reports \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"reporterRole": "SUPPLIER",
"attended": true,
"reportType": "ATTENDANCE",
"note": "Arrived 10 minutes late but stayed for the full session."
}
'import requests
url = "https://apiv2.gomarketbox.com/v1/projects/{projectId}/bookings/{bookingId}/reports"
payload = {
"reporterRole": "SUPPLIER",
"attended": True,
"reportType": "ATTENDANCE",
"note": "Arrived 10 minutes late but stayed for the full session."
}
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({
reporterRole: 'SUPPLIER',
attended: true,
reportType: 'ATTENDANCE',
note: 'Arrived 10 minutes late but stayed for the full session.'
})
};
fetch('https://apiv2.gomarketbox.com/v1/projects/{projectId}/bookings/{bookingId}/reports', 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}/reports",
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([
'reporterRole' => 'SUPPLIER',
'attended' => true,
'reportType' => 'ATTENDANCE',
'note' => 'Arrived 10 minutes late but stayed for the full session.'
]),
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}/reports"
payload := strings.NewReader("{\n \"reporterRole\": \"SUPPLIER\",\n \"attended\": true,\n \"reportType\": \"ATTENDANCE\",\n \"note\": \"Arrived 10 minutes late but stayed for the full session.\"\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}/reports")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"reporterRole\": \"SUPPLIER\",\n \"attended\": true,\n \"reportType\": \"ATTENDANCE\",\n \"note\": \"Arrived 10 minutes late but stayed for the full session.\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://apiv2.gomarketbox.com/v1/projects/{projectId}/bookings/{bookingId}/reports")
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 \"reporterRole\": \"SUPPLIER\",\n \"attended\": true,\n \"reportType\": \"ATTENDANCE\",\n \"note\": \"Arrived 10 minutes late but stayed for the full session.\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"projectId": "<string>",
"bookingId": "<string>",
"reporterRole": "CLIENT",
"reporterId": "<string>",
"reportType": "ATTENDANCE",
"attended": true,
"deleted": true,
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"createdBy": "<string>",
"updatedBy": "<string>",
"note": "<string>"
}
}{
"data": {
"projectId": "<string>",
"bookingId": "<string>",
"reporterRole": "CLIENT",
"reporterId": "<string>",
"reportType": "ATTENDANCE",
"attended": true,
"deleted": true,
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"createdBy": "<string>",
"updatedBy": "<string>",
"note": "<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"
}File one side's report on a booking
Records one side of a booking reporting on it — today, whether they showed up. A booking carries at most two reports, one per side, identified by (bookingId, reporterRole); there is no report id.
attended is a self-report. A CLIENT report says the client attended; a SUPPLIER report says the supplier attended. Neither says anything whatsoever about the other party, so a supplier cannot mark a client as a no-show through this endpoint. reporterId is read off the booking (CLIENT → the booking’s client, SUPPLIER → the booking’s supplier) and is not accepted in the body, so a caller cannot file a report as somebody else.
Resubmitting is safe. This endpoint gets double-clicked from an email, so filing the same answer twice is a no-op rather than an error:
- nothing on file yet → 201 with the newly written report
- identical to what is on file → 200 with the stored report
- contradicts what is on file → 409
REPORT_ALREADY_EXISTS, naming the stored values
note is not part of the claim. The assertion a report makes is reportType + attended. Resubmitting those unchanged but with different text therefore returns 200 with the record as stored, including the ORIGINAL note — the new text is discarded, not merged. There is no route that edits a filed report.
A report does what the same answer does in the dashboard. It is filed through the one attendance-report path every door uses: a SUPPLIER report settles the booking (attended → COMPLETED, or DISPUTED when the client has reported that they did not attend; did not attend → SUPPLIER_NO_SHOW), and a CLIENT “did not attend” on a completed booking inside the dispute window opens a dispute. A report can be filed once the session has ended. Before that, on a CANCELLED booking, or a SUPPLIER report on a booking already settled, is 422 BOOKING_NOT_REPORTABLE, with nothing written. A SUPPLIER report against a booking with no supplier assigned is also 422, since there is nobody to attribute it to; a CLIENT report on the same booking is fine.
curl --request POST \
--url https://apiv2.gomarketbox.com/v1/projects/{projectId}/bookings/{bookingId}/reports \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"reporterRole": "SUPPLIER",
"attended": true,
"reportType": "ATTENDANCE",
"note": "Arrived 10 minutes late but stayed for the full session."
}
'import requests
url = "https://apiv2.gomarketbox.com/v1/projects/{projectId}/bookings/{bookingId}/reports"
payload = {
"reporterRole": "SUPPLIER",
"attended": True,
"reportType": "ATTENDANCE",
"note": "Arrived 10 minutes late but stayed for the full session."
}
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({
reporterRole: 'SUPPLIER',
attended: true,
reportType: 'ATTENDANCE',
note: 'Arrived 10 minutes late but stayed for the full session.'
})
};
fetch('https://apiv2.gomarketbox.com/v1/projects/{projectId}/bookings/{bookingId}/reports', 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}/reports",
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([
'reporterRole' => 'SUPPLIER',
'attended' => true,
'reportType' => 'ATTENDANCE',
'note' => 'Arrived 10 minutes late but stayed for the full session.'
]),
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}/reports"
payload := strings.NewReader("{\n \"reporterRole\": \"SUPPLIER\",\n \"attended\": true,\n \"reportType\": \"ATTENDANCE\",\n \"note\": \"Arrived 10 minutes late but stayed for the full session.\"\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}/reports")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"reporterRole\": \"SUPPLIER\",\n \"attended\": true,\n \"reportType\": \"ATTENDANCE\",\n \"note\": \"Arrived 10 minutes late but stayed for the full session.\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://apiv2.gomarketbox.com/v1/projects/{projectId}/bookings/{bookingId}/reports")
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 \"reporterRole\": \"SUPPLIER\",\n \"attended\": true,\n \"reportType\": \"ATTENDANCE\",\n \"note\": \"Arrived 10 minutes late but stayed for the full session.\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"projectId": "<string>",
"bookingId": "<string>",
"reporterRole": "CLIENT",
"reporterId": "<string>",
"reportType": "ATTENDANCE",
"attended": true,
"deleted": true,
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"createdBy": "<string>",
"updatedBy": "<string>",
"note": "<string>"
}
}{
"data": {
"projectId": "<string>",
"bookingId": "<string>",
"reporterRole": "CLIENT",
"reporterId": "<string>",
"reportType": "ATTENDANCE",
"attended": true,
"deleted": true,
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"createdBy": "<string>",
"updatedBy": "<string>",
"note": "<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
Report data