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

Reorder complete business service catalogue

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

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

POST/v1/management/services/reorder

Behavior

Use the catalogue If-Match and orderedIds containing every current service exactly once, including inactive services and rows hidden by a UI filter. The list is bounded at 1,000. A stale catalogue returns CATALOGUE_CHANGED; refresh and review without silently overwriting the order.

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

services:readservices: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 quoted returned catalogue ETag. No wildcard or weak validators.

    Format and constraints
    If-Match schema
    {
      "type": "string",
      "pattern": "^\"scat:[0-9a-f]{64}\"$"
    }
  • Idempotency-Keyheader · stringRequired

    Persist one UUID with the exact action/target/body/precondition before dispatch. Reuse only for the same intent.

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

Request body · required

application/json · BusinessServiceReorderRequest

  • orderedIdsarrayRequired

    Every current catalogue service exactly once, including inactive and legacy entries. Never send only a filtered view.

    maxItems: 1000uniqueItems: true

    View nested fields
    • []string · uuidArray item
  • additionalPropertiesno value allowedSchema rule
Complete schema and nested fields
JSON Schema
{
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "orderedIds": {
      "type": "array",
      "items": {
        "type": "string",
        "format": "uuid"
      },
      "maxItems": 1000,
      "uniqueItems": true,
      "description": "Every current catalogue service exactly once, including inactive and legacy entries. Never send only a filtered view."
    }
  },
  "required": [
    "orderedIds"
  ]
}

Successful responses

200 · BusinessServiceCatalogueResult

Success.

Cache-Control
Cache-Control schema
{
  "const": "no-store"
}
ETag · Quoted current service/catalogue version where applicable; deleted current has no service ETag.
ETag schema
{
  "type": "string"
}

application/json · BusinessServiceCatalogueResult

