syndicate-issue-agent-key

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Syndicate Links Agent or Affiliate Key

Syndicate Links Agent 或联盟密钥

Use this skill when an AI agent, agent builder, or human publisher needs a Syndicate Links affiliate key and tracking links.
The shipped rail is
affiliate
:
http
POST https://api.syndicatelinks.co/affiliate/register
POST https://api.syndicatelinks.co/affiliate/links
GET  https://api.syndicatelinks.co/affiliate/reports/conversions
Do not substitute draft-only publisher-named routes.
当AI Agent、Agent构建者或人工发布者需要Syndicate Links联盟密钥和追踪链接时,可使用本技能。
已上线的体系为
affiliate
:
http
POST https://api.syndicatelinks.co/affiliate/register
POST https://api.syndicatelinks.co/affiliate/links
GET  https://api.syndicatelinks.co/affiliate/reports/conversions
请勿使用仅草稿版的发布者命名路由。

Prerequisites

前提条件

  • An email address for the agent or publisher
  • A display name
  • Optional: website, agent platform, or agent ID
  • For tracking link creation: an approved partnership with the merchant program
  • Agent或发布者的电子邮箱地址
  • 显示名称
  • 可选:网站、Agent平台或Agent ID
  • 创建追踪链接:已获得商家项目的合作批准

1. Register as an agent affiliate

1. 注册为Agent联盟成员

bash
curl -sS -X POST https://api.syndicatelinks.co/affiliate/register \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Example Shopping Agent",
    "email": "agent@example.com",
    "type": "agent",
    "agentPlatform": "custom",
    "agentId": "example-agent-v1",
    "website": "https://agent.example.com",
    "description": "Autonomous publisher that recommends merchant products when relevant."
  }' | python3 -m json.tool
Expected success is
201 Created
with an affiliate profile and an
apiKey
. Copy the key immediately. Treat it as a secret.
Accepted
type
values are
agent
,
human
, and
hybrid
. For AI agents, use
agent
unless a human editorial surface is also involved.
bash
curl -sS -X POST https://api.syndicatelinks.co/affiliate/register \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Example Shopping Agent",
    "email": "agent@example.com",
    "type": "agent",
    "agentPlatform": "custom",
    "agentId": "example-agent-v1",
    "website": "https://agent.example.com",
    "description": "Autonomous publisher that recommends merchant products when relevant."
  }' | python3 -m json.tool
成功请求会返回
201 Created
状态码,同时包含联盟资料和
apiKey
。请立即复制该密钥,并将其视为机密信息。
接受的
type
值包括
agent
human
hybrid
。对于AI Agent,除非同时涉及人工编辑环节,否则请使用
agent
类型。

2. Store the key securely

2. 安全存储密钥

bash
export TOKEN="ak_live_sample"
Use your agent's secret store, environment manager, or deployment secret system. Never hardcode the key in prompts, repos, browser code, or public docs.
bash
export TOKEN="ak_live_sample"
请使用Agent的机密存储、环境管理器或部署机密系统存储密钥。切勿在提示词、代码仓库、浏览器代码或公开文档中硬编码密钥。

3. Create a tracking link

3. 创建追踪链接

You need an approved partnership with the target merchant program before link creation succeeds.
bash
curl -sS -X POST https://api.syndicatelinks.co/affiliate/links \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "programId": "program_uuid",
    "destinationUrl": "https://merchant.example.com/products/widget",
    "sourceTag": "agent-recommendation"
  }' | python3 -m json.tool
The response includes
trackingCode
. That is the code the merchant reports when it calls
POST /merchant/conversions
.
在创建链接前,您需要获得目标商家项目的合作批准,否则请求将无法成功。
bash
curl -sS -X POST https://api.syndicatelinks.co/affiliate/links \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "programId": "program_uuid",
    "destinationUrl": "https://merchant.example.com/products/widget",
    "sourceTag": "agent-recommendation"
  }' | python3 -m json.tool
响应结果包含
trackingCode
。当商家调用
POST /merchant/conversions
时,会上报该代码。

4. List existing tracking links

4. 列出已有的追踪链接

bash
curl -sS "https://api.syndicatelinks.co/affiliate/links?programId=program_uuid&limit=10" \
  -H "Authorization: Bearer $TOKEN" | python3 -m json.tool
bash
curl -sS "https://api.syndicatelinks.co/affiliate/links?programId=program_uuid&limit=10" \
  -H "Authorization: Bearer $TOKEN" | python3 -m json.tool

5. Check credited conversions

5. 查看已结算的转化数据

bash
curl -sS "https://api.syndicatelinks.co/affiliate/reports/conversions?limit=10" \
  -H "Authorization: Bearer $TOKEN" | python3 -m json.tool
Conversions can remain pending until the merchant payment window clears.
bash
curl -sS "https://api.syndicatelinks.co/affiliate/reports/conversions?limit=10" \
  -H "Authorization: Bearer $TOKEN" | python3 -m json.tool
转化数据可能会处于待处理状态,直到商家支付周期结束。

Common pitfalls

常见误区

  1. Endpoint naming. Use the shipped
    /affiliate/*
    routes for agent and publisher work.
  2. Key type. Affiliate keys are for link creation and reporting. Merchant keys are for firing merchant conversions.
  3. No approved partnership.
    POST /affiliate/links
    returns
    403
    if the affiliate is not approved for the program.
  4. Tracking code is not the key. The
    trackingCode
    goes into the merchant conversion payload. The affiliate key stays in the Authorization header.
  5. Agent identity fields. For agents, set
    type: "agent"
    and include
    agentPlatform
    or
    agentId
    when available.
  1. 端点命名:请使用已上线的
    /affiliate/*
    路由进行Agent和发布者相关操作。
  2. 密钥类型:联盟密钥用于创建链接和查看报告,商家密钥用于触发商家转化数据上报。
  3. 未获得合作批准:如果联盟成员未获得项目批准,
    POST /affiliate/links
    会返回
    403
    状态码。
  4. 追踪代码并非密钥
    trackingCode
    需放入商家转化请求的负载中,联盟密钥则保留在Authorization请求头中。
  5. Agent身份字段:对于Agent,请设置
    type: "agent"
    ,并在可用时填写
    agentPlatform
    agentId

Links

链接