/v1/sites/{siteId}/booking-intentsBehavior
Requires current verified phone proof. Persist a request UUID before sending and use it as Idempotency-Key. Retain the returned intentId and operationId; the commit uses that returned operationId, not the intent-request UUID. Locators alone never authorize a booking. If the customer session was created with a companion integration credential, that bound credential must still be valid and include bookings:write:customer. The permission also applies on read-only or replay branches, where present; a new header does not replace the credential bound to the session.
Authentication
CustomerSession
Credential rules
Opaque short-lived customer session, upgraded by CRAD phone proof; neither a website account nor a cookie grants this authority. A session created with a companion integration credential remains bound to that credential: every request rechecks its expiry and revocation. Omitting or replacing the companion header later does not rebind the session. Current phone proof is required where stated by the operation. After expiry, create a new session and explicitly verify the same phone and integration to recover a known request or booking; retain the original locators and never auto-confirm during recovery.
X-CRAD-Integration-Key (optional header): Optional companion backend credential for the same integration, server requests only; never send from a browser. Required to bind an externalCustomerId on registration.
Current customer phone proof is required. Supplying externalReference also requires a server-side companion integration credential with bookings:write:customer for the same integration. If this customer session was created with a companion integration credential, that bound credential must still grant bookings:write:customer. Its current expiry/revocation is checked as well; an unrelated key sent later does not repair the session.
Request
Idempotency and recovery
Persist the request UUID before POST and use it as Idempotency-Key. Retain it across uncertainty so the original intent can be found through intent-requests/{requestId}. The returned intent.operationId is a separate identifier used when committing.
siteIdpath · stringRequiredFormat and constraints
{ "type": "string", "format": "uuid" }Idempotency-Keyheader · stringRequiredReuse the identical UUID for an unknown result. Booking commit must use operationId returned by the persisted intent.
Format and constraints
{ "type": "string", "format": "uuid" }X-CRAD-Integration-Keyheader · stringOptionalOptional companion backend credential for the same integration, server requests only; never send from a browser. Required to bind an externalCustomerId on registration.
Format and constraints
{ "type": "string", "pattern": "^(?:wbi|wbm)_[a-f0-9]{64}$" }
Request body · required
application/json · CreateIntent
-
kindstringRequiredValue:
"create" -
quoteIdstring · uuidRequired -
startAtstring · date-timeRequired -
customerNamestringRequiredminLength:1maxLength:100 -
languagestringRequiredAllowed values:
["he","ar","en"] -
communicationPreferencesobjectRequiredView nested fields
-
whatsappbooleanRequired -
noticeVersionstringRequiredValue:
"website-transactional-whatsapp-v1" -
additionalPropertiesno value allowedSchema rule
-
-
externalReferencestringOptionalOptional immutable backend-issued booking mapping, unique within its original site and integration. Requires a current companion integration credential with bookings:write:customer and current customer phone proof. Exact case; no whitespace. Never an authorization or customer identity key.
minLength:1maxLength:120pattern:"^[A-Za-z0-9][A-Za-z0-9._:-]{0,119}$" -
additionalPropertiesno value allowedSchema rule
Complete schema and nested fields
{
"type": "object",
"additionalProperties": false,
"properties": {
"kind": {
"const": "create"
},
"quoteId": {
"type": "string",
"format": "uuid"
},
"startAt": {
"type": "string",
"format": "date-time"
},
"customerName": {
"type": "string",
"minLength": 1,
"maxLength": 100
},
"language": {
"type": "string",
"enum": [
"he",
"ar",
"en"
]
},
"communicationPreferences": {
"type": "object",
"additionalProperties": false,
"properties": {
"whatsapp": {
"type": "boolean"
},
"noticeVersion": {
"const": "website-transactional-whatsapp-v1"
}
},
"required": [
"whatsapp",
"noticeVersion"
]
},
"externalReference": {
"type": "string",
"minLength": 1,
"maxLength": 120,
"pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]{0,119}$",
"description": "Optional immutable backend-issued booking mapping, unique within its original site and integration. Requires a current companion integration credential with bookings:write:customer and current customer phone proof. Exact case; no whitespace. Never an authorization or customer identity key."
}
},
"required": [
"kind",
"quoteId",
"startAt",
"customerName",
"language",
"communicationPreferences"
]
} Successful responses
201 · Intent
application/json · Intent
-
intentIdstring · uuidRequired -
locatorstring · uuidRequired -
operationIdstring · uuidRequired -
kindstringRequiredAllowed values:
["create","reschedule","cancel"] -
bookingIdanyOf (string | null)RequiredAt least one of these variants must match.
View nested fields
-
anyOf 1string · uuidSchema branch -
anyOf 2nullSchema branch
-
-
expiresAtstring · date-timeRequired -
summaryoneOf (object | oneOf (object | object))RequiredExactly one of these variants must match.
View nested fields
-
oneOf 1 · kind = "create"objectSchema branchView branch fields and rules
-
kindstringRequired in this branchValue:
"create" -
quoteIdstring · uuidRequired in this branch -
startAtstring · date-timeRequired in this branch -
customerNamestringRequired in this branchminLength:1maxLength:100 -
languagestringRequired in this branchAllowed values:
["he","ar","en"] -
communicationPreferencesobjectRequired in this branchView nested fields
-
whatsappbooleanRequired in this branch -
noticeVersionstringRequired in this branchValue:
"website-transactional-whatsapp-v1" -
additionalPropertiesno value allowedSchema rule
-
-
externalReferencestringOptional in this branchOptional immutable backend-issued booking mapping, unique within its original site and integration. Requires a current companion integration credential with bookings:write:customer and current customer phone proof. Exact case; no whitespace. Never an authorization or customer identity key.
minLength:1maxLength:120pattern:"^[A-Za-z0-9][A-Za-z0-9._:-]{0,119}$" -
additionalPropertiesno value allowedSchema rule
-
-
oneOf 2oneOf (object | object)Schema branchExactly one of these variants must match.
View branch fields and rules
-
oneOf 1 · kind = "cancel"objectSchema branchView branch fields and rules
-
kindstringRequired in this branchValue:
"cancel" -
expectedVersionintegerRequired in this branchminimum:1 -
additionalPropertiesno value allowedSchema rule
-
-
oneOf 2 · kind = "reschedule"objectSchema branchView branch fields and rules
-
kindstringRequired in this branchValue:
"reschedule" -
expectedVersionintegerRequired in this branchminimum:1 -
newStartAtstring · date-timeRequired in this branch -
additionalPropertiesno value allowedSchema rule
-
-
-
-
quoteanyOf (object | null)RequiredAt least one of these variants must match.
View nested fields
-
anyOf 1objectSchema branchView branch fields and rules
-
quoteIdstring · uuidRequired in this branch -
expiresAtstring · date-timeRequired in this branch -
snapshotobject; allOf (unspecified)Required in this branchAll of these schema rules apply together.
View nested fields
-
versionnumberRequired in this branchValue:
1 -
policystringRequired in this branchAllowed values:
["legacy_fixed_slot_v1","service_duration_v1"] -
serviceIdstring · uuidRequired in this branch -
serviceNameobjectRequired in this branchView nested fields
-
hestringOptional in this branch -
arstringOptional in this branch -
enstringOptional in this branch -
additionalPropertiesno value allowedSchema rule
-
-
providerIdanyOf (string | null)Required in this branchAt least one of these variants must match.
View nested fields
-
anyOf 1string · uuidSchema branch -
anyOf 2nullSchema branch
-
-
durationMinutesintegerRequired in this branchminimum:1maximum:1440 -
slotIntervalMinutesintegerRequired in this branchminimum:1maximum:1440 -
totalPriceMinoranyOf (integer | null)Required in this branchFrozen exact total in minor units. Null remains non-final; priceRangeMinor may carry frozen range bounds. Never turn the range minimum into an agreed total.
At least one of these variants must match.
View nested fields
-
anyOf 1integerSchema branchminimum:0 -
anyOf 2nullSchema branch
-
-
currencystringRequired in this branchValue:
"ILS" -
includeRemovalbooleanRequired in this branch -
baseDurationMinutesintegerRequired in this branch -
removalDurationMinutesintegerRequired in this branch -
basePriceMinoranyOf (integer | null)Required in this branchNull means the price will be decided later; zero remains an explicit free price.
At least one of these variants must match.
View nested fields
-
anyOf 1integerSchema branchminimum:0 -
anyOf 2nullSchema branch
-
-
removalPriceMinorintegerRequired in this branch -
priceRangeMinoranyOf (object | null)Optional in this branchNon-final inclusive bounds in minor currency units; 35000–60000 means 350–600 ILS. Both safe integer bounds are required and min must be strictly below max. The companion exact amount is null. Omitted or null means no range. Accepted bounds are immutable quote/booking terms.
At least one of these variants must match.
View nested fields
-
anyOf 1objectSchema branchView branch fields and rules
-
minintegerRequired in this branchminimum:0maximum:9007199254740991 -
maxintegerRequired in this branchminimum:0maximum:9007199254740991 -
additionalPropertiesno value allowedSchema rule
-
-
anyOf 2nullSchema branch
-
-
allOf 1unspecifiedSchema branchView branch fields and rules
-
ifobjectSchema ruleView branch fields and rules
-
priceRangeMinorobjectCondition predicate
-
-
thenobjectSchema ruleView branch fields and rules
-
totalPriceMinornullOptional in this branch
-
-
-
additionalPropertiesno value allowedSchema rule
-
-
additionalPropertiesno value allowedSchema rule
-
-
anyOf 2nullSchema branch
-
-
requestIdstring · uuidOptionalOriginal stable create/action-intent request locator for authoritative abandonment before replacing an uncommitted operation; optional during rolling v1.
-
additionalPropertiesno value allowedSchema rule
Complete schema and nested fields
{
"type": "object",
"additionalProperties": false,
"properties": {
"intentId": {
"type": "string",
"format": "uuid"
},
"locator": {
"type": "string",
"format": "uuid"
},
"operationId": {
"type": "string",
"format": "uuid"
},
"kind": {
"enum": [
"create",
"reschedule",
"cancel"
]
},
"bookingId": {
"anyOf": [
{
"type": "string",
"format": "uuid"
},
{
"type": "null"
}
]
},
"expiresAt": {
"type": "string",
"format": "date-time"
},
"summary": {
"oneOf": [
{
"type": "object",
"additionalProperties": false,
"properties": {
"kind": {
"const": "create"
},
"quoteId": {
"type": "string",
"format": "uuid"
},
"startAt": {
"type": "string",
"format": "date-time"
},
"customerName": {
"type": "string",
"minLength": 1,
"maxLength": 100
},
"language": {
"type": "string",
"enum": [
"he",
"ar",
"en"
]
},
"communicationPreferences": {
"type": "object",
"additionalProperties": false,
"properties": {
"whatsapp": {
"type": "boolean"
},
"noticeVersion": {
"const": "website-transactional-whatsapp-v1"
}
},
"required": [
"whatsapp",
"noticeVersion"
]
},
"externalReference": {
"type": "string",
"minLength": 1,
"maxLength": 120,
"pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]{0,119}$",
"description": "Optional immutable backend-issued booking mapping, unique within its original site and integration. Requires a current companion integration credential with bookings:write:customer and current customer phone proof. Exact case; no whitespace. Never an authorization or customer identity key."
}
},
"required": [
"kind",
"quoteId",
"startAt",
"customerName",
"language",
"communicationPreferences"
]
},
{
"oneOf": [
{
"type": "object",
"additionalProperties": false,
"properties": {
"kind": {
"const": "cancel"
},
"expectedVersion": {
"type": "integer",
"minimum": 1
}
},
"required": [
"kind",
"expectedVersion"
]
},
{
"type": "object",
"additionalProperties": false,
"properties": {
"kind": {
"const": "reschedule"
},
"expectedVersion": {
"type": "integer",
"minimum": 1
},
"newStartAt": {
"type": "string",
"format": "date-time"
}
},
"required": [
"kind",
"expectedVersion",
"newStartAt"
]
}
]
}
]
},
"quote": {
"anyOf": [
{
"type": "object",
"additionalProperties": false,
"properties": {
"quoteId": {
"type": "string",
"format": "uuid"
},
"expiresAt": {
"type": "string",
"format": "date-time"
},
"snapshot": {
"type": "object",
"additionalProperties": false,
"properties": {
"version": {
"const": 1
},
"policy": {
"enum": [
"legacy_fixed_slot_v1",
"service_duration_v1"
]
},
"serviceId": {
"type": "string",
"format": "uuid"
},
"serviceName": {
"type": "object",
"additionalProperties": false,
"properties": {
"he": {
"type": "string"
},
"ar": {
"type": "string"
},
"en": {
"type": "string"
}
}
},
"providerId": {
"anyOf": [
{
"type": "string",
"format": "uuid"
},
{
"type": "null"
}
]
},
"durationMinutes": {
"type": "integer",
"minimum": 1,
"maximum": 1440
},
"slotIntervalMinutes": {
"type": "integer",
"minimum": 1,
"maximum": 1440
},
"totalPriceMinor": {
"anyOf": [
{
"type": "integer",
"minimum": 0
},
{
"type": "null"
}
],
"description": "Frozen exact total in minor units. Null remains non-final; priceRangeMinor may carry frozen range bounds. Never turn the range minimum into an agreed total."
},
"currency": {
"const": "ILS"
},
"includeRemoval": {
"type": "boolean"
},
"baseDurationMinutes": {
"type": "integer"
},
"removalDurationMinutes": {
"type": "integer"
},
"basePriceMinor": {
"anyOf": [
{
"type": "integer",
"minimum": 0
},
{
"type": "null"
}
],
"description": "Null means the price will be decided later; zero remains an explicit free price."
},
"removalPriceMinor": {
"type": "integer"
},
"priceRangeMinor": {
"anyOf": [
{
"type": "object",
"additionalProperties": false,
"required": [
"min",
"max"
],
"properties": {
"min": {
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
},
"max": {
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
}
}
},
{
"type": "null"
}
],
"description": "Non-final inclusive bounds in minor currency units; 35000–60000 means 350–600 ILS. Both safe integer bounds are required and min must be strictly below max. The companion exact amount is null. Omitted or null means no range. Accepted bounds are immutable quote/booking terms."
}
},
"required": [
"version",
"policy",
"serviceId",
"serviceName",
"providerId",
"durationMinutes",
"slotIntervalMinutes",
"totalPriceMinor",
"currency",
"includeRemoval",
"baseDurationMinutes",
"removalDurationMinutes",
"basePriceMinor",
"removalPriceMinor"
],
"allOf": [
{
"if": {
"required": [
"priceRangeMinor"
],
"properties": {
"priceRangeMinor": {
"type": "object"
}
}
},
"then": {
"properties": {
"totalPriceMinor": {
"type": "null"
}
}
}
}
]
}
},
"required": [
"quoteId",
"expiresAt",
"snapshot"
]
},
{
"type": "null"
}
]
},
"requestId": {
"type": "string",
"format": "uuid",
"description": "Original stable create/action-intent request locator for authoritative abandonment before replacing an uncommitted operation; optional during rolling v1."
}
},
"required": [
"intentId",
"locator",
"operationId",
"kind",
"bookingId",
"expiresAt",
"summary",
"quote"
]
} Errors and recovery
Input validation
413REQUEST_TOO_LARGEThe JSON request body exceeds 8,192 bytes.
415JSON_REQUIREDSend Content-Type: application/json.
Error responses declared in the contract (10)
The preview contract shares generic error definitions across operations. This list is not an exhaustive list of runtime errors.
401 · Structured error.
application/json · Error
-
errorobjectRequiredView nested fields
-
codestringRequired -
requestIdstring · uuidRequired -
retryAfterintegerOptionalminimum:1 -
additionalPropertiesno value allowedSchema rule
-
-
additionalPropertiesno value allowedSchema rule
Complete schema and nested fields
{
"type": "object",
"additionalProperties": false,
"properties": {
"error": {
"type": "object",
"additionalProperties": false,
"properties": {
"code": {
"type": "string"
},
"requestId": {
"type": "string",
"format": "uuid"
},
"retryAfter": {
"type": "integer",
"minimum": 1
}
},
"required": [
"code",
"requestId"
]
}
},
"required": [
"error"
]
} 403 · Structured error.
application/json · Error
-
errorobjectRequiredView nested fields
-
codestringRequired -
requestIdstring · uuidRequired -
retryAfterintegerOptionalminimum:1 -
additionalPropertiesno value allowedSchema rule
-
-
additionalPropertiesno value allowedSchema rule
Complete schema and nested fields
{
"type": "object",
"additionalProperties": false,
"properties": {
"error": {
"type": "object",
"additionalProperties": false,
"properties": {
"code": {
"type": "string"
},
"requestId": {
"type": "string",
"format": "uuid"
},
"retryAfter": {
"type": "integer",
"minimum": 1
}
},
"required": [
"code",
"requestId"
]
}
},
"required": [
"error"
]
} 404 · Structured error.
application/json · Error
-
errorobjectRequiredView nested fields
-
codestringRequired -
requestIdstring · uuidRequired -
retryAfterintegerOptionalminimum:1 -
additionalPropertiesno value allowedSchema rule
-
-
additionalPropertiesno value allowedSchema rule
Complete schema and nested fields
{
"type": "object",
"additionalProperties": false,
"properties": {
"error": {
"type": "object",
"additionalProperties": false,
"properties": {
"code": {
"type": "string"
},
"requestId": {
"type": "string",
"format": "uuid"
},
"retryAfter": {
"type": "integer",
"minimum": 1
}
},
"required": [
"code",
"requestId"
]
}
},
"required": [
"error"
]
} 409 · Structured error.
application/json · Error
-
errorobjectRequiredView nested fields
-
codestringRequired -
requestIdstring · uuidRequired -
retryAfterintegerOptionalminimum:1 -
additionalPropertiesno value allowedSchema rule
-
-
additionalPropertiesno value allowedSchema rule
Complete schema and nested fields
{
"type": "object",
"additionalProperties": false,
"properties": {
"error": {
"type": "object",
"additionalProperties": false,
"properties": {
"code": {
"type": "string"
},
"requestId": {
"type": "string",
"format": "uuid"
},
"retryAfter": {
"type": "integer",
"minimum": 1
}
},
"required": [
"code",
"requestId"
]
}
},
"required": [
"error"
]
} 410 · Structured error.
application/json · Error
-
errorobjectRequiredView nested fields
-
codestringRequired -
requestIdstring · uuidRequired -
retryAfterintegerOptionalminimum:1 -
additionalPropertiesno value allowedSchema rule
-
-
additionalPropertiesno value allowedSchema rule
Complete schema and nested fields
{
"type": "object",
"additionalProperties": false,
"properties": {
"error": {
"type": "object",
"additionalProperties": false,
"properties": {
"code": {
"type": "string"
},
"requestId": {
"type": "string",
"format": "uuid"
},
"retryAfter": {
"type": "integer",
"minimum": 1
}
},
"required": [
"code",
"requestId"
]
}
},
"required": [
"error"
]
} 412 · Structured error.
application/json · Error
-
errorobjectRequiredView nested fields
-
codestringRequired -
requestIdstring · uuidRequired -
retryAfterintegerOptionalminimum:1 -
additionalPropertiesno value allowedSchema rule
-
-
additionalPropertiesno value allowedSchema rule
Complete schema and nested fields
{
"type": "object",
"additionalProperties": false,
"properties": {
"error": {
"type": "object",
"additionalProperties": false,
"properties": {
"code": {
"type": "string"
},
"requestId": {
"type": "string",
"format": "uuid"
},
"retryAfter": {
"type": "integer",
"minimum": 1
}
},
"required": [
"code",
"requestId"
]
}
},
"required": [
"error"
]
} 422 · Structured error.
application/json · Error
-
errorobjectRequiredView nested fields
-
codestringRequired -
requestIdstring · uuidRequired -
retryAfterintegerOptionalminimum:1 -
additionalPropertiesno value allowedSchema rule
-
-
additionalPropertiesno value allowedSchema rule
Complete schema and nested fields
{
"type": "object",
"additionalProperties": false,
"properties": {
"error": {
"type": "object",
"additionalProperties": false,
"properties": {
"code": {
"type": "string"
},
"requestId": {
"type": "string",
"format": "uuid"
},
"retryAfter": {
"type": "integer",
"minimum": 1
}
},
"required": [
"code",
"requestId"
]
}
},
"required": [
"error"
]
} 428 · Structured error.
application/json · Error
-
errorobjectRequiredView nested fields
-
codestringRequired -
requestIdstring · uuidRequired -
retryAfterintegerOptionalminimum:1 -
additionalPropertiesno value allowedSchema rule
-
-
additionalPropertiesno value allowedSchema rule
Complete schema and nested fields
{
"type": "object",
"additionalProperties": false,
"properties": {
"error": {
"type": "object",
"additionalProperties": false,
"properties": {
"code": {
"type": "string"
},
"requestId": {
"type": "string",
"format": "uuid"
},
"retryAfter": {
"type": "integer",
"minimum": 1
}
},
"required": [
"code",
"requestId"
]
}
},
"required": [
"error"
]
} 429 · Rate limit; honor Retry-After.
application/json · Error
-
errorobjectRequiredView nested fields
-
codestringRequired -
requestIdstring · uuidRequired -
retryAfterintegerOptionalminimum:1 -
additionalPropertiesno value allowedSchema rule
-
-
additionalPropertiesno value allowedSchema rule
Complete schema and nested fields
{
"type": "object",
"additionalProperties": false,
"properties": {
"error": {
"type": "object",
"additionalProperties": false,
"properties": {
"code": {
"type": "string"
},
"requestId": {
"type": "string",
"format": "uuid"
},
"retryAfter": {
"type": "integer",
"minimum": 1
}
},
"required": [
"code",
"requestId"
]
}
},
"required": [
"error"
]
} 503 · Outcome may be unknown. Keep operation key and reconcile.
application/json · Error
-
errorobjectRequiredView nested fields
-
codestringRequired -
requestIdstring · uuidRequired -
retryAfterintegerOptionalminimum:1 -
additionalPropertiesno value allowedSchema rule
-
-
additionalPropertiesno value allowedSchema rule
Complete schema and nested fields
{
"type": "object",
"additionalProperties": false,
"properties": {
"error": {
"type": "object",
"additionalProperties": false,
"properties": {
"code": {
"type": "string"
},
"requestId": {
"type": "string",
"format": "uuid"
},
"retryAfter": {
"type": "integer",
"minimum": 1
}
},
"required": [
"code",
"requestId"
]
}
},
"required": [
"error"
]
}