CRADמפתחים
עברית

Review an appointment action

לפני שימוש חי — בדקו יכולות פרוסות, הרשאות ומוכנות של החיבור שלכם.

בדקו את היכולות הפרוסות, הרשאות המפתח ומוכנות העסק בסביבה שלכם. דוגמאות HTTP נלכדו בבדיקות מבודדות; הסימון local-unreleased שלהן אינו אומר שה־API אינו פועל, ואינו מאשר את החיבור שלכם. במסלול הלקוח מאמתים טלפון בתבנית WhatsApp שהעסק הגדיר; SMS אינו נתמך. רישום בידי אדמין מורשה הוא פעולה נפרדת ללא קוד.

POST/v1/management/appointments/{appointmentId}/action-previews

Behavior

Server only. Your backend authenticates its administrator and sends an owner-issued wbm_ key without an Origin header. Every call requires appointments:read plus the stated action scope and a CURRENT per-credential owner calendar grant. Scope issuance alone grants no appointment access. Provider grants never imply manager authority, unassigned access, customer data or notes. Public booking intake, customer OTP, bot/WhatsApp readiness and customer messaging consent are separate. Preview the exact cancellation, reschedule or propose_time action against the rendered If-Match. Approval with status:CONFIRMED goes directly to actions without previewVersion or notificationIntent; requesting an approval preview is unnecessary. Cancellation (including status:CANCELLED) and time-only reschedule require a five-minute preview plus explicit silent/request_notice. Rescheduling is manager-only and requires recognized accepted terms; it preserves provider/service/customer/duration/price, cancels the original physical row and creates a successor. Snapshot-null rescheduling and accepted-snapshot revival are unsupported. A preview sends nothing and reserves nothing. When applied to an approvalRequired PENDING request, status:CONFIRMED queues the booking confirmation (omit notificationIntent for this status), subject to booking consent, opt-outs and current sender/template checks. The website status-change handler must not enqueue a separate campaign, including on replay or delayed delivery. Cancellation declines the request and queues rejection. propose_time requires request_notice and previewVersion on apply, preserves PENDING and waits for customer agreement. A current unexpired offer blocks direct confirmation with PROPOSAL_AWAITS_CUSTOMER. Approval preserves the booking-scoped messaging choice and update language; it cannot supply missing consent or override language. Delivery is independent of booking success.

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

appointments:read

status/mark_missed/undo require appointments:status; cancel or status:CANCELLED require appointments:cancel; reschedule requires appointments:reschedule and business_manager role ceiling.

Request

  • appointmentIdpath · stringRequired
    Format and constraints
    appointmentId schema
    {
      "type": "string",
      "format": "uuid"
    }
  • If-Matchheader · stringRequired

    Quoted ETag of the physical appointment shown to the user. Never use websiteVersion, wildcard or weak ETags.

    Format and constraints
    If-Match schema
    {
      "type": "string",
      "pattern": "^\"a(?:0|[1-9][0-9]{0,18})\"$"
    }

Request body · required

application/json · BusinessCalendarActionPreviewRequest

Exactly one of these variants must match.

  • oneOf 1 · action = "status"objectSchema branch
    View branch fields and rules
    • actionstringRequired in this branch

      Value: "status"

    • statusstringRequired in this branch

      Allowed values: ["PENDING","CONFIRMED","NOW","COMPLETED","MISSED"]

    • additionalPropertiesno value allowedSchema rule
  • oneOf 2 · action = "status"objectSchema branch
    View branch fields and rules
    • actionstringRequired in this branch

      Value: "status"

    • statusstringRequired in this branch

      Value: "CANCELLED"

    • notificationIntentstringRequired in this branch

      Allowed values: ["silent","request_notice"]

    • additionalPropertiesno value allowedSchema rule
  • oneOf 3 · action = "mark_missed"objectSchema branch
    View branch fields and rules
    • actionstringRequired in this branch

      Value: "mark_missed"

    • additionalPropertiesno value allowedSchema rule
  • oneOf 4 · action = "cancel"objectSchema branch
    View branch fields and rules
    • actionstringRequired in this branch

      Value: "cancel"

    • notificationIntentstringRequired in this branch

      Allowed values: ["silent","request_notice"]

    • additionalPropertiesno value allowedSchema rule
  • oneOf 5 · action = "reschedule"objectSchema branch
    View branch fields and rules
    • actionstringRequired in this branch

      Value: "reschedule"

    • newStartAtstring · date-timeRequired in this branch
    • notificationIntentstringRequired in this branch

      Allowed values: ["silent","request_notice"]

    • additionalPropertiesno value allowedSchema rule
  • oneOf 6 · action = "undo"objectSchema branch
    View branch fields and rules
    • actionstringRequired in this branch

      Value: "undo"

    • undoOperationIdstring · uuidRequired in this branch
    • additionalPropertiesno value allowedSchema rule
  • oneOf 7 · action = "propose_time"objectSchema branch
    View branch fields and rules
    • actionstringRequired in this branch

      Value: "propose_time"

    • newStartAtstring · date-timeRequired in this branch
    • notificationIntentstringRequired in this branch

      Value: "request_notice"

    • additionalPropertiesno value allowedSchema rule
