/v1/sites/{siteId}/customersBehavior
Local candidate: after migration 20261011141147 is deployed, a fresh phone-verified registration for an active mapping saves the submitted language for future messages. Explain this before submission. The canonical name and private fields are preserved; detached mappings and exact operation replays do not change the preference. Direct guest booking without registration keeps an existing profile preference and captures its own booking language. Previously accepted message content is unchanged.
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): Backend only, with customers:write for the same site and integration. Required when externalCustomerId is supplied OR when the customer session was created with a companion credential. Do not omit this header merely because the session already stores its original credential binding; never send it from a browser.
Current customer phone proof is required. A supplied companion integration credential must include customers:write. If this session was created with a companion key, send a valid customers:write companion again for registration, even without externalCustomerId. Binding externalCustomerId also requires that server-side credential and an account identity authorized by your backend. Registration is not account login or messaging consent.
Request
Idempotency and recovery
Persist one UUID and the exact request before sending. After an uncertain result, retain that UUID, body and preconditions; do not create a replacement operation just to retry.
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 · stringOptionalBackend only, with customers:write for the same site and integration. Required when externalCustomerId is supplied OR when the customer session was created with a companion credential. Do not omit this header merely because the session already stores its original credential binding; never send it from a browser.
Format and constraints
{ "type": "string", "pattern": "^(?:wbi|wbm)_[a-f0-9]{64}$" }
Request body · required
application/json
-
displayNamestringRequiredminLength:1maxLength:100 -
languagestringRequiredAllowed values:
["he","ar","en"] -
externalCustomerIdstringOptionalminLength:1maxLength:120 -
additionalPropertiesno value allowedSchema rule
Complete schema and nested fields
{
"type": "object",
"additionalProperties": false,
"properties": {
"displayName": {
"type": "string",
"minLength": 1,
"maxLength": 100
},
"language": {
"type": "string",
"enum": [
"he",
"ar",
"en"
]
},
"externalCustomerId": {
"type": "string",
"minLength": 1,
"maxLength": 120
}
},
"required": [
"displayName",
"language"
]
} Successful responses
200 · CustomerResult
Exact idempotent replay of the authoritative original receipt.
application/json · CustomerResult
-
customerobject; allOf (unspecified)RequiredAll of these schema rules apply together.
View nested fields
-
customerIdstring · uuidRequired -
externalCustomerIdanyOf (string | null)RequiredAt least one of these variants must match.
View nested fields
-
anyOf 1stringSchema branch -
anyOf 2nullSchema branch
-
-
statusstringRequiredAllowed values:
["active","detached"] -
versionintegerRequiredminimum:1 -
displayNameanyOf (string | null)OptionalAt least one of these variants must match.
View nested fields
-
anyOf 1stringSchema branch -
anyOf 2nullSchema branch
-
-
languageanyOf (string | null)OptionalAt least one of these variants must match.
View nested fields
-
anyOf 1stringSchema branchAllowed values:
["he","ar","en"] -
anyOf 2nullSchema branch
-
-
phonestringOptionalpattern:"^\\+[1-9][0-9]{7,14}$" -
fieldSourcesobjectOptionalView nested fields
-
additionalPropertiesobjectSchema ruleView branch fields and rules
-
sourcestringRequired -
versionintegerRequired -
updated_atstring · date-timeRequired -
additionalPropertiesno value allowedSchema rule
-
-
-
identityAssurancestringOptionalowner_reviewed means an owner-approved administrative or historical contact record, never customer authentication or phone proof.
Allowed values:
["customer_verified","owner_reviewed"] -
displayNameUnavailableReasonstringOptionalPresent only when the active displayName is unavailable (null). Canonical CRAD text is preserved, not truncated or cleared. Do not echo null as a source-field deletion.
Allowed values:
["not_set","blank","too_long","unsupported_characters"] -
allOf 1unspecifiedSchema branchView branch fields and rules
-
ifunspecifiedSchema ruleView branch fields and rules
-
displayNameUnavailableReasonunspecifiedCondition predicatePresence constraint in this rule; evaluate its enclosing condition or negation. The field’s type may be defined elsewhere.
-
-
thenobjectSchema ruleView branch fields and rules
-
statusstringOptional in this branchValue:
"active" -
displayNamenullRequired in this branch
-
-
-
additionalPropertiesno value allowedSchema rule
-
-
replayedbooleanRequired -
additionalPropertiesno value allowedSchema rule
Complete schema and nested fields
{
"type": "object",
"additionalProperties": false,
"properties": {
"customer": {
"type": "object",
"additionalProperties": false,
"required": [
"customerId",
"externalCustomerId",
"status",
"version"
],
"properties": {
"customerId": {
"type": "string",
"format": "uuid"
},
"externalCustomerId": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"status": {
"enum": [
"active",
"detached"
]
},
"version": {
"type": "integer",
"minimum": 1
},
"displayName": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"language": {
"anyOf": [
{
"type": "string",
"enum": [
"he",
"ar",
"en"
]
},
{
"type": "null"
}
]
},
"phone": {
"type": "string",
"pattern": "^\\+[1-9][0-9]{7,14}$"
},
"fieldSources": {
"type": "object",
"additionalProperties": {
"type": "object",
"additionalProperties": false,
"properties": {
"source": {
"type": "string"
},
"version": {
"type": "integer"
},
"updated_at": {
"type": "string",
"format": "date-time"
}
},
"required": [
"source",
"version",
"updated_at"
]
}
},
"identityAssurance": {
"enum": [
"customer_verified",
"owner_reviewed"
],
"description": "owner_reviewed means an owner-approved administrative or historical contact record, never customer authentication or phone proof."
},
"displayNameUnavailableReason": {
"enum": [
"not_set",
"blank",
"too_long",
"unsupported_characters"
],
"description": "Present only when the active displayName is unavailable (null). Canonical CRAD text is preserved, not truncated or cleared. Do not echo null as a source-field deletion."
}
},
"allOf": [
{
"if": {
"required": [
"displayNameUnavailableReason"
]
},
"then": {
"required": [
"displayName"
],
"properties": {
"status": {
"const": "active"
},
"displayName": {
"type": "null"
}
}
}
}
]
},
"replayed": {
"type": "boolean"
}
},
"required": [
"customer",
"replayed"
]
} 201 · CustomerResult
application/json · CustomerResult
-
customerobject; allOf (unspecified)RequiredAll of these schema rules apply together.
View nested fields
-
customerIdstring · uuidRequired -
externalCustomerIdanyOf (string | null)RequiredAt least one of these variants must match.
View nested fields
-
anyOf 1stringSchema branch -
anyOf 2nullSchema branch
-
-
statusstringRequiredAllowed values:
["active","detached"] -
versionintegerRequiredminimum:1 -
displayNameanyOf (string | null)OptionalAt least one of these variants must match.
View nested fields
-
anyOf 1stringSchema branch -
anyOf 2nullSchema branch
-
-
languageanyOf (string | null)OptionalAt least one of these variants must match.
View nested fields
-
anyOf 1stringSchema branchAllowed values:
["he","ar","en"] -
anyOf 2nullSchema branch
-
-
phonestringOptionalpattern:"^\\+[1-9][0-9]{7,14}$" -
fieldSourcesobjectOptionalView nested fields
-
additionalPropertiesobjectSchema ruleView branch fields and rules
-
sourcestringRequired -
versionintegerRequired -
updated_atstring · date-timeRequired -
additionalPropertiesno value allowedSchema rule
-
-
-
identityAssurancestringOptionalowner_reviewed means an owner-approved administrative or historical contact record, never customer authentication or phone proof.
Allowed values:
["customer_verified","owner_reviewed"] -
displayNameUnavailableReasonstringOptionalPresent only when the active displayName is unavailable (null). Canonical CRAD text is preserved, not truncated or cleared. Do not echo null as a source-field deletion.
Allowed values:
["not_set","blank","too_long","unsupported_characters"] -
allOf 1unspecifiedSchema branchView branch fields and rules
-
ifunspecifiedSchema ruleView branch fields and rules
-
displayNameUnavailableReasonunspecifiedCondition predicatePresence constraint in this rule; evaluate its enclosing condition or negation. The field’s type may be defined elsewhere.
-
-
thenobjectSchema ruleView branch fields and rules
-
statusstringOptional in this branchValue:
"active" -
displayNamenullRequired in this branch
-
-
-
additionalPropertiesno value allowedSchema rule
-
-
replayedbooleanRequired -
additionalPropertiesno value allowedSchema rule
Complete schema and nested fields
{
"type": "object",
"additionalProperties": false,
"properties": {
"customer": {
"type": "object",
"additionalProperties": false,
"required": [
"customerId",
"externalCustomerId",
"status",
"version"
],
"properties": {
"customerId": {
"type": "string",
"format": "uuid"
},
"externalCustomerId": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"status": {
"enum": [
"active",
"detached"
]
},
"version": {
"type": "integer",
"minimum": 1
},
"displayName": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"language": {
"anyOf": [
{
"type": "string",
"enum": [
"he",
"ar",
"en"
]
},
{
"type": "null"
}
]
},
"phone": {
"type": "string",
"pattern": "^\\+[1-9][0-9]{7,14}$"
},
"fieldSources": {
"type": "object",
"additionalProperties": {
"type": "object",
"additionalProperties": false,
"properties": {
"source": {
"type": "string"
},
"version": {
"type": "integer"
},
"updated_at": {
"type": "string",
"format": "date-time"
}
},
"required": [
"source",
"version",
"updated_at"
]
}
},
"identityAssurance": {
"enum": [
"customer_verified",
"owner_reviewed"
],
"description": "owner_reviewed means an owner-approved administrative or historical contact record, never customer authentication or phone proof."
},
"displayNameUnavailableReason": {
"enum": [
"not_set",
"blank",
"too_long",
"unsupported_characters"
],
"description": "Present only when the active displayName is unavailable (null). Canonical CRAD text is preserved, not truncated or cleared. Do not echo null as a source-field deletion."
}
},
"allOf": [
{
"if": {
"required": [
"displayNameUnavailableReason"
]
},
"then": {
"required": [
"displayName"
],
"properties": {
"status": {
"const": "active"
},
"displayName": {
"type": "null"
}
}
}
}
]
},
"replayed": {
"type": "boolean"
}
},
"required": [
"customer",
"replayed"
]
} 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"
]
}