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

Review a date-only hours change or reset

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

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

POST/v1/management/schedules/{resource}/dates/{date}/change-previews

Behavior

Use the exact day read If-Match and a complete {dayHours}. An enabled day supplies same-day open/close and optional non-overlapping breaks; enabled:false closes it. null resets only this resource/date to its inherited hours. Review effectiveDayHours, affected appointments and expiry. The preview preserves existing bookings and sends no 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.

Business requires booking-policy:read and booking-policy:write. A provider requires provider-booking-policy:read and provider-booking-policy:write plus its explicit provider grant. Server key only; Origin is refused.

Request

  • resourcepath · oneOf (string | string)Required

    business or an explicitly granted provider UUID

    Format and constraints
    resource schema
    {
      "oneOf": [
        {
          "const": "business"
        },
        {
          "type": "string",
          "format": "uuid"
        }
      ]
    }
  • datepath · stringRequired
    Format and constraints
    date schema
    {
      "type": "string",
      "format": "date"
    }
  • If-Matchheader · stringRequired

    Exact strong quoted date version returned by the date read.

    Format and constraints
    If-Match schema
    {
      "type": "string",
      "pattern": "^\"ds:[a-f0-9]{64}\"$"
    }

Request body · required

application/json · DateScheduleProposal

  • dayHoursoneOf (object; allOf (unspecified) | null)Required

    Exactly one of these variants must match.

    View nested fields
    • oneOf 1object; allOf (unspecified)Schema branch

      All of these schema rules apply together.

      View branch fields and rules
      • enabledbooleanRequired in this branch
      • openstringOptional in this branch

        pattern: "^(?:[01][0-9]|2[0-3]):[0-5][0-9]$"

      • closestringOptional in this branch

        pattern: "^(?:[01][0-9]|2[0-3]):[0-5][0-9]$"

      • breaksarrayOptional in this branch

        maxItems: 10

        View nested fields
        • []objectArray item
          View nested fields
          • startstringRequired in this branch

            pattern: "^(?:[01][0-9]|2[0-3]):[0-5][0-9]$"

          • endstringRequired in this branch

            pattern: "^(?:[01][0-9]|2[0-3]):[0-5][0-9]$"

          • additionalPropertiesno value allowedSchema rule
      • allOf 1unspecifiedSchema branch
        View branch fields and rules
        • ifobjectSchema rule
          View branch fields and rules
          • enabledbooleanCondition predicate

            Value: true

        • thenunspecifiedSchema rule
          View branch fields and rules
          • openunspecifiedRequired in this branch

            Presence constraint in this rule; evaluate its enclosing condition or negation. The field’s type may be defined elsewhere.

          • closeunspecifiedRequired in this branch

            Presence constraint in this rule; evaluate its enclosing condition or negation. The field’s type may be defined elsewhere.

      • additionalPropertiesno value allowedSchema rule
    • oneOf 2nullSchema branch
  • additionalPropertiesno value allowedSchema rule
Complete schema and nested fields
JSON Schema
{
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "dayHours": {
      "oneOf": [
        {
          "type": "object",
          "additionalProperties": false,
          "properties": {
            "enabled": {
              "type": "boolean"
            },
            "open": {
              "type": "string",
              "pattern": "^(?:[01][0-9]|2[0-3]):[0-5][0-9]$"
            },
            "close": {
              "type": "string",
              "pattern": "^(?:[01][0-9]|2[0-3]):[0-5][0-9]$"
            },
            "breaks": {
              "type": "array",
              "items": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                  "start": {
                    "type": "string",
                    "pattern": "^(?:[01][0-9]|2[0-3]):[0-5][0-9]$"
                  },
                  "end": {
                    "type": "string",
                    "pattern": "^(?:[01][0-9]|2[0-3]):[0-5][0-9]$"
                  }
                },
                "required": [
                  "start",
                  "end"
                ]
              },
              "maxItems": 10
            }
          },
          "required": [
            "enabled"
          ],
          "allOf": [
            {
              "if": {
                "properties": {
                  "enabled": {
                    "const": true
                  }
                }
              },
              "then": {
                "required": [
                  "open",
                  "close"
                ]
              }
            }
          ]
        },
        {
          "type": "null"
        }
      ]
    }
  },
  "required": [
    "dayHours"
  ]
}