Complete schema and nested fields
JSON Schema
{
  "oneOf": [
    {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "action": {
          "const": "status"
        },
        "status": {
          "enum": [
            "PENDING",
            "CONFIRMED",
            "NOW",
            "COMPLETED",
            "MISSED"
          ]
        }
      },
      "required": [
        "action",
        "status"
      ]
    },
    {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "action": {
          "const": "status"
        },
        "status": {
          "const": "CANCELLED"
        },
        "notificationIntent": {
          "enum": [
            "silent",
            "request_notice"
          ]
        }
      },
      "required": [
        "action",
        "status",
        "notificationIntent"
      ]
    },
    {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "action": {
          "const": "mark_missed"
        }
      },
      "required": [
        "action"
      ]
    },
    {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "action": {
          "const": "cancel"
        },
        "notificationIntent": {
          "enum": [
            "silent",
            "request_notice"
          ]
        }
      },
      "required": [
        "action",
        "notificationIntent"
      ]
    },
    {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "action": {
          "const": "reschedule"
        },
        "newStartAt": {
          "type": "string",
          "format": "date-time"
        },
        "notificationIntent": {
          "enum": [
            "silent",
            "request_notice"
          ]
        }
      },
      "required": [
        "action",
        "newStartAt",
        "notificationIntent"
      ]
    },
    {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "action": {
          "const": "undo"
        },
        "undoOperationId": {
          "type": "string",
          "format": "uuid"
        }
      },
      "required": [
        "action",
        "undoOperationId"
      ]
    },
    {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "action": {
          "const": "propose_time"
        },
        "newStartAt": {
          "type": "string",
          "format": "date-time"
        },
        "notificationIntent": {
          "const": "request_notice"
        }
      },
      "required": [
        "action",
        "newStartAt",
        "notificationIntent"
      ]
    }
  ]
}

Successful responses

200 · BusinessCalendarPreview

Success.

Cache-Control · Contains no-store. Do not cache appointments, grants or receipts.
Cache-Control schema
{
  "type": "string",
  "const": "no-store"
}

application/json · BusinessCalendarPreview

  • previewVersionstring · uuidRequired
  • expiresAtstring · date-timeRequired
  • appointmentIdstring · uuidRequired
  • versionstringRequired

    Opaque physical appointment revision, a0 through a9223372036854775807. Preserve exactly; this is distinct from website lineage versions.

    pattern: "^a(?:0|[1-9][0-9]{0,18})$"

  • actionstringRequired

    Allowed values: ["status","mark_missed","cancel","reschedule","undo","propose_time"]

  • statusanyOf (string | null)Required

    At least one of these variants must match.

    View nested fields
    • anyOf 1stringSchema branch

      Allowed values: ["PENDING","CONFIRMED","NOW","COMPLETED","CANCELLED","MISSED"]

    • anyOf 2nullSchema branch
  • newStartAtanyOf (string | null)Required

    At least one of these variants must match.

    View nested fields
    • anyOf 1string · date-timeSchema branch
    • anyOf 2nullSchema branch
  • newEndAtanyOf (string | null)Required

    At least one of these variants must match.

    View nested fields
    • anyOf 1string · date-timeSchema branch
    • anyOf 2nullSchema branch
  • notificationIntentstringRequired

    Allowed values: ["silent","request_notice"]

  • notificationAvailabilitystringRequired

    Allowed values: ["available","unavailable","not_requested"]

  • additionalPropertiesno value allowedSchema rule
Complete schema and nested fields
JSON Schema
{
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "previewVersion": {
      "type": "string",
      "format": "uuid"
    },
    "expiresAt": {
      "type": "string",
      "format": "date-time"
    },
    "appointmentId": {
      "type": "string",
      "format": "uuid"
    },
    "version": {
      "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."
    },
    "action": {
      "enum": [
        "status",
        "mark_missed",
        "cancel",
        "reschedule",
        "undo",
        "propose_time"
      ]
    },
    "status": {
      "anyOf": [
        {
          "enum": [
            "PENDING",
            "CONFIRMED",
            "NOW",
            "COMPLETED",
            "CANCELLED",
            "MISSED"
          ]
        },
        {
          "type": "null"
        }
      ]
    },
    "newStartAt": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time"
        },
        {
          "type": "null"
        }
      ]
    },
    "newEndAt": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time"
        },
        {
          "type": "null"
        }
      ]
    },
    "notificationIntent": {
      "enum": [
        "silent",
        "request_notice"
      ]
    },
    "notificationAvailability": {
      "enum": [
        "available",
        "unavailable",
        "not_requested"
      ]
    }
  },
  "required": [
    "previewVersion",
    "expiresAt",
    "appointmentId",
    "version",
    "action",
    "status",
    "newStartAt",
    "newEndAt",
    "notificationIntent",
    "notificationAvailability"
  ]
}

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 Management bearer.

