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

Read provider duration inheritance

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

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

GET/v1/management/duration-policy/providers/{providerId}

Behavior

Read this provider’s duration and hours, their effective values and the inherited business policy. A null override inherits the business value; an explicit equal value remains an override. Retain the quoted ETag unchanged: its policy identity is distinct from providerId.

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

provider-booking-policy:read

This provider UUID must appear in the key’s providerIds. Business schedule authority alone is insufficient.

Request

  • providerIdpath · stringRequired

    Exact provider UUID in the key current providerIds grant; businessSchedule/calendar grants do not substitute.

    Format and constraints
    providerId schema
    {
      "type": "string",
      "format": "uuid"
    }

Successful responses

200 · BusinessDurationPolicyProviderState

Success.

Cache-Control · Do not cache policy, preview or acceptance.
Cache-Control schema
{
  "type": "string",
  "const": "no-store"
}
ETag · Exact quoted current resource version; absent if accepted current resource is unavailable.
ETag schema
{
  "type": "string"
}

application/json · BusinessDurationPolicyProviderState

  • resourceIdstring · uuidRequired
  • versionstringRequired

    Opaque physical provider policy identity plus current dependencies. Business settings and service-link changes can invalidate it. Preserve exactly; it is not the provider resource UUID or a schedule/calendar version.

    pattern: "^dp:[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}:[0-9a-f]{64}$"

  • policyobjectRequired
    View nested fields
    • openingHoursunspecifiedRequired

      Stored provider weekly hours. null inherits current business hours. An edited non-null value is a complete WeeklyHours object; omit unchanged legacy JSON.

    • slotDurationMinutesinteger | nullRequired

      Stored provider duration override. null means inheritance, not a copied business value. An explicit value equal to the business duration remains an override. Changed values use supportedValues.

      minimum: -2147483648maximum: 2147483647

    • additionalPropertiesno value allowedSchema rule
  • effectiveMinutesinteger | nullRequired

    minimum: -2147483648maximum: 2147483647

  • effectiveOpeningHoursunspecifiedRequired

    Current effective stored weekly hours; provider null resolves to the business value.

  • timezonestring | nullRequired

    maxLength: 256

  • editornullRequired
  • parentPolicyobjectRequired
    View nested fields
    • openingHoursunspecifiedRequired

      Stored provider weekly hours. null inherits current business hours. An edited non-null value is a complete WeeklyHours object; omit unchanged legacy JSON.

    • slotDurationMinutesinteger | nullRequired

      Stored provider duration override. null means inheritance, not a copied business value. An explicit value equal to the business duration remains an override. Changed values use supportedValues.

      minimum: -2147483648maximum: 2147483647

    • additionalPropertiesno value allowedSchema rule
  • supportedValuesobjectRequired
    View nested fields
    • timezonearrayRequired

      minItems: 1maxItems: 100uniqueItems: true

      View nested fields
      • []stringArray item

        maxLength: 256

    • slotDurationMinutesarrayRequired

      minItems: 1maxItems: 100uniqueItems: true

      View nested fields
      • []integerArray item
    • minBookingNoticeMinutesarrayRequired

      minItems: 1maxItems: 100uniqueItems: true

      View nested fields
      • []integerArray item
    • minCancelNoticeMinutesarrayRequired

      minItems: 1maxItems: 100uniqueItems: true

      View nested fields
      • []integerArray item
    • bookingHorizonDaysarrayOptional

      Supported customer booking windows; use the current returned menu for an edited value. Absent on older deployments.

      View nested fields
      • []integerArray item

        Allowed values: [14,30,60,90]

    • additionalPropertiesno value allowedSchema rule
  • additionalPropertiesno value allowedSchema rule