Successful responses

200 · DateSchedulePreview

Validated result. Existing appointments are preserved.

application/json · DateSchedulePreview

  • previewIdstring · uuidRequired
  • resourceIdoneOf (string | string)Required

    Exactly one of these variants must match.

    View nested fields
    • oneOf 1stringSchema branch

      Value: "business"

    • oneOf 2string · uuidSchema branch
  • datestring · dateRequired
  • expectedVersionstringRequired

    pattern: "^ds:[a-f0-9]{64}$"

  • dayHoursoneOf (object; allOf (unspecified) | null)Required

    Exactly one of these variants must match.

    View nested fields
    • oneOf 1object; allOf (unspecified)Schema branch

      All of these schema rules apply together.

      View branch fields and rules
      • enabledbooleanRequired in this branch
      • openstringOptional in this branch

        pattern: "^(?:[01][0-9]|2[0-3]):[0-5][0-9]$"

      • closestringOptional in this branch

        pattern: "^(?:[01][0-9]|2[0-3]):[0-5][0-9]$"

      • breaksarrayOptional in this branch

        maxItems: 10

        View nested fields
        • []objectArray item
          View nested fields
          • startstringRequired in this branch

            pattern: "^(?:[01][0-9]|2[0-3]):[0-5][0-9]$"

          • endstringRequired in this branch

            pattern: "^(?:[01][0-9]|2[0-3]):[0-5][0-9]$"

          • additionalPropertiesno value allowedSchema rule
      • allOf 1unspecifiedSchema branch
        View branch fields and rules
        • ifobjectSchema rule
          View branch fields and rules
          • enabledbooleanCondition predicate

            Value: true

        • thenunspecifiedSchema rule
          View branch fields and rules
          • openunspecifiedRequired in this branch

            Presence constraint in this rule; evaluate its enclosing condition or negation. The field’s type may be defined elsewhere.

          • closeunspecifiedRequired in this branch

            Presence constraint in this rule; evaluate its enclosing condition or negation. The field’s type may be defined elsewhere.

      • additionalPropertiesno value allowedSchema rule
    • oneOf 2nullSchema branch
  • affectedAppointmentsarrayRequired
    View nested fields
    • []objectArray item
      View nested fields
      • appointmentIdstring · uuidRequired
      • startAtstring · date-timeRequired
      • endAtstring · date-timeRequired
      • additionalPropertiesno value allowedSchema rule
  • affectedCountintegerRequired

    minimum: 0

  • expiresAtstring · date-timeRequired
  • existingAppointmentsPreservedbooleanRequired

    Value: true

  • effectiveDayHoursobject; allOf (unspecified)Required

    All of these schema rules apply together.

    View nested fields
    • enabledbooleanRequired
    • openstringOptional

      pattern: "^(?:[01][0-9]|2[0-3]):[0-5][0-9]$"

    • closestringOptional

      pattern: "^(?:[01][0-9]|2[0-3]):[0-5][0-9]$"

    • breaksarrayOptional

      maxItems: 10

      View nested fields
      • []objectArray item
        View nested fields
        • startstringRequired

          pattern: "^(?:[01][0-9]|2[0-3]):[0-5][0-9]$"

        • endstringRequired

          pattern: "^(?:[01][0-9]|2[0-3]):[0-5][0-9]$"

        • additionalPropertiesno value allowedSchema rule
    • allOf 1unspecifiedSchema branch
      View branch fields and rules
      • ifobjectSchema rule
        View branch fields and rules
        • enabledbooleanCondition predicate

          Value: true

      • thenunspecifiedSchema rule
        View branch fields and rules
        • openunspecifiedRequired in this branch

          Presence constraint in this rule; evaluate its enclosing condition or negation. The field’s type may be defined elsewhere.

        • closeunspecifiedRequired in this branch

          Presence constraint in this rule; evaluate its enclosing condition or negation. The field’s type may be defined elsewhere.

    • additionalPropertiesno value allowedSchema rule
  • additionalPropertiesno value allowedSchema rule