application/json · Error

  • errorobjectRequired
    View nested fields
    • codestringRequired
    • requestIdstring · uuidRequired
    • retryAfterintegerOptional

      minimum: 1

    • additionalPropertiesno value allowedSchema rule
  • additionalPropertiesno value allowedSchema rule
Complete schema and nested fields
JSON Schema
{
  "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, calendar grant or authority denied; a browser Origin is refused.

application/json · Error

  • errorobjectRequired
    View nested fields
    • codestringRequired
    • requestIdstring · uuidRequired
    • retryAfterintegerOptional

      minimum: 1

    • additionalPropertiesno value allowedSchema rule
  • additionalPropertiesno value allowedSchema rule
Complete schema and nested fields
JSON Schema
{
  "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 · Appointment is absent or not visible under the current grant.

application/json · Error

  • errorobjectRequired
    View nested fields
    • codestringRequired
    • requestIdstring · uuidRequired
    • retryAfterintegerOptional

      minimum: 1

    • additionalPropertiesno value allowedSchema rule
  • additionalPropertiesno value allowedSchema rule
Complete schema and nested fields
JSON Schema
{
  "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

  • errorobjectRequired
    View nested fields
    • codestringRequired
    • requestIdstring · uuidRequired
    • retryAfterintegerOptional

      minimum: 1

    • additionalPropertiesno value allowedSchema rule
  • additionalPropertiesno value allowedSchema rule
Complete schema and nested fields
JSON Schema
{
  "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 · Action, quote, slot, operation, projection or checkpoint conflict. No partial command.

application/json · Error

  • errorobjectRequired
    View nested fields
    • codestringRequired
    • requestIdstring · uuidRequired
    • retryAfterintegerOptional

      minimum: 1

    • additionalPropertiesno value allowedSchema rule
  • additionalPropertiesno value allowedSchema rule
Complete schema and nested fields
JSON Schema
{
  "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 · Rendered physical appointment version no longer matches. Re-read and review; do not automatically substitute the newer version.

application/json · Error

  • errorobjectRequired
    View nested fields
    • codestringRequired
    • requestIdstring · uuidRequired
    • retryAfterintegerOptional

      minimum: 1

    • additionalPropertiesno value allowedSchema rule
  • additionalPropertiesno value allowedSchema rule
Complete schema and nested fields
JSON Schema
{
  "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 · Bounded request body exceeded.

application/json · Error

  • errorobjectRequired
    View nested fields
    • codestringRequired
    • requestIdstring · uuidRequired
    • retryAfterintegerOptional

      minimum: 1

    • additionalPropertiesno value allowedSchema rule
  • additionalPropertiesno value allowedSchema rule
Complete schema and nested fields
JSON Schema
{
  "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 · JSON content type required.

application/json · Error

  • errorobjectRequired
    View nested fields
    • codestringRequired
    • requestIdstring · uuidRequired
    • retryAfterintegerOptional

      minimum: 1

    • additionalPropertiesno value allowedSchema rule
  • additionalPropertiesno value allowedSchema rule
Complete schema and nested fields
JSON Schema
{
  "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 or unsupported request, including caller-supplied authority or price.

application/json · Error

  • errorobjectRequired
    View nested fields
    • codestringRequired
    • requestIdstring · uuidRequired
    • retryAfterintegerOptional

      minimum: 1

    • additionalPropertiesno value allowedSchema rule
  • additionalPropertiesno value allowedSchema rule
Complete schema and nested fields
JSON Schema
{
  "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 Idempotency-Key or quoted If-Match is absent.

application/json · Error

  • errorobjectRequired
    View nested fields
    • codestringRequired
    • requestIdstring · uuidRequired
    • retryAfterintegerOptional

      minimum: 1

    • additionalPropertiesno value allowedSchema rule
  • additionalPropertiesno value allowedSchema rule
Complete schema and nested fields
JSON Schema
{
  "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 · Machine request, directory cursor or snapshot limit exceeded.

application/json · Error

  • errorobjectRequired
    View nested fields
    • codestringRequired
    • requestIdstring · uuidRequired
    • retryAfterintegerOptional

      minimum: 1

    • additionalPropertiesno value allowedSchema rule
  • additionalPropertiesno value allowedSchema rule
Complete schema and nested fields
JSON Schema
{
  "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 unavailable or outcome uncertain. Retain the original UUID/body and recover it before any new operation.

application/json · Error

  • errorobjectRequired
    View nested fields
    • codestringRequired
    • requestIdstring · uuidRequired
    • retryAfterintegerOptional

      minimum: 1

    • additionalPropertiesno value allowedSchema rule
  • additionalPropertiesno value allowedSchema rule
Complete schema and nested fields
JSON Schema
{
  "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"
  ]
}