Complete schema and nested fields
JSON Schema
{
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "resourceId": {
      "type": "string",
      "format": "uuid"
    },
    "version": {
      "type": "string",
      "pattern": "^dp:[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}:[0-9a-f]{64}$",
      "description": "Opaque physical provider policy identity plus current dependencies. Business settings and service-link changes can invalidate it. Preserve exactly; it is not the provider resource UUID or a schedule/calendar version."
    },
    "policy": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "openingHours": {
          "description": "Stored provider weekly hours. null inherits current business hours. An edited non-null value is a complete WeeklyHours object; omit unchanged legacy JSON."
        },
        "slotDurationMinutes": {
          "type": [
            "integer",
            "null"
          ],
          "minimum": -2147483648,
          "maximum": 2147483647,
          "description": "Stored provider duration override. null means inheritance, not a copied business value. An explicit value equal to the business duration remains an override. Changed values use supportedValues."
        }
      },
      "required": [
        "openingHours",
        "slotDurationMinutes"
      ]
    },
    "effectiveMinutes": {
      "type": [
        "integer",
        "null"
      ],
      "minimum": -2147483648,
      "maximum": 2147483647
    },
    "effectiveOpeningHours": {
      "description": "Current effective stored weekly hours; provider null resolves to the business value."
    },
    "timezone": {
      "type": [
        "string",
        "null"
      ],
      "maxLength": 256
    },
    "editor": {
      "type": "null"
    },
    "parentPolicy": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "openingHours": {
          "description": "Stored provider weekly hours. null inherits current business hours. An edited non-null value is a complete WeeklyHours object; omit unchanged legacy JSON."
        },
        "slotDurationMinutes": {
          "type": [
            "integer",
            "null"
          ],
          "minimum": -2147483648,
          "maximum": 2147483647,
          "description": "Stored provider duration override. null means inheritance, not a copied business value. An explicit value equal to the business duration remains an override. Changed values use supportedValues."
        }
      },
      "required": [
        "openingHours",
        "slotDurationMinutes"
      ]
    },
    "supportedValues": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "timezone": {
          "type": "array",
          "minItems": 1,
          "maxItems": 100,
          "uniqueItems": true,
          "items": {
            "type": "string",
            "maxLength": 256
          }
        },
        "slotDurationMinutes": {
          "type": "array",
          "minItems": 1,
          "maxItems": 100,
          "uniqueItems": true,
          "items": {
            "type": "integer"
          }
        },
        "minBookingNoticeMinutes": {
          "type": "array",
          "minItems": 1,
          "maxItems": 100,
          "uniqueItems": true,
          "items": {
            "type": "integer"
          }
        },
        "minCancelNoticeMinutes": {
          "type": "array",
          "minItems": 1,
          "maxItems": 100,
          "uniqueItems": true,
          "items": {
            "type": "integer"
          }
        },
        "bookingHorizonDays": {
          "type": "array",
          "items": {
            "type": "integer",
            "enum": [
              14,
              30,
              60,
              90
            ]
          },
          "description": "Supported customer booking windows; use the current returned menu for an edited value. Absent on older deployments."
        }
      },
      "required": [
        "timezone",
        "slotDurationMinutes",
        "minBookingNoticeMinutes",
        "minCancelNoticeMinutes"
      ]
    }
  },
  "required": [
    "resourceId",
    "version",
    "policy",
    "effectiveMinutes",
    "effectiveOpeningHours",
    "timezone",
    "editor",
    "parentPolicy",
    "supportedValues"
  ]
}

Errors and recovery

Error responses declared in the contract (8)

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

401 · Missing, invalid or expired server credential.

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/tenant/owner-issued authority refused, revoked integration, platform suspension, or browser Origin.

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 · NOT_FOUND: no current resource belonging to the credential tenant.

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 · PREVIEW_EXPIRED, PREVIEW_MISMATCH, IMPACT_CHANGED, INVALID_SETTINGS, OPERATION_CONFLICT or POLICY_IMPACT_TOO_LARGE. POLICY_REWRITE_TOO_LARGE means over 1,000 actual changes: nothing is saved, and keep_existing may still use the unchanged preview if otherwise current. No partial acceptance.

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 fields/precondition, unsupported changed value, INVALID_BOOKING_POLICY, INVALID_SCHEDULE or OVERNIGHT_SCHEDULE_UNSUPPORTED.

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 · Request limit or POLICY_PREVIEW_LIMIT (at most 20 outstanding previews per actor/tenant). The latter uses Retry-After: 300; accepted operation receipts are separate.
Retry-After
Retry-After schema
{
  "type": "integer",
  "minimum": 1
}

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_FAILED or OUTCOME_UNCERTAIN. Retain the original UUID and exact body/mode/If-Match; recover before creating another intent.

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