Complete schema and nested fields
JSON Schema
{
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "previewId": {
      "type": "string",
      "format": "uuid"
    },
    "resourceId": {
      "oneOf": [
        {
          "const": "business"
        },
        {
          "type": "string",
          "format": "uuid"
        }
      ]
    },
    "date": {
      "type": "string",
      "format": "date"
    },
    "expectedVersion": {
      "type": "string",
      "pattern": "^ds:[a-f0-9]{64}$"
    },
    "dayHours": {
      "oneOf": [
        {
          "type": "object",
          "additionalProperties": false,
          "properties": {
            "enabled": {
              "type": "boolean"
            },
            "open": {
              "type": "string",
              "pattern": "^(?:[01][0-9]|2[0-3]):[0-5][0-9]$"
            },
            "close": {
              "type": "string",
              "pattern": "^(?:[01][0-9]|2[0-3]):[0-5][0-9]$"
            },
            "breaks": {
              "type": "array",
              "items": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                  "start": {
                    "type": "string",
                    "pattern": "^(?:[01][0-9]|2[0-3]):[0-5][0-9]$"
                  },
                  "end": {
                    "type": "string",
                    "pattern": "^(?:[01][0-9]|2[0-3]):[0-5][0-9]$"
                  }
                },
                "required": [
                  "start",
                  "end"
                ]
              },
              "maxItems": 10
            }
          },
          "required": [
            "enabled"
          ],
          "allOf": [
            {
              "if": {
                "properties": {
                  "enabled": {
                    "const": true
                  }
                }
              },
              "then": {
                "required": [
                  "open",
                  "close"
                ]
              }
            }
          ]
        },
        {
          "type": "null"
        }
      ]
    },
    "affectedAppointments": {
      "type": "array",
      "items": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "appointmentId": {
            "type": "string",
            "format": "uuid"
          },
          "startAt": {
            "type": "string",
            "format": "date-time"
          },
          "endAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "appointmentId",
          "startAt",
          "endAt"
        ]
      }
    },
    "affectedCount": {
      "type": "integer",
      "minimum": 0
    },
    "expiresAt": {
      "type": "string",
      "format": "date-time"
    },
    "existingAppointmentsPreserved": {
      "const": true
    },
    "effectiveDayHours": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "enabled": {
          "type": "boolean"
        },
        "open": {
          "type": "string",
          "pattern": "^(?:[01][0-9]|2[0-3]):[0-5][0-9]$"
        },
        "close": {
          "type": "string",
          "pattern": "^(?:[01][0-9]|2[0-3]):[0-5][0-9]$"
        },
        "breaks": {
          "type": "array",
          "items": {
            "type": "object",
            "additionalProperties": false,
            "properties": {
              "start": {
                "type": "string",
                "pattern": "^(?:[01][0-9]|2[0-3]):[0-5][0-9]$"
              },
              "end": {
                "type": "string",
                "pattern": "^(?:[01][0-9]|2[0-3]):[0-5][0-9]$"
              }
            },
            "required": [
              "start",
              "end"
            ]
          },
          "maxItems": 10
        }
      },
      "required": [
        "enabled"
      ],
      "allOf": [
        {
          "if": {
            "properties": {
              "enabled": {
                "const": true
              }
            }
          },
          "then": {
            "required": [
              "open",
              "close"
            ]
          }
        }
      ]
    }
  },
  "required": [
    "previewId",
    "resourceId",
    "date",
    "expectedVersion",
    "dayHours",
    "affectedAppointments",
    "affectedCount",
    "expiresAt",
    "existingAppointmentsPreserved",
    "effectiveDayHours"
  ]
}

Errors and recovery

Input validation

  • 413REQUEST_TOO_LARGE

    The JSON request body exceeds 8,192 bytes.

  • 415JSON_REQUIRED

    Send Content-Type: application/json.

Error responses declared in the contract (10)

The preview contract shares generic error definitions across operations. This list is not an exhaustive list of runtime errors.

401 · Structured refusal.

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 · Structured refusal.

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 · Structured refusal.

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 · Structured refusal.

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"
  ]
}
410 · Structured refusal.

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 · Structured refusal.

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 · Structured refusal.

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 · Structured refusal.

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 · Structured refusal.

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 · Transient/uncertain result; retain the original 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"
  ]
}