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

Replace reviewed website service selection

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

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

PUT/v1/management/service-publication

Behavior

Replace the complete serviceIds selection with the observed publication If-Match. An empty array removes the selection. Preserve selected IDs hidden by your own filter. The server rechecks service eligibility; this operation does not change catalogue order or activate website intake.

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

website-content:readwebsite-content:write

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.

  • If-Matchheader · stringRequired

    Exact returned quoted pub:N; maximum N9007199254740991. No weak/wildcard ETag.

    Format and constraints
    If-Match schema
    {
      "type": "string",
      "pattern": "^\"pub:(0|[1-9][0-9]*)\"$"
    }
  • Idempotency-Keyheader · stringRequired

    Persist the original UUID with the exact complete body and original If-Match before dispatch. Reuse only for that same intent.

    Format and constraints
    Idempotency-Key schema
    {
      "type": "string",
      "format": "uuid"
    }

Request body · required

application/json · BusinessPublicationReplaceRequest

Full replacement set; [] explicitly removes every selection. The normal8KiB JSON request limit applies. UUID case aliases are duplicates.

  • serviceIdsarrayRequired

    maxItems: 100uniqueItems: true

    View nested fields
    • []string · uuidArray item
  • additionalPropertiesno value allowedSchema rule
Complete schema and nested fields
JSON Schema
{
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "serviceIds": {
      "type": "array",
      "maxItems": 100,
      "uniqueItems": true,
      "items": {
        "type": "string",
        "format": "uuid"
      }
    }
  },
  "required": [
    "serviceIds"
  ],
  "description": "Full replacement set; [] explicitly removes every selection. The normal8KiB JSON request limit applies. UUID case aliases are duplicates."
}

Successful responses

200 · BusinessPublicationResult

Accepted/replayed immutable receipt plus current state.

Cache-Control
Cache-Control schema
{
  "const": "no-store"
}
ETag · Quoted current resource version. Publication result with unavailable current omits ETag; recovery uses its body, not a fresh write precondition.
ETag schema
{
  "type": "string"
}

application/json · BusinessPublicationResult

Current is freshly authorized and may differ from the immutable receipt after later edits or service cleanup. Accepted exact replay precedes fresh CAS/eligibility; current permission remains required.

