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

Retrieve notification status

Read notification and consent state for this verified booking

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

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

GET/v1/sites/{siteId}/bookings/{bookingId}/notifications

Behavior

Read current communication preferences and all notification entries for this verified booking. There may be multiple reminder entries when the configurable scheduler is enabled for the business. Those entries add optional offsetMinutes and scheduledAt (the same instant as dueAt); legacy projections may omit them. The default remains one two-hour reminder. Only CRAD super-admin and business settings control the allowance and timing; the customer cannot change them through booking or preference requests. An accepted booking is independent of delivery. Provider accepted is not delivered; unknown delivery must not trigger an automatic second send. This is a customer-session read, not a general business-admin notification feed. The contract describes support, not a claim that this scheduler has been deployed or enabled.

Authentication

CustomerSession

Credential rules

Opaque short-lived customer session, upgraded by CRAD phone proof; neither a website account nor a cookie grants this authority. A session created with a companion integration credential remains bound to that credential: every request rechecks its expiry and revocation. Omitting or replacing the companion header later does not rebind the session. Current phone proof is required where stated by the operation. After expiry, create a new session and explicitly verify the same phone and integration to recover a known request or booking; retain the original locators and never auto-confirm during recovery.

X-CRAD-Integration-Key (optional header): Optional companion backend credential for the same integration, server requests only; never send from a browser. Required to bind an externalCustomerId on registration.

If this customer session was created with a companion integration credential, that bound credential must still grant bookings:write:customer. Its current expiry/revocation is checked as well; an unrelated key sent later does not repair the session.

Request

  • siteIdpath · stringRequired
    Format and constraints
    siteId schema
    {
      "type": "string",
      "format": "uuid"
    }
  • bookingIdpath · stringRequired
    Format and constraints
    bookingId schema
    {
      "type": "string",
      "format": "uuid"
    }
  • X-CRAD-Integration-Keyheader · stringOptional

    Optional companion backend credential for the same integration, server requests only; never send from a browser. Required to bind an externalCustomerId on registration.

    Format and constraints
    X-CRAD-Integration-Key schema
    {
      "type": "string",
      "pattern": "^(?:wbi|wbm)_[a-f0-9]{64}$"
    }

Successful responses

200 · NotificationState

Authoritative result; notification acceptance is independent of booking success.

ETag · Strong quoted current communication-preference version, separate from the booking version. Use this complete value for If-Match when changing preferences.
ETag schema
{
  "type": "string",
  "pattern": "^\"n[1-9][0-9]*\"$"
}

application/json · NotificationState

  • bookingIdstring · uuidRequired
  • bookingVersionintegerRequired

    minimum: 1

  • preferencesobjectRequired
    View nested fields
    • versionintegerRequired

      minimum: 1

    • whatsappbooleanRequired
    • globallyBlockedbooleanRequired
    • globalVersionintegerRequired

      minimum: 0maximum: 9007199254740991

    • noticeVersionanyOf (string | null)Required

      At least one of these variants must match.

      View nested fields
      • anyOf 1stringSchema branch
      • anyOf 2nullSchema branch
    • additionalPropertiesno value allowedSchema rule
  • notificationsarrayRequired
    View nested fields
    • []objectArray item

      One logical notification. A booking can have multiple reminder entries with different offsetMinutes. The default is one reminder approximately two hours before the appointment; businesses explicitly enabled for configurable reminders may schedule up to their authorized limit of three. Confirmation, change and cancellation entries do not consume that reminder allowance. A changed appointment start has a separate allowance; returning to a previously used start does not replay an already attempted reminder. Availability depends on the deployed scheduler and the business configuration. Customer booking and communication-preference requests cannot change the business reminder limit or offsets. Businesses explicitly choose a 24-hour reminder (1440 minutes) through owner preview/apply; this is not a global default. Pending requests do not receive confirmed-appointment reminders. Proposal/rejection use separate approved templates and current opt-in.

      View nested fields
      • idstring · uuidRequired
      • purposestringRequired

        Allowed values: ["confirmation","change","cancellation","reminder","proposal","rejection"]

      • channelstringRequired

        Value: "whatsapp"

      • statestringRequired

        accepted is provider acceptance, not delivery. unknown is an uncertain send outcome and is not an instruction to resend. Notification failure does not undo an accepted appointment.

        Allowed values: ["not_requested","unavailable","scheduled","queued","accepted","delivered","failed","unknown","suppressed","expired"]

      • reasonanyOf (string | null)Required

        At least one of these variants must match.

        View nested fields
        • anyOf 1stringSchema branch
        • anyOf 2nullSchema branch
      • dueAtstring · date-timeRequired
      • offsetMinutesintegerOptional

        Reminder lead time in elapsed minutes, for example 1440, 480 or 60. Optional for compatibility with legacy projections; it does not indicate a customer-service messaging window.

        minimum: 60maximum: 10080multipleOf: 60

      • scheduledAtstring · date-timeOptional

        Same instant as dueAt for configurable reminder entries. Legacy projections may omit this additive field.

      • updatedAtstring · date-timeRequired
      • additionalPropertiesno value allowedSchema rule
  • additionalPropertiesno value allowedSchema rule
