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

List business customers

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

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

GET/v1/management/customers

Behavior

Server only, with an owner-issued Management credential bound to one tenant/site/integration. The backend must authorize its administrator. Public intake, WhatsApp availability, customer phone verification and website customer mappings are not prerequisites. Existing contacts:record keys are not widened. Returns basic fields for canonical contacts, including unmapped/blocked contacts. Optional language/block filters and name/joined ordering use UUID tie breaks; this directory is not an immutable sync snapshot. The opaque cursor is bound to the integration and normalized filters/order, expires after 30 minutes and must not be reused with changed filters. Search names through POST /customers/search; do not put names or phone numbers in this query.

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

contacts:read

Request

  • languagequery · stringOptional
    Format and constraints
    language schema
    {
      "type": "string",
      "enum": [
        "he",
        "ar",
        "en"
      ]
    }
  • isBlockedquery · booleanOptional
    Format and constraints
    isBlocked schema
    {
      "type": "boolean"
    }
  • sortquery · stringOptional
    Format and constraints
    sort schema
    {
      "enum": [
        "name",
        "joined"
      ],
      "default": "name"
    }
  • cursorquery · stringOptional
    Format and constraints
    cursor schema
    {
      "type": "string",
      "format": "uuid"
    }
  • limitquery · integerOptional
    Format and constraints
    limit schema
    {
      "type": "integer",
      "minimum": 1,
      "maximum": 100,
      "default": 50
    }

Successful responses

200 · BusinessCustomerDirectory

Success.

application/json · BusinessCustomerDirectory

All of these schema rules apply together.

  • customersarrayRequired

    maxItems: 100

    View nested fields
    • []objectArray item

      Current basic canonical contact projection, including unmapped and blocked contacts. An unavailable stored name/phone/language is null with its fieldUnavailableReasons entry; source data is preserved. Notes, email, arbitrary custom data, consent, customer proof and booking history are absent.

      View nested fields
      • businessCustomerIdstring · uuidRequired
      • versionstringRequired

        Database-owned canonical customer revision. Read a current customer and its ETag before a basic or block command. Native and API edits share this revision; no-op writes do not increment it. It is not a customer-mapping version.

        pattern: "^c(0|[1-9][0-9]{0,18})$"

      • displayNamestring | nullRequired

        maxLength: 4096

      • phonestring | nullRequired

        pattern: "^\\+[1-9][0-9]{7,14}$"

      • languageanyOf (string | null)Required

        At least one of these variants must match.

        View nested fields
        • anyOf 1stringSchema branch

          Allowed values: ["he","ar","en"]

        • anyOf 2nullSchema branch
      • isBlockedbooleanRequired
      • createdAtstring · date-timeRequired
      • fieldUnavailableReasonsobjectRequired
        View nested fields
        • displayNamestringOptional

          Allowed values: ["too_large","invalid_stored_value"]

        • phonestringOptional

          Allowed values: ["too_large","invalid_stored_value"]

        • languagestringOptional

          Allowed values: ["too_large","invalid_stored_value"]

        • additionalPropertiesno value allowedSchema rule
      • additionalPropertiesno value allowedSchema rule
  • hasMorebooleanRequired
  • nextCursoranyOf (string | null)Required

    At least one of these variants must match.

    View nested fields
    • anyOf 1string · uuidSchema branch
    • anyOf 2nullSchema branch
  • allOf 1unspecifiedSchema branch
    View branch fields and rules
    • ifobjectSchema rule
      View branch fields and rules
      • hasMorebooleanCondition predicate

        Value: false

    • thenobjectSchema rule
      View branch fields and rules
      • nextCursornullOptional in this branch
    • elseobjectSchema rule
      View branch fields and rules
      • nextCursorstring · uuidOptional in this branch
  • additionalPropertiesno value allowedSchema rule
Complete schema and nested fields
JSON Schema
{
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "customers": {
      "type": "array",
      "maxItems": 100,
      "items": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "businessCustomerId": {
            "type": "string",
            "format": "uuid"
          },
          "version": {
            "type": "string",
            "pattern": "^c(0|[1-9][0-9]{0,18})$",
            "description": "Database-owned canonical customer revision. Read a current customer and its ETag before a basic or block command. Native and API edits share this revision; no-op writes do not increment it. It is not a customer-mapping version."
          },
          "displayName": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 4096
          },
          "phone": {
            "type": [
              "string",
              "null"
            ],
            "pattern": "^\\+[1-9][0-9]{7,14}$"
          },
          "language": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "he",
                  "ar",
                  "en"
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "isBlocked": {
            "type": "boolean"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "fieldUnavailableReasons": {
            "type": "object",
            "additionalProperties": false,
            "properties": {
              "displayName": {
                "enum": [
                  "too_large",
                  "invalid_stored_value"
                ]
              },
              "phone": {
                "enum": [
                  "too_large",
                  "invalid_stored_value"
                ]
              },
              "language": {
                "enum": [
                  "too_large",
                  "invalid_stored_value"
                ]
              }
            },
            "required": []
          }
        },
        "required": [
          "businessCustomerId",
          "version",
          "displayName",
          "phone",
          "language",
          "isBlocked",
          "createdAt",
          "fieldUnavailableReasons"
        ],
        "description": "Current basic canonical contact projection, including unmapped and blocked contacts. An unavailable stored name/phone/language is null with its fieldUnavailableReasons entry; source data is preserved. Notes, email, arbitrary custom data, consent, customer proof and booking history are absent."
      }
    },
    "hasMore": {
      "type": "boolean"
    },
    "nextCursor": {
      "anyOf": [
        {
          "type": "string",
          "format": "uuid"
        },
        {
          "type": "null"
        }
      ]
    }
  },
  "required": [
    "customers",
    "hasMore",
    "nextCursor"
  ],
  "allOf": [
    {
      "if": {
        "properties": {
          "hasMore": {
            "const": false
          }
        },
        "required": [
          "hasMore"
        ]
      },
      "then": {
        "properties": {
          "nextCursor": {
            "type": "null"
          }
        }
      },
      "else": {
        "properties": {
          "nextCursor": {
            "type": "string",
            "format": "uuid"
          }
        }
      }
    }
  ]
}

Errors and recovery

Error responses declared in the contract (7)

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

401 · Missing or 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, grant or authority denied; 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"
  ]
}
410 · Cursor expired, retained history unavailable or effective projection epoch changed. Bootstrap again.

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; no tenant/resource selector is accepted.

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/snapshot limit reached.

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 · Storage unavailable or outcome uncertain. Retain the original UUID and exact command to reconcile.

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