Exactly one of these variants must match.

  • receiptobjectRequired

    Immutable accepted state for the original UUID.

    View nested fields
    • operationIdstring · uuidRequired
    • stateobjectRequired

      Complete bounded owner-reviewed publication options. More than1,000 tenant services refuses CATALOGUE_TOO_LARGE; no partial editable list. Selected IDs are a canonical unique set of at most100, independent of catalogue order. Eligibility is current; a selected service can later become ineligible.

      View nested fields
      • versionintegerRequired

        minimum: 0maximum: 9007199254740991

      • serviceIdsarrayRequired

        maxItems: 100uniqueItems: true

        View nested fields
        • []string · uuidArray item
      • servicesarrayRequired

        maxItems: 1000

        View nested fields
        • []objectArray item
          View nested fields
          • serviceIdstring · uuidRequired
          • nameobjectRequired
            View nested fields
            • hestringOptional
            • arstringOptional
            • enstringOptional
            • additionalPropertiesno value allowedSchema rule
          • eligiblebooleanRequired
          • additionalPropertiesno value allowedSchema rule
      • truncatedbooleanRequired

        Value: false

      • additionalPropertiesno value allowedSchema rule
    • additionalPropertiesno value allowedSchema rule
  • currentanyOf (object | null)Required

    At least one of these variants must match.

    View nested fields
    • anyOf 1 · truncated = falseobjectSchema branch

      Complete bounded owner-reviewed publication options. More than1,000 tenant services refuses CATALOGUE_TOO_LARGE; no partial editable list. Selected IDs are a canonical unique set of at most100, independent of catalogue order. Eligibility is current; a selected service can later become ineligible.

      View branch fields and rules
      • versionintegerRequired in this branch

        minimum: 0maximum: 9007199254740991

      • serviceIdsarrayRequired in this branch

        maxItems: 100uniqueItems: true

        View nested fields
        • []string · uuidArray item
      • servicesarrayRequired in this branch

        maxItems: 1000

        View nested fields
        • []objectArray item
          View nested fields
          • serviceIdstring · uuidRequired in this branch
          • nameobjectRequired in this branch
            View nested fields
            • hestringOptional in this branch
            • arstringOptional in this branch
            • enstringOptional in this branch
            • additionalPropertiesno value allowedSchema rule
          • eligiblebooleanRequired in this branch
          • additionalPropertiesno value allowedSchema rule
      • truncatedbooleanRequired in this branch

        Value: false

      • additionalPropertiesno value allowedSchema rule
    • anyOf 2nullSchema branch
  • currentUnavailableReasonnull | stringRequired

    Allowed values: [null,"catalogue_too_large"]

  • replayedbooleanRequired
  • oneOf 1objectSchema branch
    View branch fields and rules
    • currentobjectOptional in this branch

      Complete bounded owner-reviewed publication options. More than1,000 tenant services refuses CATALOGUE_TOO_LARGE; no partial editable list. Selected IDs are a canonical unique set of at most100, independent of catalogue order. Eligibility is current; a selected service can later become ineligible.

      View nested fields
      • versionintegerRequired in this branch

        minimum: 0maximum: 9007199254740991

      • serviceIdsarrayRequired in this branch

        maxItems: 100uniqueItems: true

        View nested fields
        • []string · uuidArray item
      • servicesarrayRequired in this branch

        maxItems: 1000

        View nested fields
        • []objectArray item
          View nested fields
          • serviceIdstring · uuidRequired in this branch
          • nameobjectRequired in this branch
            View nested fields
            • hestringOptional in this branch
            • arstringOptional in this branch
            • enstringOptional in this branch
            • additionalPropertiesno value allowedSchema rule
          • eligiblebooleanRequired in this branch
          • additionalPropertiesno value allowedSchema rule
      • truncatedbooleanRequired in this branch

        Value: false

      • additionalPropertiesno value allowedSchema rule
    • currentUnavailableReasonnullOptional in this branch
  • oneOf 2 · currentUnavailableReason = "catalogue_too_large"objectSchema branch
    View branch fields and rules
    • currentnullOptional in this branch
    • currentUnavailableReasonstringOptional in this branch

      Value: "catalogue_too_large"

  • additionalPropertiesno value allowedSchema rule
