syndicate-add-attribution
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseSyndicate Links Attribution Install
Syndicate Links 转化归因安装指南
Use this skill when a merchant needs to report orders into Syndicate Links attribution.
The live rail is server-side conversion reporting:
http
POST https://api.syndicatelinks.co/merchant/conversions
Authorization: Bearer mk_live_...This skill intentionally omits draft-only browser SDK, CDN snippet, and CLI verification paths. Use the authenticated merchant API only.
当商家需要将订单数据上报至Syndicate Links归因系统时,可使用本技能。
当前主流方案是服务器端转化上报:
http
POST https://api.syndicatelinks.co/merchant/conversions
Authorization: Bearer mk_live_...本技能刻意省略了仅草稿版的浏览器SDK、CDN代码片段以及CLI验证路径,仅使用经过认证的商家API。
Prerequisites
前提条件
- A Syndicate Links merchant account
- A merchant API key with scope
conversions:fire - A valid Syndicate Links tracking code for the affiliate or agent link being credited
- Server-side access to the order completion path
Never put a merchant API key in browser JavaScript, Liquid templates, mobile apps, or public repos.
- 拥有Syndicate Links商家账户
- 具备权限范围的商家API密钥
conversions:fire - 用于关联联盟或Agent链接的有效Syndicate Links追踪码
- 可访问订单完成路径的服务器端权限
切勿将商家API密钥放置在浏览器JavaScript、Liquid模板、移动应用或公共代码仓库中。
1. Identify the conversion boundary
1. 确定转化触发节点
Pick the backend point that runs once per completed order:
- Shopify: order status webhook, server app, or Shopify Function/backend worker
- Generic checkout: server-side success handler or payment webhook
- SaaS app: backend route called after payment succeeds
- Agent or MCP surface: server process that knows the selected tracking code
The implementation is the same for every surface: collect order data server-side, then call .
POST /merchant/conversions选择每个已完成订单仅执行一次的后端节点:
- Shopify:订单状态Webhook、服务器应用或Shopify Function/后端工作流
- 通用结账系统:服务器端成功处理程序或支付Webhook
- SaaS应用:支付成功后调用的后端路由
- Agent或MCP界面:知晓所选追踪码的服务器进程
所有场景的实现方式一致:在服务器端收集订单数据,然后调用接口。
POST /merchant/conversions2. Capture the tracking code
2. 获取追踪码
Syndicate Links conversion fire expects , not .
trackingCodepublisherCodeCommon sources:
- Tracking link code returned by
POST /affiliate/links - Code stored when the buyer entered through a Syndicate Links click URL
- Code supplied by an approved agent publisher flow
Persist the tracking code with the cart, checkout session, customer session, or order metadata so the backend can access it after payment completes.
Syndicate Links转化上报需要的是,而非。
trackingCodepublisherCode常见来源:
- 接口返回的追踪链接码
POST /affiliate/links - 买家通过Syndicate Links点击URL进入时存储的代码
- 经批准的Agent发布流程提供的代码
将追踪码与购物车、结账会话、客户会话或订单元数据一起持久化存储,以便后端在支付完成后能够访问该代码。
3. Fire the conversion
3. 触发转化上报
bash
curl -sS -X POST https://api.syndicatelinks.co/merchant/conversions \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{
"trackingCode": "trk_abc123",
"orderId": "order_123",
"saleAmount": 99.99,
"currency": "USD"
}' | python3 -m json.toolOptional fields supported by the implementation include and when your system has them. Keep stable and unique.
clickIditemsorderIdA successful response is with a conversion event, commission information, attribution metadata, and tracking fee details.
201 Createdbash
curl -sS -X POST https://api.syndicatelinks.co/merchant/conversions \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{
"trackingCode": "trk_abc123",
"orderId": "order_123",
"saleAmount": 99.99,
"currency": "USD"
}' | python3 -m json.tool若系统具备相关数据,还可支持和等可选字段。确保稳定且唯一。
clickIditemsorderId成功响应状态为,包含转化事件、佣金信息、归因元数据以及追踪费用详情。
201 Created4. Verify recent conversions
4. 验证近期转化记录
bash
curl -sS "https://api.syndicatelinks.co/merchant/conversions?limit=5" \
-H "Authorization: Bearer $TOKEN" | python3 -m json.toolLook for:
- The expected
orderId - matching the order total
saleAmount - of
statusorpendingconfirmed - populated
affiliateId - set, usually
attributionMethodunless a click match upgraded ittracking_code
bash
curl -sS "https://api.syndicatelinks.co/merchant/conversions?limit=5" \
-H "Authorization: Bearer $TOKEN" | python3 -m json.tool需检查以下内容:
- 预期的
orderId - 与订单总额匹配
saleAmount - 为
status或pendingconfirmed - 已填充
affiliateId - 已设置,通常为
attributionMethod,除非通过点击匹配升级tracking_code
Platform notes
平台注意事项
Shopify
Shopify
Do not paste merchant API keys into theme Liquid. Use an authenticated backend app, order webhook, or server function. Store the tracking code in order metadata if you capture it before checkout.
请勿将商家API密钥粘贴到主题Liquid中。请使用经过认证的后端应用、订单Webhook或服务器函数。若在结账前获取到追踪码,可将其存储在订单元数据中。
Generic checkout
通用结账系统
Call the conversion endpoint from the payment success webhook or server success route. Do not call it from a browser thank-you page.
从支付成功Webhook或服务器成功路由调用转化接口,请勿从浏览器感谢页面调用。
SaaS apps
SaaS应用
Call the conversion endpoint from your backend payment handler, for example a Stripe, Paddle, Chargebee, or Lemon Squeezy webhook worker.
从后端支付处理程序调用转化接口,例如Stripe、Paddle、Chargebee或Lemon Squeezy的Webhook工作流。
Agent surfaces
Agent界面
If an AI agent can choose or recommend a merchant link, have it pass the selected tracking code to the merchant server. The merchant server still performs the authenticated conversion fire.
若AI Agent可选择或推荐商家链接,请让其将所选追踪码传递给商家服务器。仍需由商家服务器执行经过认证的转化上报操作。
Common pitfalls
常见误区
- Wrong endpoint. Use with no version prefix.
https://api.syndicatelinks.co/merchant/conversions - Wrong amount field. The API expects , not
saleAmount.amount - Wrong attribution field. The API expects , not
trackingCode.publisherCode - Client-side secrets. Merchant API keys must stay server-side.
- Duplicate order IDs. Reusing can cause reporting and reconciliation drift.
orderId
- 错误的接口地址:请使用,不要添加版本前缀。
https://api.syndicatelinks.co/merchant/conversions - 错误的金额字段:API期望的是,而非
saleAmount。amount - 错误的归因字段:API期望的是,而非
trackingCode。publisherCode - 客户端存储密钥:商家API密钥必须仅在服务器端使用。
- 重复的订单ID:重复使用可能导致上报和对账偏差。
orderId
Links
相关链接
- API reference: https://syndicatelinks.co/docs/api-reference
- Getting started: https://syndicatelinks.co/docs/getting-started
- Agent readiness: https://syndicatelinks.co/llms.txt
- Agent manifest: https://syndicatelinks.co/.well-known/agent.json