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

Review appointment terms

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

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

POST/v1/management/appointment-quotes

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. Prepare a server-owned five-minute quote for an existing canonical businessCustomerId, permitted provider and optional service. Omitted provider/service normalize to null; withRemoval defaults false. Service-duration businesses require a compatible treatment/provider. Ordinary businesses keep optional-service/fallback-duration behavior. Creating or registering the business contact is a separate operation. This does not reserve a slot or send a message.

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:readappointments:create

Request

Request body · required

application/json · BusinessCalendarQuoteRequest

  • businessCustomerIdstring · uuidRequired
  • providerIdanyOf (string | null)Optional

    At least one of these variants must match.

    View nested fields
    • anyOf 1string · uuidSchema branch
    • anyOf 2nullSchema branch
  • serviceIdanyOf (string | null)Optional

    At least one of these variants must match.

    View nested fields
    • anyOf 1string · uuidSchema branch
    • anyOf 2nullSchema branch
  • withRemovalbooleanOptional

    default: false

  • additionalPropertiesno value allowedSchema rule
Complete schema and nested fields
JSON Schema
{
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "businessCustomerId": {
      "type": "string",
      "format": "uuid"
    },
    "providerId": {
      "anyOf": [
        {
          "type": "string",
          "format": "uuid"
        },
        {
          "type": "null"
        }
      ]
    },
    "serviceId": {
      "anyOf": [
        {
          "type": "string",
          "format": "uuid"
        },
        {
          "type": "null"
        }
      ]
    },
    "withRemoval": {
      "type": "boolean",
      "default": false
    }
  },
  "required": [
    "businessCustomerId"
  ]
}

Successful responses

200 · BusinessCalendarQuote

Success.

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

application/json · BusinessCalendarQuote

All of these schema rules apply together.

  • businessCustomerIdstring · uuidRequired
  • providerIdanyOf (string | null)Required

    At least one of these variants must match.

    View nested fields
    • anyOf 1string · uuidSchema branch
    • anyOf 2nullSchema branch
  • serviceIdanyOf (string | null)Required

    At least one of these variants must match.

    View nested fields
    • anyOf 1string · uuidSchema branch
    • anyOf 2nullSchema branch
  • withRemovalbooleanRequired

    default: false

  • quoteVersionstring · uuidRequired
  • expiresAtstring · date-timeRequired
  • modestringRequired

    Allowed values: ["legacy_fixed_slot","service_duration"]

  • durationMinutesintegerRequired

    minimum: 1maximum: 1440

  • slotIntervalMinutesintegerRequired

    minimum: 1maximum: 1440

  • totalPriceMajoranyOf (number | null)Required

    At least one of these variants must match.

    View nested fields
    • anyOf 1numberSchema branch

      Stored major currency units; 120 means 120 units, not 1.20. Do not combine with customer booking minor-unit money fields.

      minimum: 0maximum: 9007199254740991

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

    At least one of these variants must match.

    View nested fields
    • anyOf 1stringSchema branch

      maxLength: 100minLength: 1

    • anyOf 2nullSchema branch
  • removalAvailablebooleanRequired
  • slotGridAnchorstringOptional

    Present only for accepted treatment-duration grids that restart at each scheduled work segment after a break. Absence preserves the existing day-opening anchor, including historical appointments. Use server-returned availability slots; do not infer the rule from duration, interval, or current business settings.

    Allowed values: ["segment_start"]

  • totalPriceRangeMajoranyOf (object | null)Optional

    Non-final inclusive price bounds in major currency units. Both finite bounds are required; min must be strictly below max and amounts have at most two decimal places. The companion exact amount is null. Omitted or null means no range, not a zero price. Accepted bounds are frozen and must not be recomputed from the current catalogue.

    At least one of these variants must match.

    View nested fields
    • anyOf 1objectSchema branch
      View branch fields and rules
      • minnumberRequired in this branch

        minimum: 0maximum: 90071992547409.9

      • maxnumberRequired in this branch

        minimum: 0maximum: 90071992547409.9

      • additionalPropertiesno value allowedSchema rule
    • anyOf 2nullSchema branch
  • allOf 1unspecifiedSchema branch
    View branch fields and rules
    • ifobjectSchema rule
      View branch fields and rules
      • totalPriceRangeMajorobjectCondition predicate
    • thenobjectSchema rule
      View branch fields and rules
      • totalPriceMajornullOptional in this branch
  • additionalPropertiesno value allowedSchema rule
