curl --request GET \
--url https://apiv2.gomarketbox.com/v1/projects/{projectId}/bookings/{bookingId}/aggregate \
--header 'x-api-key: <api-key>'import requests
url = "https://apiv2.gomarketbox.com/v1/projects/{projectId}/bookings/{bookingId}/aggregate"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://apiv2.gomarketbox.com/v1/projects/{projectId}/bookings/{bookingId}/aggregate', 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}/aggregate",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"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"
"net/http"
"io"
)
func main() {
url := "https://apiv2.gomarketbox.com/v1/projects/{projectId}/bookings/{bookingId}/aggregate"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://apiv2.gomarketbox.com/v1/projects/{projectId}/bookings/{bookingId}/aggregate")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://apiv2.gomarketbox.com/v1/projects/{projectId}/bookings/{bookingId}/aggregate")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"data": {
"booking": {
"projectId": "<string>",
"tenantId": "<string>",
"bookingId": "<string>",
"supplierId": "<string>",
"clientId": "<string>",
"bookingStartUtc": "2023-11-07T05:31:56Z",
"bookingEndUtc": "2023-11-07T05:31:56Z",
"bookingTz": "<string>",
"bookingLocalDate": "<string>",
"bookingLocalStartTime": "<string>",
"bookingLocalEndTime": "<string>",
"bookingLocalEndDate": "<string>",
"locationType": "PHYSICAL",
"locationId": "<string>",
"latitude": 123,
"longitude": 123,
"address": {
"addressOneLine": "10 Main St, Toronto, ON M5V 1A1, Canada",
"streetNumber": "10",
"streetName": "Main St",
"city": "Toronto",
"state": "ON",
"country": "CA",
"zipCode": "M5V 1A1",
"unitNumber": "4B"
},
"capacity": 1,
"participantCount": 1,
"waitlistCount": 1,
"isGroupBooking": true,
"status": "SCHEDULED",
"statusUpdatedAt": "2023-11-07T05:31:56Z",
"counts": {
"services": 1,
"notes": 1,
"participants": 1
},
"deleted": true,
"version": 1,
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"createdBy": "<string>",
"updatedBy": "<string>",
"seriesId": "<string>",
"occurrenceLocalDate": "<string>",
"isException": true,
"packageOrderItemId": "<string>",
"locale": "<string>",
"attribution": {
"searchId": "srch_01k7q3x9h4e8rb2d6m0z5a7c1n",
"sessionKey": "sess-example-01",
"surface": "results"
},
"statusUpdatedBy": "<string>",
"statusUpdatedByCapacity": "ADMIN",
"cancellationReason": "<string>",
"cancelledBy": "<string>",
"cancellationInitiatedBy": "CLIENT",
"cancellationReasonCode": "CLIENT_REQUESTED",
"creditTreatment": "RETURN",
"durationOverrideMinutes": 720,
"durationOverrideReason": "<string>"
},
"services": [
{
"projectId": "<string>",
"bookingId": "<string>",
"bookingServiceId": "<string>",
"businessModelType": "SINGLE_BOOKING",
"offeringSnapshot": {
"serviceId": "<string>",
"offeringId": "<string>",
"price": {
"amount": 1,
"currency": "<string>"
},
"duration": {
"type": "FIXED",
"minutes": 1
},
"attributeValues": [
{
"attributeId": "<string>",
"attributeNameSnapshot": {},
"attributeType": "STRING",
"value": {},
"valueId": "<string>"
}
],
"name": {}
},
"quantity": 1,
"durationMinutes": 1,
"unitPrice": {
"amount": 1,
"currency": "<string>"
},
"lineAmount": {
"amount": 1,
"currency": "<string>"
},
"status": "SCHEDULED",
"deleted": true,
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"createdBy": "<string>",
"updatedBy": "<string>"
}
],
"participants": [
{
"projectId": "<string>",
"bookingId": "<string>",
"clientId": "<string>",
"participantStatus": "REGISTERED",
"checkInStatus": "PENDING",
"registeredAt": "2023-11-07T05:31:56Z",
"deleted": true,
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"createdBy": "<string>",
"updatedBy": "<string>",
"checkInAt": "2023-11-07T05:31:56Z",
"waitlistPosition": 1
}
],
"notes": [
{
"projectId": "<string>",
"bookingId": "<string>",
"noteId": "<string>",
"scope": "BOOKING",
"noteText": "<string>",
"deleted": true,
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"createdBy": "<string>",
"updatedBy": "<string>",
"bookingServiceId": "<string>"
}
],
"reports": [
{
"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>"
}
],
"parties": {
"client": {
"clientId": "cli_01kv60qge5eh59ap0gw0pqrrys",
"fullName": "Cara Client"
},
"supplier": {
"supplierId": "sup_01kv60qge5eh59ap0gw0pqrrys",
"fullName": "Javier Supplier"
}
}
}
}{
"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"
}Get a booking with its services, participants, notes, reports and party names
The booking plus everything hanging off it — service lines, participants, notes and attendance reports — in one call. This is the shape for a booking detail screen; assembling it from five separate endpoints is slower and can tear if something changes mid-sequence. reports holds at most two rows, one per side; see POST /bookings//reports for what a report asserts.
parties carries both sides with their display names resolved, so a page can render “How was your booking with Javier?” without a second call — and there is no public endpoint that turns a clientId into a name, so this is the only way to get one. It is available immediately, before any review exists. parties.supplier is null when no supplier is assigned, and each fullName is best-effort: a party whose profile cannot be resolved keeps its bare id rather than failing the call. Names only — no email address is returned for either party.
curl --request GET \
--url https://apiv2.gomarketbox.com/v1/projects/{projectId}/bookings/{bookingId}/aggregate \
--header 'x-api-key: <api-key>'import requests
url = "https://apiv2.gomarketbox.com/v1/projects/{projectId}/bookings/{bookingId}/aggregate"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://apiv2.gomarketbox.com/v1/projects/{projectId}/bookings/{bookingId}/aggregate', 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}/aggregate",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"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"
"net/http"
"io"
)
func main() {
url := "https://apiv2.gomarketbox.com/v1/projects/{projectId}/bookings/{bookingId}/aggregate"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://apiv2.gomarketbox.com/v1/projects/{projectId}/bookings/{bookingId}/aggregate")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://apiv2.gomarketbox.com/v1/projects/{projectId}/bookings/{bookingId}/aggregate")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"data": {
"booking": {
"projectId": "<string>",
"tenantId": "<string>",
"bookingId": "<string>",
"supplierId": "<string>",
"clientId": "<string>",
"bookingStartUtc": "2023-11-07T05:31:56Z",
"bookingEndUtc": "2023-11-07T05:31:56Z",
"bookingTz": "<string>",
"bookingLocalDate": "<string>",
"bookingLocalStartTime": "<string>",
"bookingLocalEndTime": "<string>",
"bookingLocalEndDate": "<string>",
"locationType": "PHYSICAL",
"locationId": "<string>",
"latitude": 123,
"longitude": 123,
"address": {
"addressOneLine": "10 Main St, Toronto, ON M5V 1A1, Canada",
"streetNumber": "10",
"streetName": "Main St",
"city": "Toronto",
"state": "ON",
"country": "CA",
"zipCode": "M5V 1A1",
"unitNumber": "4B"
},
"capacity": 1,
"participantCount": 1,
"waitlistCount": 1,
"isGroupBooking": true,
"status": "SCHEDULED",
"statusUpdatedAt": "2023-11-07T05:31:56Z",
"counts": {
"services": 1,
"notes": 1,
"participants": 1
},
"deleted": true,
"version": 1,
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"createdBy": "<string>",
"updatedBy": "<string>",
"seriesId": "<string>",
"occurrenceLocalDate": "<string>",
"isException": true,
"packageOrderItemId": "<string>",
"locale": "<string>",
"attribution": {
"searchId": "srch_01k7q3x9h4e8rb2d6m0z5a7c1n",
"sessionKey": "sess-example-01",
"surface": "results"
},
"statusUpdatedBy": "<string>",
"statusUpdatedByCapacity": "ADMIN",
"cancellationReason": "<string>",
"cancelledBy": "<string>",
"cancellationInitiatedBy": "CLIENT",
"cancellationReasonCode": "CLIENT_REQUESTED",
"creditTreatment": "RETURN",
"durationOverrideMinutes": 720,
"durationOverrideReason": "<string>"
},
"services": [
{
"projectId": "<string>",
"bookingId": "<string>",
"bookingServiceId": "<string>",
"businessModelType": "SINGLE_BOOKING",
"offeringSnapshot": {
"serviceId": "<string>",
"offeringId": "<string>",
"price": {
"amount": 1,
"currency": "<string>"
},
"duration": {
"type": "FIXED",
"minutes": 1
},
"attributeValues": [
{
"attributeId": "<string>",
"attributeNameSnapshot": {},
"attributeType": "STRING",
"value": {},
"valueId": "<string>"
}
],
"name": {}
},
"quantity": 1,
"durationMinutes": 1,
"unitPrice": {
"amount": 1,
"currency": "<string>"
},
"lineAmount": {
"amount": 1,
"currency": "<string>"
},
"status": "SCHEDULED",
"deleted": true,
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"createdBy": "<string>",
"updatedBy": "<string>"
}
],
"participants": [
{
"projectId": "<string>",
"bookingId": "<string>",
"clientId": "<string>",
"participantStatus": "REGISTERED",
"checkInStatus": "PENDING",
"registeredAt": "2023-11-07T05:31:56Z",
"deleted": true,
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"createdBy": "<string>",
"updatedBy": "<string>",
"checkInAt": "2023-11-07T05:31:56Z",
"waitlistPosition": 1
}
],
"notes": [
{
"projectId": "<string>",
"bookingId": "<string>",
"noteId": "<string>",
"scope": "BOOKING",
"noteText": "<string>",
"deleted": true,
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"createdBy": "<string>",
"updatedBy": "<string>",
"bookingServiceId": "<string>"
}
],
"reports": [
{
"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>"
}
],
"parties": {
"client": {
"clientId": "cli_01kv60qge5eh59ap0gw0pqrrys",
"fullName": "Cara Client"
},
"supplier": {
"supplierId": "sup_01kv60qge5eh59ap0gw0pqrrys",
"fullName": "Javier Supplier"
}
}
}
}{
"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.