Receipt is immutable; current is freshly authorized state and may be newer or null after deletion. Current is null for reorder/delete. Replay never recreates a deleted service.

  • receiptobjectRequired

    Immutable acceptance. Reorder has null serviceId/before/after and exact accepted orderedIds/catalogue version. Delete keeps before/prior service version with after null. Other actions have null orderedIds.

    View nested fields
    • operationIdstring · uuidRequired
    • actionstringRequired

      Allowed values: ["create","update","delete","reorder"]

    • serviceIdanyOf (string | null)Required

      At least one of these variants must match.

      View nested fields
      • anyOf 1string · uuidSchema branch
      • anyOf 2nullSchema branch
    • acceptedVersionanyOf (string | string)Required

      At least one of these variants must match.

      View nested fields
      • anyOf 1stringSchema branch

        Opaque physical service identity and material revision. Retain the returned value; it is not the serviceId.

        pattern: "^svc:[0-9a-f-]{36}:(0|[1-9][0-9]{0,18})$"

      • anyOf 2stringSchema branch

        Opaque hash of the exact complete current service order. Names/prices can change without changing this order version.

        pattern: "^scat:[0-9a-f]{64}$"

    • changedbooleanRequired
    • beforeanyOf (object; allOf (unspecified) | null)Required

      At least one of these variants must match.

      View nested fields
      • anyOf 1object; allOf (unspecified)Schema branch

        All of these schema rules apply together.

        View branch fields and rules
        • serviceIdstring · uuidRequired in this branch
        • serviceVersionstringRequired in this branch

          Opaque physical service identity and material revision. Retain the returned value; it is not the serviceId.

          pattern: "^svc:[0-9a-f-]{36}:(0|[1-9][0-9]{0,18})$"

        • modestringRequired in this branch

          Allowed values: ["legacy","service_duration"]

        • nameobjectRequired in this branch

          Stored localized strings. When editing, include at least one nonblank he/ar/en name; managed validators normalize supported fallback keys. Omit an unedited legacy name.

          View nested fields
          • additionalPropertiesstringSchema rule
        • descriptionunspecifiedRequired in this branch

          Stored service description JSON; null and legacy JSON remain readable.

        • priceMajornumber | nullRequired in this branch

          Current catalogue price in major units. Nullable legacy price is retained; this is not a booking quote or minor units.

        • currencystring | nullRequired in this branch

          Stored currency label, including legacy/custom labels and ₪. No inferred ISO currency.

          maxLength: 10000

        • isActivebooleanRequired in this branch
        • displayOrderinteger | nullRequired in this branch

          minimum: -2147483648maximum: 2147483647

        • legacyDurationMinutesinteger | nullRequired in this branch

          Historical duration field, not edited by this contract.

          minimum: -2147483648maximum: 2147483647readOnly: true

        • bookingDurationMinutesinteger | nullRequired in this branch

          minimum: -2147483648maximum: 2147483647

        • removalDurationMinutesinteger | nullRequired in this branch

          minimum: -2147483648maximum: 2147483647

        • removalPriceMajornumber | nullRequired in this branch
        • publicationobjectRequired in this branch

          Current public selection and eligibility, not publication permission. Catalogue creation/activity never automatically selects a public service.

          View nested fields
          • selectedbooleanRequired in this branch
          • eligiblebooleanRequired in this branch
          • additionalPropertiesno value allowedSchema rule
        • deleteBlockersarrayRequired in this branch

          Advisory current blockers; delete rechecks under serialization. Deactivation remains available.

          maxItems: 2uniqueItems: true

          View nested fields
          • []stringArray item

            Allowed values: ["appointments_exist","provider_assignment_would_expand"]

        • priceRangeMajoranyOf (object | null)Optional in this branch

          Non-final inclusive price bounds in major currency units. Both finite bounds are required; min must be strictly below max and amounts have at most two decimal places. The companion exact amount is null. Omitted or null means no range, not a zero price. Accepted bounds are frozen and must not be recomputed from the current catalogue.

          At least one of these variants must match.

          View nested fields
          • anyOf 1objectSchema branch
            View branch fields and rules
            • minnumberRequired in this branch

              minimum: 0maximum: 90071992547409.9

            • maxnumberRequired in this branch

              minimum: 0maximum: 90071992547409.9

            • additionalPropertiesno value allowedSchema rule
          • anyOf 2nullSchema branch
        • allOf 1unspecifiedSchema branch
          View branch fields and rules
          • ifobjectSchema rule
            View branch fields and rules
            • priceRangeMajorobjectCondition predicate
          • thenobjectSchema rule
            View branch fields and rules
            • priceMajornullOptional in this branch
        • additionalPropertiesno value allowedSchema rule
      • anyOf 2nullSchema branch
    • afteranyOf (object; allOf (unspecified) | null)Required

      At least one of these variants must match.

      View nested fields
      • anyOf 1object; allOf (unspecified)Schema branch

        All of these schema rules apply together.

        View branch fields and rules
        • serviceIdstring · uuidRequired in this branch
        • serviceVersionstringRequired in this branch

          Opaque physical service identity and material revision. Retain the returned value; it is not the serviceId.

          pattern: "^svc:[0-9a-f-]{36}:(0|[1-9][0-9]{0,18})$"

        • modestringRequired in this branch

          Allowed values: ["legacy","service_duration"]

        • nameobjectRequired in this branch

          Stored localized strings. When editing, include at least one nonblank he/ar/en name; managed validators normalize supported fallback keys. Omit an unedited legacy name.

          View nested fields
          • additionalPropertiesstringSchema rule
        • descriptionunspecifiedRequired in this branch

          Stored service description JSON; null and legacy JSON remain readable.

        • priceMajornumber | nullRequired in this branch

          Current catalogue price in major units. Nullable legacy price is retained; this is not a booking quote or minor units.

        • currencystring | nullRequired in this branch

          Stored currency label, including legacy/custom labels and ₪. No inferred ISO currency.

          maxLength: 10000

        • isActivebooleanRequired in this branch
        • displayOrderinteger | nullRequired in this branch

          minimum: -2147483648maximum: 2147483647

        • legacyDurationMinutesinteger | nullRequired in this branch

          Historical duration field, not edited by this contract.

          minimum: -2147483648maximum: 2147483647readOnly: true

        • bookingDurationMinutesinteger | nullRequired in this branch

          minimum: -2147483648maximum: 2147483647

        • removalDurationMinutesinteger | nullRequired in this branch

          minimum: -2147483648maximum: 2147483647

        • removalPriceMajornumber | nullRequired in this branch
        • publicationobjectRequired in this branch

          Current public selection and eligibility, not publication permission. Catalogue creation/activity never automatically selects a public service.

          View nested fields
          • selectedbooleanRequired in this branch
          • eligiblebooleanRequired in this branch
          • additionalPropertiesno value allowedSchema rule
        • deleteBlockersarrayRequired in this branch

          Advisory current blockers; delete rechecks under serialization. Deactivation remains available.

          maxItems: 2uniqueItems: true

          View nested fields
          • []stringArray item

            Allowed values: ["appointments_exist","provider_assignment_would_expand"]

        • priceRangeMajoranyOf (object | null)Optional in this branch

          Non-final inclusive price bounds in major currency units. Both finite bounds are required; min must be strictly below max and amounts have at most two decimal places. The companion exact amount is null. Omitted or null means no range, not a zero price. Accepted bounds are frozen and must not be recomputed from the current catalogue.

          At least one of these variants must match.

          View nested fields
          • anyOf 1objectSchema branch
            View branch fields and rules
            • minnumberRequired in this branch

              minimum: 0maximum: 90071992547409.9

            • maxnumberRequired in this branch

              minimum: 0maximum: 90071992547409.9

            • additionalPropertiesno value allowedSchema rule
          • anyOf 2nullSchema branch
        • allOf 1unspecifiedSchema branch
          View branch fields and rules
          • ifobjectSchema rule
            View branch fields and rules
            • priceRangeMajorobjectCondition predicate
          • thenobjectSchema rule
            View branch fields and rules
            • priceMajornullOptional in this branch
        • additionalPropertiesno value allowedSchema rule
      • anyOf 2nullSchema branch
    • orderedIdsanyOf (array | null)Required

      At least one of these variants must match.

      View nested fields
      • anyOf 1arraySchema branch

        maxItems: 1000uniqueItems: true

        View branch fields and rules
        • []string · uuidArray item
      • anyOf 2nullSchema branch
    • additionalPropertiesno value allowedSchema rule
  • currentanyOf (object; allOf (unspecified) | null)Required

    At least one of these variants must match.

    View nested fields
    • anyOf 1object; allOf (unspecified)Schema branch

      All of these schema rules apply together.

      View branch fields and rules
      • serviceIdstring · uuidRequired in this branch
      • serviceVersionstringRequired in this branch

        Opaque physical service identity and material revision. Retain the returned value; it is not the serviceId.

        pattern: "^svc:[0-9a-f-]{36}:(0|[1-9][0-9]{0,18})$"

      • modestringRequired in this branch

        Allowed values: ["legacy","service_duration"]

      • nameobjectRequired in this branch

        Stored localized strings. When editing, include at least one nonblank he/ar/en name; managed validators normalize supported fallback keys. Omit an unedited legacy name.

        View nested fields
        • additionalPropertiesstringSchema rule
      • descriptionunspecifiedRequired in this branch

        Stored service description JSON; null and legacy JSON remain readable.

      • priceMajornumber | nullRequired in this branch

        Current catalogue price in major units. Nullable legacy price is retained; this is not a booking quote or minor units.

      • currencystring | nullRequired in this branch

        Stored currency label, including legacy/custom labels and ₪. No inferred ISO currency.

        maxLength: 10000

      • isActivebooleanRequired in this branch
      • displayOrderinteger | nullRequired in this branch

        minimum: -2147483648maximum: 2147483647

      • legacyDurationMinutesinteger | nullRequired in this branch

        Historical duration field, not edited by this contract.

        minimum: -2147483648maximum: 2147483647readOnly: true

      • bookingDurationMinutesinteger | nullRequired in this branch

        minimum: -2147483648maximum: 2147483647

      • removalDurationMinutesinteger | nullRequired in this branch

        minimum: -2147483648maximum: 2147483647

      • removalPriceMajornumber | nullRequired in this branch
      • publicationobjectRequired in this branch

        Current public selection and eligibility, not publication permission. Catalogue creation/activity never automatically selects a public service.

        View nested fields
        • selectedbooleanRequired in this branch
        • eligiblebooleanRequired in this branch
        • additionalPropertiesno value allowedSchema rule
      • deleteBlockersarrayRequired in this branch

        Advisory current blockers; delete rechecks under serialization. Deactivation remains available.

        maxItems: 2uniqueItems: true

        View nested fields
        • []stringArray item

          Allowed values: ["appointments_exist","provider_assignment_would_expand"]

      • priceRangeMajoranyOf (object | null)Optional in this branch

        Non-final inclusive price bounds in major currency units. Both finite bounds are required; min must be strictly below max and amounts have at most two decimal places. The companion exact amount is null. Omitted or null means no range, not a zero price. Accepted bounds are frozen and must not be recomputed from the current catalogue.

        At least one of these variants must match.

        View nested fields
        • anyOf 1objectSchema branch
          View branch fields and rules
          • minnumberRequired in this branch

            minimum: 0maximum: 90071992547409.9

          • maxnumberRequired in this branch

            minimum: 0maximum: 90071992547409.9

          • additionalPropertiesno value allowedSchema rule
        • anyOf 2nullSchema branch
      • allOf 1unspecifiedSchema branch
        View branch fields and rules
        • ifobjectSchema rule
          View branch fields and rules
          • priceRangeMajorobjectCondition predicate
        • thenobjectSchema rule
          View branch fields and rules
          • priceMajornullOptional in this branch
      • additionalPropertiesno value allowedSchema rule
    • anyOf 2nullSchema branch
  • catalogueVersionstringRequired

    Opaque hash of the exact complete current service order. Names/prices can change without changing this order version.

    pattern: "^scat:[0-9a-f]{64}$"

  • replayedbooleanRequired
  • 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"
        },
        "action": {
          "enum": [
            "create",
            "update",
            "delete",
            "reorder"
          ]
        },
        "serviceId": {
          "anyOf": [
            {
              "type": "string",
              "format": "uuid"
            },
            {
              "type": "null"
            }
          ]
        },
        "acceptedVersion": {
          "anyOf": [
            {
              "type": "string",
              "pattern": "^svc:[0-9a-f-]{36}:(0|[1-9][0-9]{0,18})$",
              "description": "Opaque physical service identity and material revision. Retain the returned value; it is not the serviceId."
            },
            {
              "type": "string",
              "pattern": "^scat:[0-9a-f]{64}$",
              "description": "Opaque hash of the exact complete current service order. Names/prices can change without changing this order version."
            }
          ]
        },
        "changed": {
          "type": "boolean"
        },
        "before": {
          "anyOf": [
            {
              "type": "object",
              "additionalProperties": false,
              "properties": {
                "serviceId": {
                  "type": "string",
                  "format": "uuid"
                },
                "serviceVersion": {
                  "type": "string",
                  "pattern": "^svc:[0-9a-f-]{36}:(0|[1-9][0-9]{0,18})$",
                  "description": "Opaque physical service identity and material revision. Retain the returned value; it is not the serviceId."
                },
                "mode": {
                  "enum": [
                    "legacy",
                    "service_duration"
                  ]
                },
                "name": {
                  "type": "object",
                  "additionalProperties": {
                    "type": "string"
                  },
                  "description": "Stored localized strings. When editing, include at least one nonblank he/ar/en name; managed validators normalize supported fallback keys. Omit an unedited legacy name."
                },
                "description": {
                  "description": "Stored service description JSON; null and legacy JSON remain readable."
                },
                "priceMajor": {
                  "type": [
                    "number",
                    "null"
                  ],
                  "description": "Current catalogue price in major units. Nullable legacy price is retained; this is not a booking quote or minor units."
                },
                "currency": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "maxLength": 10000,
                  "description": "Stored currency label, including legacy/custom labels and ₪. No inferred ISO currency."
                },
                "isActive": {
                  "type": "boolean"
                },
                "displayOrder": {
                  "type": [
                    "integer",
                    "null"
                  ],
                  "minimum": -2147483648,
                  "maximum": 2147483647
                },
                "legacyDurationMinutes": {
                  "type": [
                    "integer",
                    "null"
                  ],
                  "minimum": -2147483648,
                  "maximum": 2147483647,
                  "readOnly": true,
                  "description": "Historical duration field, not edited by this contract."
                },
                "bookingDurationMinutes": {
                  "type": [
                    "integer",
                    "null"
                  ],
                  "minimum": -2147483648,
                  "maximum": 2147483647
                },
                "removalDurationMinutes": {
                  "type": [
                    "integer",
                    "null"
                  ],
                  "minimum": -2147483648,
                  "maximum": 2147483647
                },
                "removalPriceMajor": {
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "publication": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "selected": {
                      "type": "boolean"
                    },
                    "eligible": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "selected",
                    "eligible"
                  ],
                  "description": "Current public selection and eligibility, not publication permission. Catalogue creation/activity never automatically selects a public service."
                },
                "deleteBlockers": {
                  "type": "array",
                  "items": {
                    "enum": [
                      "appointments_exist",
                      "provider_assignment_would_expand"
                    ]
                  },
                  "maxItems": 2,
                  "uniqueItems": true,
                  "description": "Advisory current blockers; delete rechecks under serialization. Deactivation remains available."
                },
                "priceRangeMajor": {
                  "anyOf": [
                    {
                      "type": "object",
                      "additionalProperties": false,
                      "required": [
                        "min",
                        "max"
                      ],
                      "properties": {
                        "min": {
                          "type": "number",
                          "minimum": 0,
                          "maximum": 90071992547409.9
                        },
                        "max": {
                          "type": "number",
                          "minimum": 0,
                          "maximum": 90071992547409.9
                        }
                      }
                    },
                    {
                      "type": "null"
                    }
                  ],
                  "description": "Non-final inclusive price bounds in major currency units. Both finite bounds are required; min must be strictly below max and amounts have at most two decimal places. The companion exact amount is null. Omitted or null means no range, not a zero price. Accepted bounds are frozen and must not be recomputed from the current catalogue."
                }
              },
              "required": [
                "serviceId",
                "serviceVersion",
                "mode",
                "name",
                "description",
                "priceMajor",
                "currency",
                "isActive",
                "displayOrder",
                "legacyDurationMinutes",
                "bookingDurationMinutes",
                "removalDurationMinutes",
                "removalPriceMajor",
                "publication",
                "deleteBlockers"
              ],
              "allOf": [
                {
                  "if": {
                    "required": [
                      "priceRangeMajor"
                    ],
                    "properties": {
                      "priceRangeMajor": {
                        "type": "object"
                      }
                    }
                  },
                  "then": {
                    "properties": {
                      "priceMajor": {
                        "type": "null"
                      }
                    }
                  }
                }
              ]
            },
            {
              "type": "null"
            }
          ]
        },
        "after": {
          "anyOf": [
            {
              "type": "object",
              "additionalProperties": false,
              "properties": {
                "serviceId": {
                  "type": "string",
                  "format": "uuid"
                },
                "serviceVersion": {
                  "type": "string",
                  "pattern": "^svc:[0-9a-f-]{36}:(0|[1-9][0-9]{0,18})$",
                  "description": "Opaque physical service identity and material revision. Retain the returned value; it is not the serviceId."
                },
                "mode": {
                  "enum": [
                    "legacy",
                    "service_duration"
                  ]
                },
                "name": {
                  "type": "object",
                  "additionalProperties": {
                    "type": "string"
                  },
                  "description": "Stored localized strings. When editing, include at least one nonblank he/ar/en name; managed validators normalize supported fallback keys. Omit an unedited legacy name."
                },
                "description": {
                  "description": "Stored service description JSON; null and legacy JSON remain readable."
                },
                "priceMajor": {
                  "type": [
                    "number",
                    "null"
                  ],
                  "description": "Current catalogue price in major units. Nullable legacy price is retained; this is not a booking quote or minor units."
                },
                "currency": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "maxLength": 10000,
                  "description": "Stored currency label, including legacy/custom labels and ₪. No inferred ISO currency."
                },
                "isActive": {
                  "type": "boolean"
                },
                "displayOrder": {
                  "type": [
                    "integer",
                    "null"
                  ],
                  "minimum": -2147483648,
                  "maximum": 2147483647
                },
                "legacyDurationMinutes": {
                  "type": [
                    "integer",
                    "null"
                  ],
                  "minimum": -2147483648,
                  "maximum": 2147483647,
                  "readOnly": true,
                  "description": "Historical duration field, not edited by this contract."
                },
                "bookingDurationMinutes": {
                  "type": [
                    "integer",
                    "null"
                  ],
                  "minimum": -2147483648,
                  "maximum": 2147483647
                },
                "removalDurationMinutes": {
                  "type": [
                    "integer",
                    "null"
                  ],
                  "minimum": -2147483648,
                  "maximum": 2147483647
                },
                "removalPriceMajor": {
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "publication": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "selected": {
                      "type": "boolean"
                    },
                    "eligible": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "selected",
                    "eligible"
                  ],
                  "description": "Current public selection and eligibility, not publication permission. Catalogue creation/activity never automatically selects a public service."
                },
                "deleteBlockers": {
                  "type": "array",
                  "items": {
                    "enum": [
                      "appointments_exist",
                      "provider_assignment_would_expand"
                    ]
                  },
                  "maxItems": 2,
                  "uniqueItems": true,
                  "description": "Advisory current blockers; delete rechecks under serialization. Deactivation remains available."
                },
                "priceRangeMajor": {
                  "anyOf": [
                    {
                      "type": "object",
                      "additionalProperties": false,
                      "required": [
                        "min",
                        "max"
                      ],
                      "properties": {
                        "min": {
                          "type": "number",
                          "minimum": 0,
                          "maximum": 90071992547409.9
                        },
                        "max": {
                          "type": "number",
                          "minimum": 0,
                          "maximum": 90071992547409.9
                        }
                      }
                    },
                    {
                      "type": "null"
                    }
                  ],
                  "description": "Non-final inclusive price bounds in major currency units. Both finite bounds are required; min must be strictly below max and amounts have at most two decimal places. The companion exact amount is null. Omitted or null means no range, not a zero price. Accepted bounds are frozen and must not be recomputed from the current catalogue."
                }
              },
              "required": [
                "serviceId",
                "serviceVersion",
                "mode",
                "name",
                "description",
                "priceMajor",
                "currency",
                "isActive",
                "displayOrder",
                "legacyDurationMinutes",
                "bookingDurationMinutes",
                "removalDurationMinutes",
                "removalPriceMajor",
                "publication",
                "deleteBlockers"
              ],
              "allOf": [
                {
                  "if": {
                    "required": [
                      "priceRangeMajor"
                    ],
                    "properties": {
                      "priceRangeMajor": {
                        "type": "object"
                      }
                    }
                  },
                  "then": {
                    "properties": {
                      "priceMajor": {
                        "type": "null"
                      }
                    }
                  }
                }
              ]
            },
            {
              "type": "null"
            }
          ]
        },
        "orderedIds": {
          "anyOf": [
            {
              "type": "array",
              "items": {
                "type": "string",
                "format": "uuid"
              },
              "maxItems": 1000,
              "uniqueItems": true
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "required": [
        "operationId",
        "action",
        "serviceId",
        "acceptedVersion",
        "changed",
        "before",
        "after",
        "orderedIds"
      ],
      "description": "Immutable acceptance. Reorder has null serviceId/before/after and exact accepted orderedIds/catalogue version. Delete keeps before/prior service version with after null. Other actions have null orderedIds."
    },
    "current": {
      "anyOf": [
        {
          "type": "object",
          "additionalProperties": false,
          "properties": {
            "serviceId": {
              "type": "string",
              "format": "uuid"
            },
            "serviceVersion": {
              "type": "string",
              "pattern": "^svc:[0-9a-f-]{36}:(0|[1-9][0-9]{0,18})$",
              "description": "Opaque physical service identity and material revision. Retain the returned value; it is not the serviceId."
            },
            "mode": {
              "enum": [
                "legacy",
                "service_duration"
              ]
            },
            "name": {
              "type": "object",
              "additionalProperties": {
                "type": "string"
              },
              "description": "Stored localized strings. When editing, include at least one nonblank he/ar/en name; managed validators normalize supported fallback keys. Omit an unedited legacy name."
            },
            "description": {
              "description": "Stored service description JSON; null and legacy JSON remain readable."
            },
            "priceMajor": {
              "type": [
                "number",
                "null"
              ],
              "description": "Current catalogue price in major units. Nullable legacy price is retained; this is not a booking quote or minor units."
            },
            "currency": {
              "type": [
                "string",
                "null"
              ],
              "maxLength": 10000,
              "description": "Stored currency label, including legacy/custom labels and ₪. No inferred ISO currency."
            },
            "isActive": {
              "type": "boolean"
            },
            "displayOrder": {
              "type": [
                "integer",
                "null"
              ],
              "minimum": -2147483648,
              "maximum": 2147483647
            },
            "legacyDurationMinutes": {
              "type": [
                "integer",
                "null"
              ],
              "minimum": -2147483648,
              "maximum": 2147483647,
              "readOnly": true,
              "description": "Historical duration field, not edited by this contract."
            },
            "bookingDurationMinutes": {
              "type": [
                "integer",
                "null"
              ],
              "minimum": -2147483648,
              "maximum": 2147483647
            },
            "removalDurationMinutes": {
              "type": [
                "integer",
                "null"
              ],
              "minimum": -2147483648,
              "maximum": 2147483647
            },
            "removalPriceMajor": {
              "type": [
                "number",
                "null"
              ]
            },
            "publication": {
              "type": "object",
              "additionalProperties": false,
              "properties": {
                "selected": {
                  "type": "boolean"
                },
                "eligible": {
                  "type": "boolean"
                }
              },
              "required": [
                "selected",
                "eligible"
              ],
              "description": "Current public selection and eligibility, not publication permission. Catalogue creation/activity never automatically selects a public service."
            },
            "deleteBlockers": {
              "type": "array",
              "items": {
                "enum": [
                  "appointments_exist",
                  "provider_assignment_would_expand"
                ]
              },
              "maxItems": 2,
              "uniqueItems": true,
              "description": "Advisory current blockers; delete rechecks under serialization. Deactivation remains available."
            },
            "priceRangeMajor": {
              "anyOf": [
                {
                  "type": "object",
                  "additionalProperties": false,
                  "required": [
                    "min",
                    "max"
                  ],
                  "properties": {
                    "min": {
                      "type": "number",
                      "minimum": 0,
                      "maximum": 90071992547409.9
                    },
                    "max": {
                      "type": "number",
                      "minimum": 0,
                      "maximum": 90071992547409.9
                    }
                  }
                },
                {
                  "type": "null"
                }
              ],
              "description": "Non-final inclusive price bounds in major currency units. Both finite bounds are required; min must be strictly below max and amounts have at most two decimal places. The companion exact amount is null. Omitted or null means no range, not a zero price. Accepted bounds are frozen and must not be recomputed from the current catalogue."
            }
          },
          "required": [
            "serviceId",
            "serviceVersion",
            "mode",
            "name",
            "description",
            "priceMajor",
            "currency",
            "isActive",
            "displayOrder",
            "legacyDurationMinutes",
            "bookingDurationMinutes",
            "removalDurationMinutes",
            "removalPriceMajor",
            "publication",
            "deleteBlockers"
          ],
          "allOf": [
            {
              "if": {
                "required": [
                  "priceRangeMajor"
                ],
                "properties": {
                  "priceRangeMajor": {
                    "type": "object"
                  }
                }
              },
              "then": {
                "properties": {
                  "priceMajor": {
                    "type": "null"
                  }
                }
              }
            }
          ]
        },
        {
          "type": "null"
        }
      ]
    },
    "catalogueVersion": {
      "type": "string",
      "pattern": "^scat:[0-9a-f]{64}$",
      "description": "Opaque hash of the exact complete current service order. Names/prices can change without changing this order version."
    },
    "replayed": {
      "type": "boolean"
    }
  },
  "required": [
    "receipt",
    "current",
    "catalogueVersion",
    "replayed"
  ],
  "description": "Receipt is immutable; current is freshly authorized state and may be newer or null after deletion. Current is null for reorder/delete. Replay never recreates a deleted service."
}

