CRADالمطوّرون
العربية

Register a verified customer

Register integration-origin customer with verified phone

قبل الاستخدام الفعلي — افحص القدرات المنشورة والصلاحيات وجاهزية ربطك.

تحقّق من القدرات المنشورة وصلاحيات المفتاح وجاهزية النشاط في بيئتك. أمثلة HTTP مسجّلة من اختبارات معزولة؛ وصفها local-unreleased لا يعني أن API غير عامل ولا يُثبت جاهزية ربطك. في مسار العميل يُتحقق من الهاتف بقالب واتساب أعدّه النشاط؛ SMS غير مدعوم. التسجيل بواسطة مسؤول مخوّل عملية منفصلة دون رمز.

POST/v1/sites/{siteId}/customers

Behavior

Local candidate: after migration 20261011141147 is deployed, a fresh phone-verified registration for an active mapping saves the submitted language for future messages. Explain this before submission. The canonical name and private fields are preserved; detached mappings and exact operation replays do not change the preference. Direct guest booking without registration keeps an existing profile preference and captures its own booking language. Previously accepted message content is unchanged.

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): Backend only, with customers:write for the same site and integration. Required when externalCustomerId is supplied OR when the customer session was created with a companion credential. Do not omit this header merely because the session already stores its original credential binding; never send it from a browser.

Current customer phone proof is required. A supplied companion integration credential must include customers:write. If this session was created with a companion key, send a valid customers:write companion again for registration, even without externalCustomerId. Binding externalCustomerId also requires that server-side credential and an account identity authorized by your backend. Registration is not account login or messaging consent.

Request

Idempotency and recovery

Persist one UUID and the exact request before sending. After an uncertain result, retain that UUID, body and preconditions; do not create a replacement operation just to retry.

  • siteIdpath · stringRequired
    Format and constraints
    siteId schema
    {
      "type": "string",
      "format": "uuid"
    }
  • Idempotency-Keyheader · stringRequired

    Reuse the identical UUID for an unknown result. Booking commit must use operationId returned by the persisted intent.

    Format and constraints
    Idempotency-Key schema
    {
      "type": "string",
      "format": "uuid"
    }
  • X-CRAD-Integration-Keyheader · stringOptional

    Backend only, with customers:write for the same site and integration. Required when externalCustomerId is supplied OR when the customer session was created with a companion credential. Do not omit this header merely because the session already stores its original credential binding; never send it from a browser.

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

Request body · required

application/json

  • displayNamestringRequired

    minLength: 1maxLength: 100

  • languagestringRequired

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

  • externalCustomerIdstringOptional

    minLength: 1maxLength: 120

  • additionalPropertiesno value allowedSchema rule
Complete schema and nested fields
JSON Schema
{
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "displayName": {
      "type": "string",
      "minLength": 1,
      "maxLength": 100
    },
    "language": {
      "type": "string",
      "enum": [
        "he",
        "ar",
        "en"
      ]
    },
    "externalCustomerId": {
      "type": "string",
      "minLength": 1,
      "maxLength": 120
    }
  },
  "required": [
    "displayName",
    "language"
  ]
}

Successful responses

200 · CustomerResult

Exact idempotent replay of the authoritative original receipt.

