Booking · Bookings
Get booking
Returns a specific booking for an organization and mandate, identified by the booking ID. The response includes cancellation receipt information. Actor details may be masked depending on the caller’s permissions.
Permissions
Send an API key of the organization in the path, using the X-API-Key header.
Who may call it
- The caller must have organization access.
- The caller needs
mandate.readandbooking.read. - Without
user.read, non-contact actors other than the current actor are masked. - A contact actor’s linked user is also masked without
user.readwhen the contact is not the current actor. - API actors are masked without
apiKey.read, including the current actor. A non-current API actor also needsuser.readto remain unmasked.
Request
Path parameters
-
organizationIdidrequired -
mandateIdidrequired -
bookingIdidrequired
curl --fail-with-body --silent --show-error --max-time 30 --globoff \
--request GET 'https://cloud.campai.com/api/YOUR_ORGANIZATION_ID/YOUR_MANDATE_ID/booking/bookings/YOUR_BOOKING_ID' \
--header 'X-API-Key: YOUR_API_KEY'const response = await fetch("https://cloud.campai.com/api/YOUR_ORGANIZATION_ID/YOUR_MANDATE_ID/booking/bookings/YOUR_BOOKING_ID", {
method: "GET",
headers: {
"X-API-Key": "YOUR_API_KEY"
},
redirect: 'error',
signal: AbortSignal.timeout(30_000),
});
if (!response.ok) throw new Error(`campai HTTP ${response.status}`);
const text = await response.text();
const result = text ? JSON.parse(text) : null;
console.log(JSON.stringify(result, null, 2));<?php
$context = stream_context_create(['http' => [
'method' => 'GET',
'header' => [
'X-API-Key: YOUR_API_KEY',
],
'timeout' => 30,
'follow_location' => 0,
'ignore_errors' => true,
]]);
$text = @file_get_contents('https://cloud.campai.com/api/YOUR_ORGANIZATION_ID/YOUR_MANDATE_ID/booking/bookings/YOUR_BOOKING_ID', false, $context);
preg_match('/^HTTP\/\S+ (\d{3})/', $http_response_header[0] ?? '', $match);
$status = (int) ($match[1] ?? 0);
if ($text === false || $status < 200 || $status >= 300) {
throw new RuntimeException("campai HTTP $status (0 means no response)");
}
$result = $text === '' ? null : json_decode($text, true, 512, JSON_THROW_ON_ERROR);
echo json_encode($result, JSON_PRETTY_PRINT | JSON_THROW_ON_ERROR), PHP_EOL;
Response
200 Successful response
Content-Type: application/json
-
_idid -
mandateid -
typestringeventresource -
bookingNumberstringexactly 7 characters
-
buyerobject13 properties
-
typestringbusinessperson -
namestring1–81 characters
-
nameNormalizedstringat least 1 characters
-
nameSortstring1–81 characters
-
emailstring -
phonestring | string · phone -
addressobjectnullable7 properties
-
countrystring -
statestring -
zipstring -
citystring -
addressLinestring -
details1string -
details2string
-
-
userIdstringat most 24 characters
-
accountinteger1–999999999
-
contactobjectnullable7 properties
-
namestring -
typestring -
nameNormalizedstring -
nameSortstring -
contactidnullable -
imageobjectnullable4 properties
-
resourcestringat least 1 characters
-
fileNamestringat most 128 characters
-
contentTypestringat most 75 characters
-
fileSizeBytesintegerat least 0
-
-
userobjectnullable4 properties
-
namestring -
typestring -
userIdstring -
imageobjectnullable4 properties
-
resourcestringat least 1 characters
-
fileNamestringat most 128 characters
-
contentTypestringat most 75 characters
-
fileSizeBytesintegerat least 0
-
-
-
-
paymentobjectnullable3 properties
-
paymentMethodstringsepaCreditTransfersepaDirectDebitcashonline -
sepaDirectDebitobjectnullable2 properties
-
ibanstring · iban -
bicstringnullable
-
-
onlineobjectnullable4 properties
-
paymentIntentidnullable -
providerstringnullablestripepaypal -
paymentModestringnullablemanualautomatic -
onlineDebitCollectionidnullable
-
-
-
personNamestring1–81 characters
-
receiptModestringgrossnet
-
-
receiptsobject[]8 properties
-
receiptid -
receiptNumberstringat most 30 characters
-
paymentStatusstringunpaidpartialpaid -
paymentTermsstringat most 2000 characters
-
paymentDueDatestring · date-timenullable -
paymentTotalAmountLeftToPayintegernullable0–9999999999
-
canceledAtstring · date-timenullable -
externalRefundobjectnullable2 properties
-
providerstringstripepaypal -
amountintegerat most 9999999999
-
-
-
formResultobjectnullable2 properties
-
schemaobject[]5 properties
-
pageIdstring -
idstring -
labelstring -
itemCaptionstring -
fieldsobject[]9 properties
-
idstring -
keystring1–24 characters · pattern
^[A-Za-z_$][A-Za-z0-9_$]*$ -
typestring20 values
placeholderhtmlspacertextselectmultiSelectdatetimedateTimenumberfilesignatureratingmatrixbooleanaddresscalculatedinfotermsPrivacypaymentMethod -
labelstring1–140 characters
-
bindPropertyPathstring -
textobject1 property
-
formatstringtextmultilineregexemailphoneurlibanbic
-
-
dateobject1 property
-
formatstring
-
-
calculatedobject2 properties
-
resultTypestringnumberstringbooleandateOnlydateTimeoption -
optionsobject[]at most 1000 items
4 properties
-
idstring1–140 characters
-
valuestring1–140 characters
-
labelstring1–140 characters
-
hintstringat most 200 characters
-
-
-
matrixobject3 properties
-
rowsobject[]4 properties
-
idstring1–140 characters
-
valuestring1–140 characters
-
labelstring1–140 characters
-
hintstringat most 200 characters
-
-
columnsobject[]4 properties
-
idstring1–140 characters
-
valuestring1–140 characters
-
labelstring1–140 characters
-
hintstringat most 200 characters
-
-
multiSelectboolean
-
-
-
-
dataobject of one of 7 types | object of one of 7 types | object (recursive)[] | (one of 7 types)[][]The answers of a form, by the ID of each field. A repeating group holds a list of its entries under its own ID.
-
-
totalPriceinteger0–9999999999
-
totalPointsintegerat least 0
-
usedPunchCardNumbersstring[] -
discountCodestringnullable -
statusstringconfirmedpartialCancelationcanceled -
paymentStatusstringnullableunpaidpartialpaid -
cancelationsobject[]8 properties
-
recordNumberstringexactly 10 characters
-
canceledAtstring · date-time -
reasonstringat most 240 characters
-
priceRefundintegernullable0–9999999999
-
pointsRefundintegernullableat least 0
-
partialboolean -
refundPayoutobject -
refundReceiptBreakdownobject[]2 properties
-
receiptid -
amountintegerat most 9999999999
-
-
-
recordsinteger -
createdAtstring · date-timenullable -
eventobject7 properties
-
eventid -
eventTitlestring -
eventDatestring · date-time -
seriesIdstring -
qrPassesobject[]nullable3 properties
-
kindstring -
targetobject -
qrPassTokenstring
-
-
refundPoliciesobject[]nullableat most 8 items
3 properties
-
refundUntilobject2 properties
-
valuenumberat least 0
-
unitstringhoursdaysweeksmonthsyears
-
-
priceModifierobject2 properties
-
valueinteger0–9999999999
-
typestring%amount
-
-
pointModifierobject2 properties
-
valueinteger0–9999999999
-
typestring%amount
-
-
-
invitationCodestringnullableat most 32 characters
-
-
resourceobject2 properties
-
resourcesid[] -
resourceNamesstring[]
-
-
cancellationReceiptsobject[]5 properties
-
receiptid -
totalRefundableinteger0–9999999999
-
isCanceledboolean -
createsMonetaryRefundboolean -
requiresRefundPayoutDetailsboolean
-
{
"_id": "000000000000000000000001",
"mandate": "000000000000000000000001",
"type": "event",
"bookingNumber": "string",
"buyer": {
"type": "business",
"name": "string",
"nameNormalized": "string",
"nameSort": "string",
"email": "",
"phone": "",
"address": {
"country": "string",
"state": "string",
"zip": "string"
},
"userId": "string",
"contact": {
"name": "string",
"type": "contact",
"nameNormalized": "string",
"nameSort": "string",
"contact": "000000000000000000000001",
"image": {
"resource": "string"
},
"user": {
"name": "string",
"type": "user",
"userId": "string",
"image": {
"resource": "string"
}
}
},
"payment": {
"paymentMethod": "sepaCreditTransfer",
"sepaDirectDebit": {
"iban": "string",
"bic": "string"
},
"online": {
"paymentIntent": "000000000000000000000001",
"provider": null
}
}
},
"receipts": [
{
"receipt": "000000000000000000000001",
"receiptNumber": "string",
"paymentStatus": "unpaid",
"paymentTerms": "string",
"paymentDueDate": null,
"paymentTotalAmountLeftToPay": null,
"canceledAt": null
}
],
"formResult": {
"schema": [
{
"id": "string",
"label": "string",
"fields": [
{
"id": "string",
"type": "placeholder"
}
]
}
],
"data": {
"key": "2026-10-22T12:00:00Z"
}
},
"totalPrice": 0,
"totalPoints": 0,
"usedPunchCardNumbers": [
"string"
],
"discountCode": "string",
"status": "confirmed",
"paymentStatus": "unpaid",
"cancelations": [
{
"recordNumber": "string",
"canceledAt": "2026-06-15T22:30:00Z",
"reason": "string",
"priceRefund": 0,
"pointsRefund": 0
}
],
"records": 1,
"cancellationReceipts": [
{
"receipt": "000000000000000000000001",
"totalRefundable": 0,
"isCanceled": true,
"createsMonetaryRefund": true,
"requiresRefundPayoutDetails": true
}
]
}
Errors
Other errors
| Status | Error | When |
|---|---|---|
| 404 | Booking was not found | If the booking is not found, the endpoint returns HTTP 404 with key routes.booking.bookings.noBooking. |
Errors nearly every request can meet are listed under Errors.