跳转到主要内容
跳到正文

开发者平台

评价请求 webhook

把客户发送到一个私密 URL,Repliq 就会给对方发邮件,邀请其在 Google 上评价你的业务,规则与手动发送完全相同。

9 分钟阅读更新于

这是什么

一个公开端点,每次调用接收一位客户,可来自你自己的系统,或店铺、支付、预约工具的 webhook。它与应用使用完全相同的发送流程:退订、30 天内不重复发送、套餐每月额度和提醒都会生效,因此自动化永远不会比你手动操作更频繁地打扰任何人。

端点

POST
https://repliqds.com/api/integrations/review-requests/{集成密钥}
https://repliqds.com/api/integrations/review-requests

大多数工具只能调用一个 URL,因此密钥放在路径里。如果你的系统可以设置请求头,请使用第二个 URL,并带上 Authorization: Bearer rq_…。

认证

  • 集成密钥格式为 rq_ 加 43 个 URL 安全字符。在 Repliq → 集成中创建时只显示一次;系统只保存其 SHA-256 哈希。
  • 每个密钥属于一个地点,可随时撤销。已撤销或未知的密钥会返回 401。
  • 密钥就是凭证:Repliq 不会在此端点校验 Shopify、Stripe、Square 或 Calendly 的签名。请保密该 URL,泄露后立即撤销。

请求

发送 Content-Type: application/json(最大 1 MB)或表单编码的请求体(最大 64 KB;这样 WooCommerce 的验证 ping 才能通过)。Repliq 只从固定路径读取客户信息,路径之外的字段会被忽略。

扁平数据

curl -sS -X POST https://repliqds.com/api/integrations/review-requests/$REPLIQ_INTEGRATION_KEY \
  -H "Content-Type: application/json" \
  -d '{"email":"maria@example.com","name":"Maria","locale":"es"}'
email必填 · string (email, ≤ 254)
客户邮箱。缺失时该推送会被确认并忽略。
name可选 · string (≤ 80)
用于问候语的名字。
locale可选 · `es` | `en` | `zh`
邮件语言。缺失时使用集成设置的语言。

也会读取 customer_email、customerName、language 等别名,以及下列工具的嵌套结构。

支持的数据结构

工具事件读取的字段
Shopifyorders/fulfilledcustomer.email 或 contact_email;customer.first_name
WooCommerce状态为 completed 的 order.updatedbilling.email;billing.first_name
Stripecheckout.session.completed、invoice.paiddata.object.customer_details.email / name;另有 customer_email、receipt_email、billing_details
Squarecustomer.createddata.object.customer.email_address / given_name
Calendlyinvitee.createdpayload.email / name;payload.scheduled_event.end_time

示例

Shopify(订单已发货)
{
  "id": 1001,
  "cancelled_at": null,
  "financial_status": "paid",
  "contact_email": "maria@example.com",
  "customer": {
    "email": "maria@example.com",
    "first_name": "Maria"
  }
}
Stripe(checkout.session.completed)
{
  "type": "checkout.session.completed",
  "data": {
    "object": {
      "payment_status": "paid",
      "customer_details": {
        "email": "maria@example.com",
        "name": "Maria Garcia"
      }
    }
  }
}
Calendly(invitee.created)
{
  "event": "invitee.created",
  "payload": {
    "email": "maria@example.com",
    "name": "Maria Garcia",
    "status": "active",
    "scheduled_event": {
      "end_time": "2026-12-01T10:30:00.000000Z"
    }
  }
}

Calendly 预约会被保留,并在 end_time 之后 2 小时发送;Repliq 返回 scheduled 和发送时间。取消预约会撤回该请求。距今超过 60 天的预约会被确认但不保留。这些数据已在 Repliq 的测试中对照真实映射逻辑验证。

响应

Repliq 能理解的每次推送都会返回 `202 Accepted`,包括不发送任何内容的情况,以免发送方不断重试并最终停用你的 webhook。

`status`含义附加字段
sent邮件已发送。reminderScheduled、remaining
scheduled已保留到稍后发送(预约或定时发送)。scheduledFor(ISO 8601)、reminderScheduled、remaining
skipped未发送任何内容。reason:opted_out、recently_asked 或 quota_exceeded;remaining
ignored不是已完成的购买或预约,或没有可用邮箱。reason:no_email、invalid_email 或 not_completed;取消预约撤回了保留的请求时带 withdrawn
202
{
  "status": "sent",
  "reminderScheduled": true,
  "remaining": 187
}

错误

HTTP错误码含义处理方法
400校验失败请求体无法解析为客户或可忽略事件。发送 JSON 对象。
401REVIEW_REQUEST_INTEGRATION_UNAUTHORIZED密钥缺失、格式错误、未知或已撤销,或工作区已归档。创建新密钥并更新发送方。
402REVIEW_REQUEST_INTEGRATIONS_PLAN_REQUIRED工作区没有有效的 Pro、MAX 或 Agency 套餐。开始试用或订阅套餐。
429频率限制该密钥在一小时内推送超过 600 次。稍后重试。
503REVIEW_REQUEST_INTEGRATIONS_UNAVAILABLE临时故障;该推送未被处理。采用退避策略重试。

上线前先测试

在集成页面,测试器会接收一份示例数据,并显示 Repliq 识别出的客户以及它是否会被忽略。测试器不会发送任何内容。另见限制与错误。

端点、状态码、数据路径和示例已对照 webhook 控制器与映射测试核实。

这个页面对你有帮助吗?

没有找到需要的内容?

查看常见问题,或给我们写信,我们会帮助你。

常见问题