application/json · CustomerResult

  • customerobject; allOf (unspecified)Required

    All of these schema rules apply together.

    View nested fields
    • customerIdstring · uuidRequired
    • externalCustomerIdanyOf (string | null)Required

      At least one of these variants must match.

      View nested fields
      • anyOf 1stringSchema branch
      • anyOf 2nullSchema branch
    • statusstringRequired

      Allowed values: ["active","detached"]

    • versionintegerRequired

      minimum: 1

    • displayNameanyOf (string | null)Optional

      At least one of these variants must match.

      View nested fields
      • anyOf 1stringSchema branch
      • anyOf 2nullSchema branch
    • languageanyOf (string | null)Optional

      At least one of these variants must match.

      View nested fields
      • anyOf 1stringSchema branch

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

      • anyOf 2nullSchema branch
    • phonestringOptional

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

    • fieldSourcesobjectOptional
      View nested fields
      • additionalPropertiesobjectSchema rule
        View branch fields and rules
        • sourcestringRequired
        • versionintegerRequired
        • updated_atstring · date-timeRequired
        • additionalPropertiesno value allowedSchema rule
    • identityAssurancestringOptional

      owner_reviewed means an owner-approved administrative or historical contact record, never customer authentication or phone proof.

      Allowed values: ["customer_verified","owner_reviewed"]

    • displayNameUnavailableReasonstringOptional

      Present only when the active displayName is unavailable (null). Canonical CRAD text is preserved, not truncated or cleared. Do not echo null as a source-field deletion.

      Allowed values: ["not_set","blank","too_long","unsupported_characters"]

    • allOf 1unspecifiedSchema branch
      View branch fields and rules
      • ifunspecifiedSchema rule
        View branch fields and rules
        • displayNameUnavailableReasonunspecifiedCondition predicate

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

      • thenobjectSchema rule
        View branch fields and rules
        • statusstringOptional in this branch

          Value: "active"

        • displayNamenullRequired in this branch
    • additionalPropertiesno value allowedSchema rule
  • replayedbooleanRequired
  • additionalPropertiesno value allowedSchema rule
Complete schema and nested fields
JSON Schema
{
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "customer": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "customerId",
        "externalCustomerId",
        "status",
        "version"
      ],
      "properties": {
        "customerId": {
          "type": "string",
          "format": "uuid"
        },
        "externalCustomerId": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "status": {
          "enum": [
            "active",
            "detached"
          ]
        },
        "version": {
          "type": "integer",
          "minimum": 1
        },
        "displayName": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "language": {
          "anyOf": [
            {
              "type": "string",
              "enum": [
                "he",
                "ar",
                "en"
              ]
            },
            {
              "type": "null"
            }
          ]
        },
        "phone": {
          "type": "string",
          "pattern": "^\\+[1-9][0-9]{7,14}$"
        },
        "fieldSources": {
          "type": "object",
          "additionalProperties": {
            "type": "object",
            "additionalProperties": false,
            "properties": {
              "source": {
                "type": "string"
              },
              "version": {
                "type": "integer"
              },
              "updated_at": {
                "type": "string",
                "format": "date-time"
              }
            },
            "required": [
              "source",
              "version",
              "updated_at"
            ]
          }
        },
        "identityAssurance": {
          "enum": [
            "customer_verified",
            "owner_reviewed"
          ],
          "description": "owner_reviewed means an owner-approved administrative or historical contact record, never customer authentication or phone proof."
        },
        "displayNameUnavailableReason": {
          "enum": [
            "not_set",
            "blank",
            "too_long",
            "unsupported_characters"
          ],
          "description": "Present only when the active displayName is unavailable (null). Canonical CRAD text is preserved, not truncated or cleared. Do not echo null as a source-field deletion."
        }
      },
      "allOf": [
        {
          "if": {
            "required": [
              "displayNameUnavailableReason"
            ]
          },
          "then": {
            "required": [
              "displayName"
            ],
            "properties": {
              "status": {
                "const": "active"
              },
              "displayName": {
                "type": "null"
              }
            }
          }
        }
      ]
    },
    "replayed": {
      "type": "boolean"
    }
  },
  "required": [
    "customer",
    "replayed"
  ]
}

201 · CustomerResult