Complete schema and nested fields
JSON Schema
{
  "type": "object",
  "properties": {
    "bookingId": {
      "type": "string",
      "format": "uuid"
    },
    "bookingVersion": {
      "type": "integer",
      "minimum": 1
    },
    "preferences": {
      "type": "object",
      "properties": {
        "version": {
          "type": "integer",
          "minimum": 1
        },
        "whatsapp": {
          "type": "boolean"
        },
        "globallyBlocked": {
          "type": "boolean"
        },
        "globalVersion": {
          "type": "integer",
          "minimum": 0,
          "maximum": 9007199254740991
        },
        "noticeVersion": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "required": [
        "version",
        "whatsapp",
        "globallyBlocked",
        "globalVersion",
        "noticeVersion"
      ],
      "additionalProperties": false
    },
    "notifications": {
      "type": "array",
      "items": {
        "type": "object",
        "description": "One logical notification. A booking can have multiple reminder entries with different offsetMinutes. The default is one reminder approximately two hours before the appointment; businesses explicitly enabled for configurable reminders may schedule up to their authorized limit of three. Confirmation, change and cancellation entries do not consume that reminder allowance. A changed appointment start has a separate allowance; returning to a previously used start does not replay an already attempted reminder. Availability depends on the deployed scheduler and the business configuration. Customer booking and communication-preference requests cannot change the business reminder limit or offsets. Businesses explicitly choose a 24-hour reminder (1440 minutes) through owner preview/apply; this is not a global default. Pending requests do not receive confirmed-appointment reminders. Proposal/rejection use separate approved templates and current opt-in.",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "purpose": {
            "enum": [
              "confirmation",
              "change",
              "cancellation",
              "reminder",
              "proposal",
              "rejection"
            ]
          },
          "channel": {
            "const": "whatsapp"
          },
          "state": {
            "enum": [
              "not_requested",
              "unavailable",
              "scheduled",
              "queued",
              "accepted",
              "delivered",
              "failed",
              "unknown",
              "suppressed",
              "expired"
            ],
            "description": "accepted is provider acceptance, not delivery. unknown is an uncertain send outcome and is not an instruction to resend. Notification failure does not undo an accepted appointment."
          },
          "reason": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "dueAt": {
            "type": "string",
            "format": "date-time"
          },
          "offsetMinutes": {
            "type": "integer",
            "minimum": 60,
            "maximum": 10080,
            "multipleOf": 60,
            "description": "Reminder lead time in elapsed minutes, for example 1440, 480 or 60. Optional for compatibility with legacy projections; it does not indicate a customer-service messaging window."
          },
          "scheduledAt": {
            "type": "string",
            "format": "date-time",
            "description": "Same instant as dueAt for configurable reminder entries. Legacy projections may omit this additive field."
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "id",
          "purpose",
          "channel",
          "state",
          "reason",
          "dueAt",
          "updatedAt"
        ],
        "additionalProperties": false
      }
    }
  },
  "required": [
    "bookingId",
    "bookingVersion",
    "preferences",
    "notifications"
  ],
  "additionalProperties": false
}

Errors and recovery

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 failure. Keep the same operation key if outcome is uncertain.

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 failure. Keep the same operation key if outcome is uncertain.

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 failure. Keep the same operation key if outcome is uncertain.

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 failure. Keep the same operation key if outcome is uncertain.

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 failure. Keep the same operation key if outcome is uncertain.

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 failure. Keep the same operation key if outcome is uncertain.

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 failure. Keep the same operation key if outcome is uncertain.

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 failure. Keep the same operation key if outcome is uncertain.

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 failure. Keep the same operation key if outcome is uncertain.

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 · Structured failure. Keep the same operation key if outcome is uncertain.

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