Complete schema and nested fields
JSON Schema
{
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "businessCustomerId": {
      "type": "string",
      "format": "uuid"
    },
    "providerId": {
      "anyOf": [
        {
          "type": "string",
          "format": "uuid"
        },
        {
          "type": "null"
        }
      ]
    },
    "serviceId": {
      "anyOf": [
        {
          "type": "string",
          "format": "uuid"
        },
        {
          "type": "null"
        }
      ]
    },
    "withRemoval": {
      "type": "boolean",
      "default": false
    },
    "quoteVersion": {
      "type": "string",
      "format": "uuid"
    },
    "expiresAt": {
      "type": "string",
      "format": "date-time"
    },
    "mode": {
      "enum": [
        "legacy_fixed_slot",
        "service_duration"
      ]
    },
    "durationMinutes": {
      "type": "integer",
      "minimum": 1,
      "maximum": 1440
    },
    "slotIntervalMinutes": {
      "type": "integer",
      "minimum": 1,
      "maximum": 1440
    },
    "totalPriceMajor": {
      "anyOf": [
        {
          "type": "number",
          "minimum": 0,
          "maximum": 9007199254740991,
          "description": "Stored major currency units; 120 means 120 units, not 1.20. Do not combine with customer booking minor-unit money fields."
        },
        {
          "type": "null"
        }
      ]
    },
    "currency": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 100,
          "minLength": 1
        },
        {
          "type": "null"
        }
      ]
    },
    "removalAvailable": {
      "type": "boolean"
    },
    "slotGridAnchor": {
      "enum": [
        "segment_start"
      ],
      "description": "Present only for accepted treatment-duration grids that restart at each scheduled work segment after a break. Absence preserves the existing day-opening anchor, including historical appointments. Use server-returned availability slots; do not infer the rule from duration, interval, or current business settings."
    },
    "totalPriceRangeMajor": {
      "anyOf": [
        {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "min",
            "max"
          ],
          "properties": {
            "min": {
              "type": "number",
              "minimum": 0,
              "maximum": 90071992547409.9
            },
            "max": {
              "type": "number",
              "minimum": 0,
              "maximum": 90071992547409.9
            }
          }
        },
        {
          "type": "null"
        }
      ],
      "description": "Non-final inclusive price bounds in major currency units. Both finite bounds are required; min must be strictly below max and amounts have at most two decimal places. The companion exact amount is null. Omitted or null means no range, not a zero price. Accepted bounds are frozen and must not be recomputed from the current catalogue."
    }
  },
  "required": [
    "businessCustomerId",
    "providerId",
    "serviceId",
    "withRemoval",
    "quoteVersion",
    "expiresAt",
    "mode",
    "durationMinutes",
    "slotIntervalMinutes",
    "totalPriceMajor",
    "currency",
    "removalAvailable"
  ],
  "allOf": [
    {
      "if": {
        "required": [
          "totalPriceRangeMajor"
        ],
        "properties": {
          "totalPriceRangeMajor": {
            "type": "object"
          }
        }
      },
      "then": {
        "properties": {
          "totalPriceMajor": {
            "type": "null"
          }
        }
      }
    }
  ]
}

Errors and recovery

Error responses declared in the contract (9)

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"
  ]
}
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"
  ]
}
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"
  ]
}
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"
  ]
}