Errors and recovery

Input validation

  • 413REQUEST_TOO_LARGE

    The reorder JSON body exceeds 65,536 bytes.

  • 415JSON_REQUIRED

    Send Content-Type: application/json.

Error responses declared in the contract (12)

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

401 · Missing, invalid or expired 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/integration/tenant authority or browser Origin 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"
  ]
}
404 · SERVICE_NOT_FOUND: no current service in the credential tenant.

application/json · Error

  • errorobjectRequired
    View nested fields
    • codestringRequired
    • requestIdstring · uuidRequired
    • retryAfterintegerOptional

      minimum: 1

    • additionalPropertiesno value allowedSchema rule
  • additionalPropertiesno value allowedSchema rule
Complete schema and nested fields
JSON Schema
{
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "error": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "code": {
          "type": "string"
        },
        "requestId": {
          "type": "string",
          "format": "uuid"
        },
        "retryAfter": {
          "type": "integer",
          "minimum": 1
        }
      },
      "required": [
        "code",
        "requestId"
      ]
    }
  },
  "required": [
    "error"
  ]
}
405 · Method not allowed.

application/json · Error

  • errorobjectRequired
    View nested fields
    • codestringRequired
    • requestIdstring · uuidRequired
    • retryAfterintegerOptional

      minimum: 1

    • additionalPropertiesno value allowedSchema rule
  • additionalPropertiesno value allowedSchema rule
