MCP Control
Лояльность · Изменение

Клиенты · Рефералы · Ссылки · Установка значения · Включённые

customer_referral_link_set_enabled
Контактные карточки и телефон

Попробуйте три запроса

Подготовить
  1. Вы указываетеОбъект
  2. ПомощникПодготовка
  3. Вы получаетеПредпросмотр
Запрос в чат
Подготовь «Клиенты / Рефералы / Ссылки / Установка значения / Включённые». Для изменения нужны code, включение. Покажи объект и ожидаемый эффект до выполнения.
Что входит в подготовку
code
Параметр
enabled
Включение
Применить
  1. Вы указываетеСогласованные значения
  2. ПомощникОдин вызов
  3. Вы получаетеОтвет операции
Запрос в чат
На учебной записи подготовь «Клиенты / Рефералы / Ссылки / Установка значения / Включённые» с параметром enabled = true. Покажи остальные обязательные значения и выполни действие, когда согласованы все поля.
Фрагмент учебных параметров
enabled
true
expectedRevision
4
Проверить итог
  1. Вы указываетеИсходный ответ
  2. ПомощникСверка результата
  3. Вы получаетеПодтверждение
Запрос в чат
Проверь результат «Клиенты / Рефералы / Ссылки / Установка значения / Включённые» по исходному ответу. Покажи companyId, code. Объясни, чем подтвердить эффект для выбранного объекта.
Как сверить изменение
  1. До измененияПрочитать версию
  2. При записиПередать выбранную версию
  3. После ответаПеречитать объект
Как работает действие

Этот вызов может изменить рабочие данные. Согласуйте точный объект, новые значения и ожидаемый результат. Присвойте операции стабильный requestId. При повторе той же операции используйте прежний ключ и те же значения. Прочитайте актуальную версию записи перед подготовкой запроса.

Описание разработчика

Enable or disable an existing referral link at its exact revision. Disabling prevents new attribution and preserves already committed Order conditions.

Параметры запроса
code
Public customer referral code returned by link creation. обязательно по схеме · string
enabled
Allow new attribution from this link. обязательно по схеме · boolean
expectedRevision
Версия, прочитанная перед изменением. обязательно по схеме · integer · минимум 0 · максимум 9007199254740991
requestId
Ключ этой операции. Для повтора с теми же аргументами сохраните исходное значение. обязательно по схеме · string
Что вернёт команда
companyId
Authenticated company owning this record. обязательно по схеме · string
code
Public customer referral code returned by link creation. обязательно по схеме · string
groupId
Exact existing native customer group ID; this also identifies its referral program. обязательно по схеме · string
customerId
Exact active native customer ID in this company. обязательно по схеме · string
url
Shareable destination including the public customer_ref code. обязательно по схеме · string
expiresAt
UTC Unix milliseconds when the link expires, or null for no link-specific expiration. обязательно по схеме · number / null
disabled
Whether new attribution from this link is blocked. обязательно по схеме · boolean
revision
Current native referral record revision. обязательно по схеме · integer · минимум 0 · максимум 9007199254740991
createdAt
Creation time in UTC Unix milliseconds. обязательно по схеме · number
programRevision
Program revision observed when this link was created. обязательно по схеме · integer · минимум 0 · максимум 9007199254740991
Поля и технические схемы
Входные поля и поля ответа customer_referral_link_set_enabled
Вход · JSON Schema
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "code": {
      "type": "string",
      "pattern": "^cr_[A-Za-z0-9_-]{32}$",
      "description": "Public customer referral code returned by link creation."
    },
    "enabled": {
      "type": "boolean",
      "description": "Allow new attribution from this link."
    },
    "expectedRevision": {
      "type": "integer",
      "minimum": 0,
      "maximum": 9007199254740991,
      "description": "Exact current revision returned by the corresponding read action."
    },
    "requestId": {
      "type": "string",
      "pattern": "^[A-Za-z0-9_-]{8,128}$",
      "description": "Stable identifier for this exact request; retry or recover unchanged after uncertainty."
    }
  },
  "required": [
    "code",
    "enabled",
    "expectedRevision",
    "requestId"
  ],
  "additionalProperties": false
}
Выход · JSON Schema
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "companyId": {
      "type": "string",
      "pattern": "^[A-Za-z0-9_~:@+.-]{1,128}$",
      "description": "Authenticated company owning this record."
    },
    "code": {
      "type": "string",
      "pattern": "^cr_[A-Za-z0-9_-]{32}$",
      "description": "Public customer referral code returned by link creation."
    },
    "groupId": {
      "type": "string",
      "pattern": "^[A-Za-z0-9_~:@+.-]{1,128}$",
      "description": "Exact existing native customer group ID; this also identifies its referral program."
    },
    "customerId": {
      "type": "string",
      "pattern": "^[A-Za-z0-9_~:@+.-]{1,128}$",
      "description": "Exact active native customer ID in this company."
    },
    "url": {
      "type": "string",
      "format": "uri",
      "description": "Shareable destination including the public customer_ref code."
    },
    "expiresAt": {
      "description": "UTC Unix milliseconds when the link expires, or null for no link-specific expiration.",
      "type": [
        "number",
        "null"
      ]
    },
    "disabled": {
      "type": "boolean",
      "description": "Whether new attribution from this link is blocked."
    },
    "revision": {
      "type": "integer",
      "minimum": 0,
      "maximum": 9007199254740991,
      "description": "Current native referral record revision."
    },
    "createdAt": {
      "type": "number",
      "description": "Creation time in UTC Unix milliseconds."
    },
    "programRevision": {
      "type": "integer",
      "minimum": 0,
      "maximum": 9007199254740991,
      "description": "Program revision observed when this link was created."
    }
  },
  "required": [
    "companyId",
    "code",
    "groupId",
    "customerId",
    "url",
    "expiresAt",
    "disabled",
    "revision",
    "createdAt",
    "programRevision"
  ],
  "additionalProperties": false
}