/v1/sites/{siteId}/bookings/{bookingId}/rescheduleBehavior
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 and authority for the existing booking are required. If a companion integration credential is sent, it must include bookings:write:customer. 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
Set Idempotency-Key to the operationId returned by this exact persisted intent, and send its intentId. A new UUID is rejected. After uncertainty, recover or retry the same operation; never submit a replacement booking.
siteIdpath · stringRequiredFormat and constraints
{ "type": "string", "format": "uuid" }bookingIdpath · 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
-
intentIdstring · uuidRequired -
additionalPropertiesno value allowedSchema rule
Complete schema and nested fields
{
"type": "object",
"additionalProperties": false,
"properties": {
"intentId": {
"type": "string",
"format": "uuid"
}
},
"required": [
"intentId"
]
} Successful responses
200 · Receipt
application/json · Receipt
-
bookingIdstring · uuidRequired -
versionintegerRequiredminimum:1 -
statusstringRequiredAllowed values:
["pending","confirmed","cancelled","completed","missed","now"] -
startAtstring · date-timeRequired -
endAtstring · date-timeRequired -
snapshotobject; allOf (unspecified)RequiredAll of these schema rules apply together.
View nested fields
-
versionnumberRequiredValue:
1 -
policystringRequiredAllowed values:
["legacy_fixed_slot_v1","service_duration_v1"] -
serviceIdstring · uuidRequired -
serviceNameobjectRequiredView nested fields
-
hestringOptional -
arstringOptional -
enstringOptional -
additionalPropertiesno value allowedSchema rule
-
-
providerIdanyOf (string | null)RequiredAt least one of these variants must match.
View nested fields
-
anyOf 1string · uuidSchema branch -
anyOf 2nullSchema branch
-
-
durationMinutesintegerRequiredminimum:1maximum:1440 -
slotIntervalMinutesintegerRequiredminimum:1maximum:1440 -
totalPriceMinoranyOf (integer | null)RequiredFrozen 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
-
-
currencystringRequiredValue:
"ILS" -
includeRemovalbooleanRequired -
baseDurationMinutesintegerRequired -
removalDurationMinutesintegerRequired -
basePriceMinoranyOf (integer | null)RequiredNull 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 -
priceRangeMinoranyOf (object | null)OptionalNon-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
-
-
replayedbooleanRequired -
allowedActionsobjectOptionalFresh authorized GET projection, valid for at most thirty seconds and capped by proof expiry or the cancellation cutoff. Advisory only: a write rechecks current policy, status and locks. Immutable commit/replay receipts omit it. Site intake pause or service unpublication does not itself block an accepted booking.
View nested fields
-
computedAtstring · date-timeRequired -
validUntilstring · date-timeRequired -
canceloneOf (object | object)RequiredExactly one of these variants must match.
View nested fields
-
oneOf 1 · allowed = trueobjectSchema branchView branch fields and rules
-
allowedbooleanRequired in this branchValue:
true -
reasonnullRequired in this branch -
additionalPropertiesno value allowedSchema rule
-
-
oneOf 2 · allowed = falseobjectSchema branchView branch fields and rules
-
allowedbooleanRequired in this branchValue:
false -
reasonstringRequired in this branchAllowed values:
["BOOKING_NOT_CHANGEABLE","CANCELLATION_NOTICE_REQUIRED","REMINDER_IN_PROGRESS","CUSTOMER_UNAVAILABLE","PROVIDER_UNAVAILABLE","INVALID_SETTINGS","CONTACT_BUSINESS_REQUIRED"] -
additionalPropertiesno value allowedSchema rule
-
-
-
rescheduleoneOf (object | object)RequiredExactly one of these variants must match.
View nested fields
-
oneOf 1 · allowed = trueobjectSchema branchView branch fields and rules
-
allowedbooleanRequired in this branchValue:
true -
reasonnullRequired in this branch -
additionalPropertiesno value allowedSchema rule
-
-
oneOf 2 · allowed = falseobjectSchema branchView branch fields and rules
-
allowedbooleanRequired in this branchValue:
false -
reasonstringRequired in this branchAllowed values:
["BOOKING_NOT_CHANGEABLE","CANCELLATION_NOTICE_REQUIRED","REMINDER_IN_PROGRESS","CUSTOMER_UNAVAILABLE","PROVIDER_UNAVAILABLE","INVALID_SETTINGS","CONTACT_BUSINESS_REQUIRED"] -
additionalPropertiesno value allowedSchema rule
-
-
-
contactPhoneNumberstring | nullOptionalBusiness contact guidance in contact_business mode; null for self-service. Separate from the WhatsApp sending identity.
pattern:"^\\+[1-9][0-9]{6,14}$" -
additionalPropertiesno value allowedSchema rule
-
-
externalReferencestring | nullOptionalOriginal immutable integration-scoped booking reference, retained across replacement/reschedule and key rotation. Null when no reference was provided; optional during rolling v1.
minLength:1maxLength:120pattern:"^[A-Za-z0-9][A-Za-z0-9._:-]{0,119}$" -
approvalRequiredbooleanOptionalCustomer request requiring a clinic decision. Existing appointments and manually entered appointments are preserved.
-
timeProposalanyOf (object | null)OptionalAt least one of these variants must match.
View nested fields
-
anyOf 1objectSchema branchVersion-bound alternative for a pending request. The original keeps its slot; the alternative is not held. Acceptance rechecks capacity and creates one confirmed successor preserving accepted terms. Expired or replaced offers cannot be accepted.
View branch fields and rules
-
proposalIdstring · uuidRequired in this branch -
appointmentVersionstringRequired in this branchOpaque physical appointment revision, a0 through a9223372036854775807. Preserve exactly; this is distinct from website lineage versions.
pattern:"^a(?:0|[1-9][0-9]{0,18})$" -
startAtstring · date-timeRequired in this branch -
endAtstring · date-timeRequired in this branch -
expiresAtstring · date-timeRequired in this branch -
statestringRequired in this branchAllowed values:
["offered","accepted","declined"] -
additionalPropertiesno value allowedSchema rule
-
-
anyOf 2nullSchema branch
-
-
additionalPropertiesno value allowedSchema rule
Complete schema and nested fields
{
"type": "object",
"additionalProperties": false,
"properties": {
"bookingId": {
"type": "string",
"format": "uuid"
},
"version": {
"type": "integer",
"minimum": 1
},
"status": {
"enum": [
"pending",
"confirmed",
"cancelled",
"completed",
"missed",
"now"
]
},
"startAt": {
"type": "string",
"format": "date-time"
},
"endAt": {
"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"
}
}
}
}
]
},
"replayed": {
"type": "boolean"
},
"allowedActions": {
"type": "object",
"additionalProperties": false,
"description": "Fresh authorized GET projection, valid for at most thirty seconds and capped by proof expiry or the cancellation cutoff. Advisory only: a write rechecks current policy, status and locks. Immutable commit/replay receipts omit it. Site intake pause or service unpublication does not itself block an accepted booking.",
"properties": {
"computedAt": {
"type": "string",
"format": "date-time"
},
"validUntil": {
"type": "string",
"format": "date-time"
},
"cancel": {
"oneOf": [
{
"type": "object",
"additionalProperties": false,
"properties": {
"allowed": {
"const": true
},
"reason": {
"type": "null"
}
},
"required": [
"allowed",
"reason"
]
},
{
"type": "object",
"additionalProperties": false,
"properties": {
"allowed": {
"const": false
},
"reason": {
"enum": [
"BOOKING_NOT_CHANGEABLE",
"CANCELLATION_NOTICE_REQUIRED",
"REMINDER_IN_PROGRESS",
"CUSTOMER_UNAVAILABLE",
"PROVIDER_UNAVAILABLE",
"INVALID_SETTINGS",
"CONTACT_BUSINESS_REQUIRED"
]
}
},
"required": [
"allowed",
"reason"
]
}
]
},
"reschedule": {
"oneOf": [
{
"type": "object",
"additionalProperties": false,
"properties": {
"allowed": {
"const": true
},
"reason": {
"type": "null"
}
},
"required": [
"allowed",
"reason"
]
},
{
"type": "object",
"additionalProperties": false,
"properties": {
"allowed": {
"const": false
},
"reason": {
"enum": [
"BOOKING_NOT_CHANGEABLE",
"CANCELLATION_NOTICE_REQUIRED",
"REMINDER_IN_PROGRESS",
"CUSTOMER_UNAVAILABLE",
"PROVIDER_UNAVAILABLE",
"INVALID_SETTINGS",
"CONTACT_BUSINESS_REQUIRED"
]
}
},
"required": [
"allowed",
"reason"
]
}
]
},
"contactPhoneNumber": {
"type": [
"string",
"null"
],
"pattern": "^\\+[1-9][0-9]{6,14}$",
"description": "Business contact guidance in contact_business mode; null for self-service. Separate from the WhatsApp sending identity."
}
},
"required": [
"computedAt",
"validUntil",
"cancel",
"reschedule"
]
},
"externalReference": {
"type": [
"string",
"null"
],
"minLength": 1,
"maxLength": 120,
"pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]{0,119}$",
"description": "Original immutable integration-scoped booking reference, retained across replacement/reschedule and key rotation. Null when no reference was provided; optional during rolling v1."
},
"approvalRequired": {
"type": "boolean",
"description": "Customer request requiring a clinic decision. Existing appointments and manually entered appointments are preserved."
},
"timeProposal": {
"anyOf": [
{
"type": "object",
"additionalProperties": false,
"properties": {
"proposalId": {
"type": "string",
"format": "uuid"
},
"appointmentVersion": {
"type": "string",
"pattern": "^a(?:0|[1-9][0-9]{0,18})$",
"description": "Opaque physical appointment revision, a0 through a9223372036854775807. Preserve exactly; this is distinct from website lineage versions."
},
"startAt": {
"type": "string",
"format": "date-time"
},
"endAt": {
"type": "string",
"format": "date-time"
},
"expiresAt": {
"type": "string",
"format": "date-time"
},
"state": {
"enum": [
"offered",
"accepted",
"declined"
]
}
},
"required": [
"proposalId",
"appointmentVersion",
"startAt",
"endAt",
"expiresAt",
"state"
],
"description": "Version-bound alternative for a pending request. The original keeps its slot; the alternative is not held. Acceptance rechecks capacity and creates one confirmed successor preserving accepted terms. Expired or replaced offers cannot be accepted."
},
{
"type": "null"
}
]
}
},
"required": [
"bookingId",
"version",
"status",
"startAt",
"endAt",
"snapshot",
"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"
]
}