Complete schema and nested fields
JSON Schema
{
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "error": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "code": {
          "type": "string"
        },
        "requestId": {
          "type": "string",
          "format": "uuid"
        },
        "retryAfter": {
          "type": "integer",
          "minimum": 1
        }
      },
      "required": [
        "code",
        "requestId"
      ]
    }
  },
  "required": [
    "error"
  ]
}
409 · SERVICE_IN_USE (any appointment reference), SERVICE_ASSIGNMENT_REVIEW_REQUIRED (deleting a last explicit provider link would expand assignment), CATALOGUE_TOO_LARGE, PILOT_NOT_CONFIGURED, LEGACY_SERVICE_REQUIRES_LEGACY_EDITOR or OPERATION_CONFLICT. No partial acceptance; deactivate instead of deleting a referenced service.

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 · SERVICE_CHANGED or CATALOGUE_CHANGED. Preserve the draft and refresh/review; do not overwrite with a guessed fresh version.

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 · REQUEST_TOO_LARGE. Normal command body8KiB; exact reorder body64KiB.

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_REQUIRED when a body is supplied.

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_REQUEST, INVALID_PRECONDITION or INVALID_SERVICE_SETTINGS, including incomplete/duplicate reorder list or invalid final commercial values.

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 · Missing required Idempotency-Key or If-Match.

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 · Credential/site request limit.

