/v1/management/duration-policy/providers/{providerId}/previewsBehavior
Review changes to this provider’s openingHours and/or slotDurationMinutes. Send null to restore inheritance. The preview shows the stored overrides, effective duration before and after, and separate rewritable, conflicting, protected and unchanged counts. Read the inherited business policy from GET. Provider metadata and service assignments are not editable here.
The preview changes no settings or appointments. It expires after five minutes and is bound to the key, exact proposal and current impact. Reviews exceeding 10,000 future appointments or 10,000 future blocks are refused.
Authentication
ManagementCredential
Credential rules
One server-only owner-issued wbm_ API key can carry both management and integration permissions. Additional permissions require an explicit owner-issued grant. GET /v1/management returns the management discovery view, which may be empty for a booking-only key. For credentials with appointments:read, this discovery view omits whatsapp-templates:read, whatsapp-templates:write, whatsapp-profile:read and whatsapp-profile:write to preserve calendar-client compatibility. Discover these grants through GET /v1/management/messaging-capabilities. Template/profile command authorization still uses the stored grants. Server-only owner-issued Management authority with explicit application permissions. Calling this API does not expand a credential's grants. contacts:read/write/block/sync/fields:read/fields:write are separate approvals for canonical business contacts; fields also require current typed owner grants. contacts:record remains contact recording/recovery only. These grants create no customer phone proof, booking authority, messaging consent or automatic synchronization. Hours/blocks retain their independent resource grants. booking-policy:read/write separately delegate whole-business booking settings, without schedule/provider grants; write requires read. They preserve existing appointments and create no duration-rewrite authority. Provider duration policy additionally requires explicit provider-booking-policy:read/write and exact current providerIds; booking-duration:rewrite is separately approved and does not itself grant policy read/write. Service catalogue requires explicit services:read/write, independent of provider/calendar/schedule resources; write requires read. These operations do not expand an existing credential's grants. Public presentation and reviewed service selection require explicit website-content:read/write; write requires read, independently from services:* and provider resources. Existing provider metadata/activity/assignment additionally requires providers:read/write and a nonempty explicit current providerIds grant; write requires read. This grants no provider creation, deletion, login, invitation or schedule authority. WhatsApp template/profile management requires separate whatsapp-templates:read, whatsapp-templates:write, whatsapp-profile:read and whatsapp-profile:write application scopes. Write requires its matching read scope. These grants require explicit owner approval; Meta OAuth permissions remain separate.
Required application permissions
provider-booking-policy:readprovider-booking-policy:write
Requires the named provider resource. The version includes inherited business policy; a parent change invalidates a stale proposal.
Request
providerIdpath · stringRequiredExact provider UUID in the key current providerIds grant; businessSchedule/calendar grants do not substitute.
Format and constraints
{ "type": "string", "format": "uuid" }If-Matchheader · stringRequiredExact quoted ETag from the selected duration-policy resource. Opaque; do not use schedule/calendar versions, wildcards or weak validators.
Format and constraints
{ "type": "string", "pattern": "^\"(?:bp:[0-9a-f-]{36}:(?:0|[1-9][0-9]{0,18})|dp:[0-9a-f-]{36}:[0-9a-f]{64})\"$" }
Request body · required
application/json · ProviderDurationPolicyPreviewRequest
-
proposalobjectRequiredEdited provider hours/duration only. No provider metadata, service links, tenant, activity or calendar grant fields.
minProperties:1View nested fields
-
openingHoursunspecifiedOptionalStored provider weekly hours. null inherits current business hours. An edited non-null value is a complete WeeklyHours object; omit unchanged legacy JSON.
-
slotDurationMinutesinteger | nullOptionalStored provider duration override. null means inheritance, not a copied business value. An explicit value equal to the business duration remains an override. Changed values use supportedValues.
minimum:-2147483648maximum:2147483647 -
additionalPropertiesno value allowedSchema rule
-
-
additionalPropertiesno value allowedSchema rule
Complete schema and nested fields
{
"type": "object",
"additionalProperties": false,
"properties": {
"proposal": {
"type": "object",
"additionalProperties": false,
"properties": {
"openingHours": {
"description": "Stored provider weekly hours. null inherits current business hours. An edited non-null value is a complete WeeklyHours object; omit unchanged legacy JSON."
},
"slotDurationMinutes": {
"type": [
"integer",
"null"
],
"minimum": -2147483648,
"maximum": 2147483647,
"description": "Stored provider duration override. null means inheritance, not a copied business value. An explicit value equal to the business duration remains an override. Changed values use supportedValues."
}
},
"required": [],
"minProperties": 1,
"description": "Edited provider hours/duration only. No provider metadata, service links, tenant, activity or calendar grant fields."
}
},
"required": [
"proposal"
]
} Successful responses
200 · BusinessDurationPolicyProviderPreview
Success.
Cache-Control · Do not cache policy, preview or acceptance.
{
"type": "string",
"const": "no-store"
} application/json · BusinessDurationPolicyProviderPreview
-
previewIdstring · uuidRequired -
resourceIdstring · uuidRequired -
expectedVersionstringRequiredOpaque physical provider policy identity plus current dependencies. Business settings and service-link changes can invalidate it. Preserve exactly; it is not the provider resource UUID or a schedule/calendar version.
pattern:"^dp:[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}:[0-9a-f]{64}$" -
beforeobjectRequiredView nested fields
-
openingHoursunspecifiedRequiredStored provider weekly hours. null inherits current business hours. An edited non-null value is a complete WeeklyHours object; omit unchanged legacy JSON.
-
slotDurationMinutesinteger | nullRequiredStored provider duration override. null means inheritance, not a copied business value. An explicit value equal to the business duration remains an override. Changed values use supportedValues.
minimum:-2147483648maximum:2147483647 -
additionalPropertiesno value allowedSchema rule
-
-
afterobjectRequiredView nested fields
-
openingHoursunspecifiedRequiredStored provider weekly hours. null inherits current business hours. An edited non-null value is a complete WeeklyHours object; omit unchanged legacy JSON.
-
slotDurationMinutesinteger | nullRequiredStored provider duration override. null means inheritance, not a copied business value. An explicit value equal to the business duration remains an override. Changed values use supportedValues.
minimum:-2147483648maximum:2147483647 -
additionalPropertiesno value allowedSchema rule
-
-
effectiveMinutesBeforeinteger | nullRequiredminimum:-2147483648maximum:2147483647 -
effectiveMinutesAfterinteger | nullRequiredminimum:-2147483648maximum:2147483647 -
impactobjectRequiredAggregate counts only. No customer/appointment identities, physical versions or private fingerprint. Existing starts, prices, resource binding and accepted snapshots remain unchanged.
View nested fields
-
eligibleintegerRequiredFuture CONFIRMED/PENDING snapshot-null candidates in the selected resource scope. eligible = rewritable + conflict + unchanged.
minimum:0maximum:10000 -
rewritableintegerRequiredExact reviewed end changes passing accepted-start capacity/hours checks; atomic rewrite accepts at most 1,000 changes.
minimum:0maximum:10000 -
conflictintegerRequiredEligible intervals whose proposed end cannot safely change. They remain untouched.
minimum:0maximum:10000 -
protectedintegerRequiredAccepted snapshots and current service-specific durations remain protected; a business-wide rewrite also protects explicit provider duration overrides.
minimum:0maximum:10000 -
unchangedintegerRequiredEligible rows requiring no end change; no artificial revision is created.
minimum:0maximum:10000 -
additionalPropertiesno value allowedSchema rule
-
-
expiresAtstring · date-timeRequired -
editorBeforenullRequired -
editorAfternullRequired -
additionalPropertiesno value allowedSchema rule
Complete schema and nested fields
{
"type": "object",
"additionalProperties": false,
"properties": {
"previewId": {
"type": "string",
"format": "uuid"
},
"resourceId": {
"type": "string",
"format": "uuid"
},
"expectedVersion": {
"type": "string",
"pattern": "^dp:[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}:[0-9a-f]{64}$",
"description": "Opaque physical provider policy identity plus current dependencies. Business settings and service-link changes can invalidate it. Preserve exactly; it is not the provider resource UUID or a schedule/calendar version."
},
"before": {
"type": "object",
"additionalProperties": false,
"properties": {
"openingHours": {
"description": "Stored provider weekly hours. null inherits current business hours. An edited non-null value is a complete WeeklyHours object; omit unchanged legacy JSON."
},
"slotDurationMinutes": {
"type": [
"integer",
"null"
],
"minimum": -2147483648,
"maximum": 2147483647,
"description": "Stored provider duration override. null means inheritance, not a copied business value. An explicit value equal to the business duration remains an override. Changed values use supportedValues."
}
},
"required": [
"openingHours",
"slotDurationMinutes"
]
},
"after": {
"type": "object",
"additionalProperties": false,
"properties": {
"openingHours": {
"description": "Stored provider weekly hours. null inherits current business hours. An edited non-null value is a complete WeeklyHours object; omit unchanged legacy JSON."
},
"slotDurationMinutes": {
"type": [
"integer",
"null"
],
"minimum": -2147483648,
"maximum": 2147483647,
"description": "Stored provider duration override. null means inheritance, not a copied business value. An explicit value equal to the business duration remains an override. Changed values use supportedValues."
}
},
"required": [
"openingHours",
"slotDurationMinutes"
]
},
"effectiveMinutesBefore": {
"type": [
"integer",
"null"
],
"minimum": -2147483648,
"maximum": 2147483647
},
"effectiveMinutesAfter": {
"type": [
"integer",
"null"
],
"minimum": -2147483648,
"maximum": 2147483647
},
"impact": {
"type": "object",
"additionalProperties": false,
"properties": {
"eligible": {
"type": "integer",
"minimum": 0,
"maximum": 10000,
"description": "Future CONFIRMED/PENDING snapshot-null candidates in the selected resource scope. eligible = rewritable + conflict + unchanged."
},
"rewritable": {
"type": "integer",
"minimum": 0,
"maximum": 10000,
"description": "Exact reviewed end changes passing accepted-start capacity/hours checks; atomic rewrite accepts at most 1,000 changes."
},
"conflict": {
"type": "integer",
"minimum": 0,
"maximum": 10000,
"description": "Eligible intervals whose proposed end cannot safely change. They remain untouched."
},
"protected": {
"type": "integer",
"minimum": 0,
"maximum": 10000,
"description": "Accepted snapshots and current service-specific durations remain protected; a business-wide rewrite also protects explicit provider duration overrides."
},
"unchanged": {
"type": "integer",
"minimum": 0,
"maximum": 10000,
"description": "Eligible rows requiring no end change; no artificial revision is created."
}
},
"required": [
"eligible",
"rewritable",
"conflict",
"protected",
"unchanged"
],
"description": "Aggregate counts only. No customer/appointment identities, physical versions or private fingerprint. Existing starts, prices, resource binding and accepted snapshots remain unchanged."
},
"expiresAt": {
"type": "string",
"format": "date-time"
},
"editorBefore": {
"type": "null"
},
"editorAfter": {
"type": "null"
}
},
"required": [
"previewId",
"resourceId",
"expectedVersion",
"before",
"after",
"effectiveMinutesBefore",
"effectiveMinutesAfter",
"impact",
"expiresAt",
"editorBefore",
"editorAfter"
]
} Errors and recovery
Error responses declared in the contract (12)
The preview contract shares generic error definitions across operations. This list is not an exhaustive list of runtime errors.
401 · Missing, invalid or expired server credential.
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 · Current scope/tenant/owner-issued authority refused, revoked integration, platform suspension, or browser Origin.
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 · NOT_FOUND: no current resource belonging to the credential tenant.
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"
]
} 405 · Method not allowed.
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 · PREVIEW_EXPIRED, PREVIEW_MISMATCH, IMPACT_CHANGED, INVALID_SETTINGS, OPERATION_CONFLICT or POLICY_IMPACT_TOO_LARGE. POLICY_REWRITE_TOO_LARGE means over 1,000 actual changes: nothing is saved, and keep_existing may still use the unchanged preview if otherwise current. No partial acceptance.
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 · POLICY_CHANGED: current physical provider/business policy or inherited dependencies differ. Preserve the draft; read and explicitly review a new preview.
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"
]
} 413 · JSON request exceeds 8192 bytes.
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"
]
} 415 · Content-Type must be application/json.
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 · Malformed fields/precondition, unsupported changed value, INVALID_BOOKING_POLICY, INVALID_SCHEDULE or OVERNIGHT_SCHEDULE_UNSUPPORTED.
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 · Required If-Match or apply Idempotency-Key is missing.
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 · Request limit or POLICY_PREVIEW_LIMIT (at most 20 outstanding previews per actor/tenant). The latter uses Retry-After: 300; accepted operation receipts are separate.
Retry-After
{
"type": "integer",
"minimum": 1
} 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 · PERSISTENCE_FAILED or OUTCOME_UNCERTAIN. Retain the original UUID and exact body/mode/If-Match; recover before creating another intent.
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"
]
}