Request the provider resources you need
Call these Management operations from your backend. Reading requires providers:read. Editing and operation recovery require both providers:read and providers:write. The provider must also appear in the credential’s current providerIds; neither businessSchedule nor calendar or policy scopes grant these permissions. Existing keys gain nothing automatically.
Check installed providersRead/providersWrite support and the key’s actual scopes and resources separately. The list includes granted inactive providers and is complete up to 1,000 items; a larger result returns PROVIDER_LIST_TOO_LARGE instead of a truncated editable list. This development contract does not attest deployment or activation.
Provider metadata operations edit existing providers only. Provider-record creation, deletion, reordering and existing password changes are outside this contract. A separate, explicit login permission is described below. A provider contact phone or email does not prove customer identity or connect WhatsApp.
Synchronize only the providers the owner selected
Request providers:read and providers:sync plus explicit providerIds. Check installed providerSync support separately. An inactive selected provider remains readable; another provider is never added automatically. Business schedule or calendar access does not widen this feed.
Start provider-snapshots with {}, then read provider-changes using the returned cursor until membership is complete. Apply providerId, current details, contact information, activity, assignment and displayOrder. Preserve website-owned fields separately. Working hours and duration policy still use their own read APIs and permissions.
Stage membership until kind:snapshot has hasMore:false. While a snapshot page has hasMore:true, save nextCursor for paging but do not ACK it. The final snapshot page’s nextCursor starts changes and is ACKable. Every kind:changes page’s nextCursor is ACKable after applying that page, even when hasMore:true or events is empty. Commit applied data, nextCursor and a pending ACK UUID together; after a lost ACK response, repeat that exact UUID/cursor. Inspect bootstrapRequired/currentProjectionEpoch; stale authorization or retention requires rebuilding the current permitted projection.
A snapshot member with removed:true or a changes event with current:null means remove or hide only that provider’s CRAD projection, preserving website-owned fields. Snapshot membership can be deleted while paging. A non-null current remains authoritative even if an older event has type:removed.
Metadata signals include dependency changes affecting the current provider view. They are not historical field values; event type or an old ETag cannot override a newer hydrated current value. Service and provider feeds are independent. Read the current provider before editing and request current quote/availability before booking.
Save only the fields your staff changed
PATCH accepts a nonempty partial changes object containing name, email, phone, color, isActive and/or assignment. Omitted fields are preserved, including legacy values outside current input limits. A supplied name replaces all he/ar/en values and needs at least one nonblank value; each is limited to 200 Unicode characters. Email and phone accept null or up to 320 characters; empty trimmed values become null. Color accepts a string up to 320 characters.
Accepted appointment rows, times, terms, reminder and notice intent stay intact. Current provider labels can change where existing views resolve those labels. Provider hours, duration and inheritance use the separate duration-policy workflow and its own permissions.
Read the selected provider
Use the detail GET and preserve its complete quoted ETag. Its prv version contains a policy identity, which can differ from providerId. Do not rebuild or substitute identifiers inside the version.
Read an existing provider and displayed versionReview activity effects
Before changing isActive, show the corresponding activityEffects.activate or activityEffects.deactivate value. A managed_booking_unavailable or managed_booking_restored effect concerns the currently enabled managed booking policy; deactivation is not a universal stop for all legacy booking paths.
Persist the exact command
Save one operation UUID, the observed If-Match and the exact {changes} body before PATCH. Send the UUID as Idempotency-Key. A stale version returns PROVIDER_CHANGED (412): refresh and review the draft rather than silently adopting a newer version.
Update existing provider metadata, activity or service assignment
Choose all eligible services or an exact selection
assignment:{mode:"all"} removes explicit links. It means all services eligible under current booking rules, including future additions; it does not mean an empty selection. assignment:{mode:"selected",serviceIds:[...]} replaces the exact selected set with 1–1,000 distinct current business service IDs. Inactive current services may remain selected.
Retained provider-service links keep their custom price and duration overrides. Newly selected pairs use the existing defaults; deliberately removed pairs are deleted. Preserve selected IDs hidden by your own filter. Request services:read separately if your editor needs full catalogue labels; provider scopes do not grant catalogue access.
Provider PATCH permits up to 65,536 bytes of JSON so a complete 1,000-ID assignment fits. Send Content-Type: application/json. The larger limit belongs to this route, not every Management request.
Create a CRAD login for an existing provider
Use this only when the business owner wants an existing, unlinked provider to sign in to CRAD. It creates a password-based staff account with the fixed provider role and sends no invitation email or WhatsApp. It does not create a provider record, change an existing password, reuse an account by email or affect the website’s customer login.
Request provider-logins:write and providers:read, with the selected provider in the key’s providerIds. Check providerLoginsWrite for installed support separately from these grants. Keep the key on your backend. Read the provider and retain the complete quoted ETag before submitting email, password and optional fullName.
Persist the operation UUID and provider/version for recovery, never the password. Use them as Idempotency-Key and If-Match. Passwords remain in memory only: exclude them from browser storage, analytics, logs and retry queues. An explicit same-operation retry must repeat the exact original credentials.
Accepted has a receipt; pending is unresolved. After a timeout, check provider-login-operations/{operationId} without sending credentials. This read creates nothing and does not finish a pending operation. not_found does not cancel an earlier delayed request. If reviewRequired is true, request owner/operator review.
Only state:rejected is a definitive, recorded refusal permitting corrected credentials with a new operation and current provider version. The POST returns 422 for this result. A generic 422 error or pending cause:auth_request_rejected does not provide that guarantee. No raw Auth error or existing account identity is disclosed.
Let the owner finish initial business setup in CRAD
For an eligible new business, read GET /v1/management from your backend. If capabilities.ownerSetupContinuation is true, inspect ownerSetup. Open its non-null continuationUrl in a separate tab for the actual owner to sign in. Keep your Management key on your server; the URL contains only business context and grants no authority. Missing ownerSetup means this installation has not advertised the continuation.
The owner uses CRAD’s existing setup screen. Saving can configure one provider, services and the booking flow before WhatsApp is connected. Enabling the bot requires the owner’s explicit Enable bot or Save and enable bot action and a current readiness check. Plain Save, opening the link and checking a previous operation never enable it. No customer code, machine key or URL parameter can replace that owner authorization.
Refresh Management metadata when the owner returns. state records setup progress; botActive is the current bot switch. active with botActive:false can mean the bot was paused after initial activation. Do not repeat initial activation to undo that decision. The returned version describes setup progress; it is not a grant to call a new setup-write API.
not_available applies to legacy businesses and businesses that cannot use empty-business initial setup. Keep their existing management flow. A newly configured provider is never added to an existing key’s providerIds automatically; ask the owner to issue the appropriate explicit resource grant if the integration needs it.
| ownerSetup.state | Meaning | External website action |
|---|---|---|
| pending | Eligible initial setup has not been saved | Offer the owner continuation link |
| configured | Initial configuration was saved; the bot has not completed initial activation | Offer the same owner continuation, then refresh status |
| active | Initial activation was completed | Show current botActive separately; preserve later pauses |
| not_available | This initial-setup path is not applicable | Do not show a setup link or reset the business |
Recover the original provider edit
After an uncertain result, GET provider-operations/{operationId} using the original UUID. Recovery is read-only and requires current read/write scope authority for the same integration and the accepted provider resource. A currently authorized replacement key can recover an earlier operation.
receipt is immutable acceptance; current is freshly authorized state and may have a newer version. A genuinely removed provider can return current:null and currentUnavailableReason:provider_not_found while retaining the receipt. Lost authority is refused, not represented as a missing provider.
not_found does not cancel an in-flight request or prove it cannot commit. Keep the original UUID, body and If-Match for an explicit exact retry. Do not create a new UUID or silently rebase the draft after uncertainty. A reused UUID with a different request returns OPERATION_CONFLICT.