application/json · Error

  • errorobjectRequired
    View nested fields
    • codestringRequired
    • requestIdstring · uuidRequired
    • retryAfterintegerOptional

      minimum: 1

    • additionalPropertiesno value allowedSchema rule
  • additionalPropertiesno value allowedSchema rule
Complete schema and nested fields
JSON Schema
{
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "error": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "code": {
          "type": "string"
        },
        "requestId": {
          "type": "string",
          "format": "uuid"
        },
        "retryAfter": {
          "type": "integer",
          "minimum": 1
        }
      },
      "required": [
        "code",
        "requestId"
      ]
    }
  },
  "required": [
    "error"
  ]
}
503 · PERSISTENCE_FAILED or OUTCOME_UNCERTAIN. Keep the original operation UUID, method, path, body and If-Match; recover before another intent.

application/json · Error

  • errorobjectRequired
    View nested fields
    • codestringRequired
    • requestIdstring · uuidRequired
    • retryAfterintegerOptional

      minimum: 1

    • additionalPropertiesno value allowedSchema rule
  • additionalPropertiesno value allowedSchema rule
Complete schema and nested fields
JSON Schema
{
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "error": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "code": {
          "type": "string"
        },
        "requestId": {
          "type": "string",
          "format": "uuid"
        },
        "retryAfter": {
          "type": "integer",
          "minimum": 1
        }
      },
      "required": [
        "code",
        "requestId"
      ]
    }
  },
  "required": [
    "error"
  ]
}