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

Find available business appointment times

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

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

POST/v1/management/appointment-availability

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. Return canonical start/end instants for the selected localDate in the business timezone, plus current quote terms. Use returned instants (including DST handling), never reinterpret the date in a browser timezone. Availability does not reserve capacity; create rechecks hours, blocks, resources, price and capacity atomically.

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 · BusinessCalendarAvailabilityRequest

  • 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

  • localDatestring · dateRequired
  • 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
    },
    "localDate": {
      "type": "string",
      "format": "date"
    }
  },
  "required": [
    "businessCustomerId",
    "localDate"
  ]
}

Successful responses

200 · BusinessCalendarAvailability

Success.

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

application/json · BusinessCalendarAvailability

  • localDatestring · dateRequired
  • timezonestringRequired

    maxLength: 100

  • quoteobject; allOf (unspecified)Required

    All of these schema rules apply together.

    View nested fields
    • 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
  • slotsarrayRequired

    maxItems: 1440

    View nested fields
    • []objectArray item
      View nested fields
      • startAtstring · date-timeRequired
      • endAtstring · date-timeRequired
      • additionalPropertiesno value allowedSchema rule
  • additionalPropertiesno value allowedSchema rule
Complete schema and nested fields
JSON Schema
{
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "localDate": {
      "type": "string",
      "format": "date"
    },
    "timezone": {
      "type": "string",
      "maxLength": 100
    },
    "quote": {
      "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"
              }
            }
          }
        }
      ]
    },
    "slots": {
      "type": "array",
      "items": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "startAt": {
            "type": "string",
            "format": "date-time"
          },
          "endAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "startAt",
          "endAt"
        ]
      },
      "maxItems": 1440
    }
  },
  "required": [
    "localDate",
    "timezone",
    "quote",
    "slots"
  ]
}

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