application/json · CustomerResult

  • customerobject; allOf (unspecified)Required

    All of these schema rules apply together.

    View nested fields
    • customerIdstring · uuidRequired
    • externalCustomerIdanyOf (string | null)Required

      At least one of these variants must match.

      View nested fields
      • anyOf 1stringSchema branch
      • anyOf 2nullSchema branch
    • statusstringRequired

      Allowed values: ["active","detached"]

    • versionintegerRequired

      minimum: 1

    • displayNameanyOf (string | null)Optional

      At least one of these variants must match.

      View nested fields
      • anyOf 1stringSchema branch
      • anyOf 2nullSchema branch
    • languageanyOf (string | null)Optional

      At least one of these variants must match.

      View nested fields
      • anyOf 1stringSchema branch

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

      • anyOf 2nullSchema branch
    • phonestringOptional

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

    • fieldSourcesobjectOptional
      View nested fields
      • additionalPropertiesobjectSchema rule
        View branch fields and rules
        • sourcestringRequired
        • versionintegerRequired
        • updated_atstring · date-timeRequired
        • additionalPropertiesno value allowedSchema rule
    • identityAssurancestringOptional

      owner_reviewed means an owner-approved administrative or historical contact record, never customer authentication or phone proof.

      Allowed values: ["customer_verified","owner_reviewed"]

    • displayNameUnavailableReasonstringOptional

      Present only when the active displayName is unavailable (null). Canonical CRAD text is preserved, not truncated or cleared. Do not echo null as a source-field deletion.

      Allowed values: ["not_set","blank","too_long","unsupported_characters"]

    • allOf 1unspecifiedSchema branch
      View branch fields and rules
      • ifunspecifiedSchema rule
        View branch fields and rules
        • displayNameUnavailableReasonunspecifiedCondition predicate

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

      • thenobjectSchema rule
        View branch fields and rules
        • statusstringOptional in this branch

          Value: "active"

        • displayNamenullRequired in this branch
    • additionalPropertiesno value allowedSchema rule
  • replayedbooleanRequired
  • additionalPropertiesno value allowedSchema rule
Complete schema and nested fields
JSON Schema
{
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "customer": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "customerId",
        "externalCustomerId",
        "status",
        "version"
      ],
      "properties": {
        "customerId": {
          "type": "string",
          "format": "uuid"
        },
        "externalCustomerId": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "status": {
          "enum": [
            "active",
            "detached"
          ]
        },
        "version": {
          "type": "integer",
          "minimum": 1
        },
        "displayName": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "language": {
          "anyOf": [
            {
              "type": "string",
              "enum": [
                "he",
                "ar",
                "en"
              ]
            },
            {
              "type": "null"
            }
          ]
        },
        "phone": {
          "type": "string",
          "pattern": "^\\+[1-9][0-9]{7,14}$"
        },
        "fieldSources": {
          "type": "object",
          "additionalProperties": {
            "type": "object",
            "additionalProperties": false,
            "properties": {
              "source": {
                "type": "string"
              },
              "version": {
                "type": "integer"
              },
              "updated_at": {
                "type": "string",
                "format": "date-time"
              }
            },
            "required": [
              "source",
              "version",
              "updated_at"
            ]
          }
        },
        "identityAssurance": {
          "enum": [
            "customer_verified",
            "owner_reviewed"
          ],
          "description": "owner_reviewed means an owner-approved administrative or historical contact record, never customer authentication or phone proof."
        },
        "displayNameUnavailableReason": {
          "enum": [
            "not_set",
            "blank",
            "too_long",
            "unsupported_characters"
          ],
          "description": "Present only when the active displayName is unavailable (null). Canonical CRAD text is preserved, not truncated or cleared. Do not echo null as a source-field deletion."
        }
      },
      "allOf": [
        {
          "if": {
            "required": [
              "displayNameUnavailableReason"
            ]
          },
          "then": {
            "required": [
              "displayName"
            ],
            "properties": {
              "status": {
                "const": "active"
              },
              "displayName": {
                "type": "null"
              }
            }
          }
        }
      ]
    },
    "replayed": {
      "type": "boolean"
    }
  },
  "required": [
    "customer",
    "replayed"
  ]
}

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 error.

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 error.

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 error.

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 error.

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 error.

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 error.

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 error.

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 error.

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 · Rate limit; honor Retry-After.

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 · Outcome may be unknown. Keep operation key and 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"
  ]
}