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

Клиенты · Рефералы · Ссылки · Создание

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

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

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

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

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

Create an idempotent personal referral link for an active customer in the selected program group. The public destination is HTTPS without credentials/query/fragment; customer_ref contains only a random public code. No message is sent.

Параметры запроса
groupId
Exact existing native customer group ID; this also identifies its referral program. обязательно по схеме · string
customerId
Идентификатор клиента, выбранного по результату поиска. обязательно по схеме · string
destinationUrl
Public HTTPS landing page without query, fragment, or credentials. обязательно по схеме · string · до символов 1000
expiresAt
UTC Unix milliseconds when the link expires, or null for no link-specific expiration. обязательно по схеме · integer / null · по умолчанию null
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_create
Вход · JSON Schema
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "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."
    },
    "destinationUrl": {
      "type": "string",
      "maxLength": 1000,
      "format": "uri",
      "description": "Public HTTPS landing page without query, fragment, or credentials."
    },
    "expiresAt": {
      "default": null,
      "description": "UTC Unix milliseconds when the link expires, or null for no link-specific expiration.",
      "anyOf": [
        {
          "type": "integer",
          "minimum": 0,
          "maximum": 9007199254740991
        },
        {
          "type": "null"
        }
      ]
    },
    "requestId": {
      "type": "string",
      "pattern": "^[A-Za-z0-9_-]{8,128}$",
      "description": "Stable identifier for this exact request; retry or recover unchanged after uncertainty."
    }
  },
  "required": [
    "groupId",
    "customerId",
    "destinationUrl",
    "expiresAt",
    "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
}