Complete schema and nested fields
JSON Schema
{
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "receipt": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "operationId": {
          "type": "string",
          "format": "uuid"
        },
        "state": {
          "type": "object",
          "additionalProperties": false,
          "properties": {
            "version": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            },
            "serviceIds": {
              "type": "array",
              "maxItems": 100,
              "uniqueItems": true,
              "items": {
                "type": "string",
                "format": "uuid"
              }
            },
            "services": {
              "type": "array",
              "maxItems": 1000,
              "items": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                  "serviceId": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "name": {
                    "type": "object",
                    "additionalProperties": false,
                    "properties": {
                      "he": {
                        "type": "string"
                      },
                      "ar": {
                        "type": "string"
                      },
                      "en": {
                        "type": "string"
                      }
                    }
                  },
                  "eligible": {
                    "type": "boolean"
                  }
                },
                "required": [
                  "serviceId",
                  "name",
                  "eligible"
                ]
              }
            },
            "truncated": {
              "const": false
            }
          },
          "required": [
            "version",
            "serviceIds",
            "services",
            "truncated"
          ],
          "description": "Complete bounded owner-reviewed publication options. More than1,000 tenant services refuses CATALOGUE_TOO_LARGE; no partial editable list. Selected IDs are a canonical unique set of at most100, independent of catalogue order. Eligibility is current; a selected service can later become ineligible."
        }
      },
      "required": [
        "operationId",
        "state"
      ],
      "description": "Immutable accepted state for the original UUID."
    },
    "current": {
      "anyOf": [
        {
          "type": "object",
          "additionalProperties": false,
          "properties": {
            "version": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            },
            "serviceIds": {
              "type": "array",
              "maxItems": 100,
              "uniqueItems": true,
              "items": {
                "type": "string",
                "format": "uuid"
              }
            },
            "services": {
              "type": "array",
              "maxItems": 1000,
              "items": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                  "serviceId": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "name": {
                    "type": "object",
                    "additionalProperties": false,
                    "properties": {
                      "he": {
                        "type": "string"
                      },
                      "ar": {
                        "type": "string"
                      },
                      "en": {
                        "type": "string"
                      }
                    }
                  },
                  "eligible": {
                    "type": "boolean"
                  }
                },
                "required": [
                  "serviceId",
                  "name",
                  "eligible"
                ]
              }
            },
            "truncated": {
              "const": false
            }
          },
          "required": [
            "version",
            "serviceIds",
            "services",
            "truncated"
          ],
          "description": "Complete bounded owner-reviewed publication options. More than1,000 tenant services refuses CATALOGUE_TOO_LARGE; no partial editable list. Selected IDs are a canonical unique set of at most100, independent of catalogue order. Eligibility is current; a selected service can later become ineligible."
        },
        {
          "type": "null"
        }
      ]
    },
    "currentUnavailableReason": {
      "enum": [
        null,
        "catalogue_too_large"
      ]
    },
    "replayed": {
      "type": "boolean"
    }
  },
  "required": [
    "receipt",
    "current",
    "currentUnavailableReason",
    "replayed"
  ],
  "description": "Current is freshly authorized and may differ from the immutable receipt after later edits or service cleanup. Accepted exact replay precedes fresh CAS/eligibility; current permission remains required.",
  "oneOf": [
    {
      "properties": {
        "current": {
          "type": "object",
          "additionalProperties": false,
          "properties": {
            "version": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            },
            "serviceIds": {
              "type": "array",
              "maxItems": 100,
              "uniqueItems": true,
              "items": {
                "type": "string",
                "format": "uuid"
              }
            },
            "services": {
              "type": "array",
              "maxItems": 1000,
              "items": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                  "serviceId": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "name": {
                    "type": "object",
                    "additionalProperties": false,
                    "properties": {
                      "he": {
                        "type": "string"
                      },
                      "ar": {
                        "type": "string"
                      },
                      "en": {
                        "type": "string"
                      }
                    }
                  },
                  "eligible": {
                    "type": "boolean"
                  }
                },
                "required": [
                  "serviceId",
                  "name",
                  "eligible"
                ]
              }
            },
            "truncated": {
              "const": false
            }
          },
          "required": [
            "version",
            "serviceIds",
            "services",
            "truncated"
          ],
          "description": "Complete bounded owner-reviewed publication options. More than1,000 tenant services refuses CATALOGUE_TOO_LARGE; no partial editable list. Selected IDs are a canonical unique set of at most100, independent of catalogue order. Eligibility is current; a selected service can later become ineligible."
        },
        "currentUnavailableReason": {
          "type": "null"
        }
      }
    },
    {
      "properties": {
        "current": {
          "type": "null"
        },
        "currentUnavailableReason": {
          "const": "catalogue_too_large"
        }
      }
    }
  ]
}

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 (11)

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

401 · Missing/invalid current Management 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/access denied or Origin present.

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 · Unsupported method.

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 · OPERATION_CONFLICT, CATALOGUE_TOO_LARGE or current service eligibility/reference conflict.

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 · VERSION_CONFLICT; refresh and review a new intent after resolving the original request.

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"
  ]
}
413 · JSON body exceeds8KiB.

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"
  ]
}
415 · JSON content type required.

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 · Invalid shape, URL, service IDs or exact precondition.

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 · Original If-Match or Idempotency-Key missing.

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 · Quota; Retry-After applies.

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/uncertain result; retain original request and recover.

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