Unified Api Migration Guide 标志

Unified Api Migration Guide

社区
wjwwwww
unified-api-migration-guide

Use when a developer asks about migrating from legacy Amazon Ads APIs (SP v3 or SB v4) to the Unified API (/adsApi/v1/), assessing migration scope, identifying effort levels, determining what can and cannot be migrated, and planning migration steps.

概览

发布者wjwwwww
代码仓库amazon-ads-api-skills
技能名称unified-api-migration-guide
星标数
30
复刻数
2
附带文件
仅含指令
许可协议MIT
链接
  • Markdown 格式的指令

    模型按需加载 SKILL.md 文件,因此只有在请求确实与该技能匹配时才会消耗 Token。

  • 兼容任何大语言模型

    AI 技能采用纯 Markdown,而非特定提供商的代码,因此可搭配 GPT、Claude、Gemini、Grok 或本地模型使用。

  • 指令自成一体

    模型所需的一切都包含在指令中,无需同步额外文件。

  • 开源

    由 wjwwwww 发布于 GitHub。请在安装前查看技能的源文件。

安装

在 TypingMind 中安装 Unified Api Migration Guide AI 技能,即可搭配任意大语言模型使用;也可以将其放入其他支持读取 SKILL.md 的智能体中。

1

安装到 TypingMind

TypingMind 可直接从 GitHub 文件夹安装技能:读取 SKILL.md,打包资源文件,并将结果保存在本地。

  1. 打开应用,前往“插件 → 技能”。
  2. 选择“从 GitHub 安装”。
  3. 粘贴下方的技能文件夹 URL 并确认。
    https://github.com/wjwwwww/amazon-ads-api-skills/tree/main/skills/unified-api-migration-guide
  4. 请在每个需要使用该技能的聊天中启用它。
依次选择“插件 → 技能 → 添加技能 → 从 GitHub URL 导入”,然后粘贴文件夹 URL 并点击“继续”。
2

安装到其他智能体

任何支持 Agent Skills 格式的智能体都可以使用此技能,只需将文件夹复制到该智能体的技能目录中。

Claude Code — .claude/skills
git clone --depth 1 https://github.com/wjwwwww/amazon-ads-api-skills.git /tmp/amazon-ads-api-skills
mkdir -p .claude/skills
cp -r /tmp/amazon-ads-api-skills/skills/unified-api-migration-guide .claude/skills/unified-api-migration-guide
复制后,请重启 Claude Code,以加载新技能。

在 TypingMind 中使用此技能

在任意 TypingMind 聊天中启用 Unified Api Migration Guide,后续即可交由模型处理。技能的名称和描述会放在系统提示词中,一旦请求匹配,模型就会自动加载完整指令,无需您手动调用,且在实际使用前不会消耗 Token。

一旦请求与技能匹配,模型就会自动加载 Unified Api Migration Guide。

兼容任何 AI 模型

AI 技能是纯 Markdown 指令,而非特定提供商的代码,因此 Unified Api Migration Guide 不局限于最初适配的模型。只需在 TypingMind 中安装一次,即可搭配 GPT-5、Claude、Gemini、Grok、DeepSeek、Mistral、Llama 或您自行运行的本地模型使用,全程使用您自己的 API 密钥。

  • 仅在需要时加载

    系统提示词中仅包含技能名称和描述。首次遇到匹配的请求时才会加载完整指令,因此技能未使用时,这些指令不会消耗 Token。

  • 在聊天中切换模型

    技能是指令而非代码,因此切换模型不会导致技能失效,新模型会读取同一个 SKILL.md。

技能指令

这是模型会加载的 SKILL.md 内容。请在安装前阅读,因为技能就是模型将遵循的指令。

Amazon Ads: Legacy API to Unified API Migration Guide

How to Use This Skill

This skill guides developers through a structured migration assessment. When a developer asks about migration, walk them through these steps in order. For detailed field-level mapping, refer to the product-specific skills:

  • SP migration details → unified-sp-migration skill
  • SB migration details → unified-sb-migration skill

Step 1: Discovery — What Are You Currently Using?

Ask the developer to identify their current integration:

Questions to Ask

  1. Which ad product(s)? SP, SB, or both?
  2. Which endpoints do you call? (provide the checklist below)
  3. Which operations? Create, Read/List, Update, Delete, Recommendations, Reporting?
  4. What's your priority? New feature adoption? Sunset deadline? Consolidation?

SP v3 Endpoint Checklist

CategoryEndpointsMigrable?
Campaigns/sp/campaigns (CRUD)✅ Yes
Ad Groups/sp/adGroups (CRUD)✅ Yes
Product Ads/sp/productAds (CRUD)✅ Yes
Keywords/sp/keywords (CRUD)✅ Yes (→ targets)
Negative Keywords/sp/negativeKeywords (CRUD)✅ Yes (→ targets, negative=true)
Campaign Negative Keywords/sp/campaignNegativeKeywords (CRUD)✅ Yes (→ targets, campaign-level)
Targets/sp/targets (CRUD)✅ Yes
Negative Targets/sp/negativeTargets (CRUD)✅ Yes (→ targets, negative=true)
Campaign Negative Targets/sp/campaignNegativeTargets (CRUD)✅ Yes (→ targets, campaign-level)
Budget Rules/sp/budgetRules❌ No — keep using v3
Budget Recommendations/sp/campaigns/budgetRecommendations❌ No
Budget Usage/sp/campaigns/budget/usage❌ No
Campaign Recommendations/sp/campaign/recommendations❌ No
Optimization Rules/sp/rules/optimization❌ No
Keyword Recommendations/sp/targets/keywords/recommendations❌ No
Product Recommendations/sp/targets/products/recommendations❌ No
Bid Recommendations/sp/targets/bid/recommendations❌ No
Targetable Categories/sp/targets/categories❌ No
Category Refinements/sp/targets/category/{id}/refinements❌ No
Negative Target Brand Recs/sp/negativeTargets/brands/recommendations❌ No
Target Promotion Groups/sp/targetPromotionGroups❌ No
Events/sp/v1/events❌ No
ReportingReporting APIs❌ No change needed (separate API)

SB v4 Endpoint Checklist

CategoryEndpointsMigrable?
Campaigns/sb/v4/campaigns (CRUD)✅ Yes
Ad Groups/sb/v4/adGroups (CRUD)✅ Yes
Ads (all types)/sb/v4/ads/* (CRUD)✅ Yes
Ad Creatives/sb/ads/creatives/*✅ Yes (merged into update/ads)
Budget Rules/sb/budgetRules❌ No — keep using v4
Budget Recommendations/sb/campaigns/budgetRecommendations❌ No
Budget Usage/sb/campaigns/budget/usage❌ No
Campaign Insights/sb/campaigns/insights❌ No
Forecasts/sb/forecasts❌ No
Optimization Rules/sb/rules/optimization❌ No
Headline Recommendations/sb/recommendations/creative/headline❌ No
Negative Target Brand Recs/sb/negativeTargets/brands/recommendations❌ No
Targetable Categories/sb/targets/categories❌ No
V3 Migration/sb/v4/legacyCampaigns/migrationJob❌ No
ReportingReporting APIs❌ No change needed (separate API)

Step 2: Assess — Effort Level Per Area

Once you know what endpoints are in scope, assess the effort level:

Effort Matrix

Migration AreaEffortReason
Headers🟢 LowRename 1 header, change Content-Type
Campaign CRUD🟡 MediumBudget restructuring, date format, bidding restructuring
Ad Group CRUD🟢 LowAdd adProduct, wrap bid in object
Ad/Product Ad CRUD🟡 MediumNew creative wrapper structure
Targeting (SP)🔴 High5+ endpoints consolidated into 1; complete restructuring
Targeting (SB)🟡 MediumSimilar consolidation but simpler structure
Bidding/Placement🟡 MediumEnum renames, structure move
Audience Adjustments🟡 MediumFlattened structure, fields removed
Query/List🟢 LowAdd adProductFilter, minor response changes
Response Parsing🟢 LowRemove wrapper, update error handling

SP-Specific Effort Summary

If you use...EffortKey changes
Campaign CRUD only🟡 MediumBudget, dates, bidding restructuring
+ Ad Groups🟢 Low addedWrap defaultBid in object
+ Product Ads🟡 Medium addedNew creative wrapper for ASIN
+ Keywords🔴 High addedMove to /targets endpoint, new structure
+ Targets (product/category)🔴 High addedExpression format → typed objects
+ Negatives (all types)🔴 High addedConsolidate 4 endpoints into 1 with flags
+ Budget Rules/RecommendationsNo effortKeep using v3 (not migrable)

SB-Specific Effort Summary

If you use...EffortKey changes
Campaign CRUD only🟡 MediumBudget, dates, goal, bidding restructuring
+ Ad Groups🟢 Low addedAdd adProduct
+ Ads (collections)🟡 Medium addedNew componentCreative wrapper
+ Ads (video/spotlight)🟡 Medium addedNew creative settings structure
+ Budget Rules/InsightsNo effortKeep using v4 (not migrable)

Step 3: Understand What Changes

3.1 Transport-Level Changes (applies to ALL endpoints)

ChangeBeforeAfterImpact
Client ID headerAmazon-Advertising-API-ClientIdAmazon-Ads-ClientIdGlobal find-replace
Content-TypeVersioned per resourceapplication/jsonGlobal find-replace
HTTP methodMixed (POST/PUT/GET/DELETE)All POSTUpdate HTTP client calls
Scope headerRequiredOptionalCan keep sending it
Account ID headerN/AAmazon-Ads-AccountId (optional)Optional addition

3.2 Request Body Changes (applies to ALL create/query)

ChangeBeforeAfter
Ad productNot neededadProduct: "SPONSORED_PRODUCTS" or "SPONSORED_BRANDS" required
MarketplaceNot neededmarketplaceScope: "SINGLE_MARKETPLACE" required for campaigns
Date formatYYYY-MM-DDISO 8601 YYYY-MM-DDTHH:mm:ssZ
Date field namesstartDate/endDatestartDateTime/endDateTime
Query filterOptionaladProductFilter required in all queries

3.3 Response Changes

ChangeBeforeAfter
Wrapper{ "campaigns": { "success": [...], "error": [...] } }{ "success": [...], "error": [...] }
Status fieldservingStatus (single string, always present)status: { deliveryStatus, deliveryReasons[] } (optional, array of reasons)
Error formatException-based (InvalidArgumentException)Enum-based (ErrorCode: "BAD_REQUEST")

Step 4: Key Enum Mappings (Quick Reference)

Bidding Strategy

SP v3SB v4Unified API
LEGACY_FOR_SALES—SALES_DOWN_ONLY
AUTO_FOR_SALESbidOptimization: trueSALES_UP_AND_DOWN
MANUALbidOptimization: falseMANUAL
RULE_BASED—RULE_BASED

Placement

Unified APISP v3SB v4
TOP_OF_SEARCHPLACEMENT_TOPTOP_OF_SEARCH
PRODUCT_PAGEPLACEMENT_PRODUCT_PAGEDETAIL_PAGE
REST_OF_SEARCHREST_OF_SEARCHREST_OF_SEARCH
HOME_PAGEN/AHOME

SP Auto Target Match Types

Unified APISP v3
SEARCH_LOOSE_MATCHQUERY_BROAD_REL_MATCHES
SEARCH_CLOSE_MATCHQUERY_HIGH_REL_MATCHES
PRODUCT_SUBSTITUTESASIN_SUBSTITUTE_RELATED
PRODUCT_COMPLEMENTSASIN_ACCESSORY_RELATED

SP Product Match Types

Unified APISP v3Meaning
PRODUCT_EXACTASIN_SAME_ASASIN exact
PRODUCT_SIMILARASIN_EXPANDED_FROMASIN expanded

SB Landing Page Types

Unified APISB v4
ASIN_LISTPRODUCT_LIST
STORESTORE

Step 5: Migration Plan Template

Recommend this phased approach to developers:

Phase 1: Transport Layer (Day 1)

  • Update headers
  • Change Content-Type to application/json
  • Change all methods to POST
  • Update base paths

Phase 2: Read Operations (Week 1)

  • Migrate query/list endpoints first (low risk, read-only)
  • Add adProductFilter to all queries
  • Update response parsing
  • Validate data matches v3/v4 responses

Phase 3: Campaign/Ad Group Write (Week 2)

  • Migrate campaign create/update
  • Migrate ad group create/update
  • Test with real campaigns in sandbox/test account

Phase 4: Ad & Targeting Write (Week 3-4)

  • Migrate ad creation (new creative structure)
  • Migrate targeting (biggest change for SP)
  • Consolidate negative targeting endpoints

Phase 5: Cleanup

  • Remove old v3/v4 code paths
  • Keep v3/v4 only for non-migrable features (budget rules, recommendations, etc.)
  • Update error handling for new error codes

Step 6: Common Pitfalls

#PitfallHow to Avoid
1Forgetting adProduct fieldAdd to every create/query request body
2Wrong date formatUse ISO 8601 with timezone, not YYYY-MM-DD
3Old Content-TypeGlobal replace to application/json
4Old header nameAmazon-Advertising-API-ClientId → Amazon-Ads-ClientId
5Flat budget numberMust use nested budgets[] array
6Missing adType on adsAlways include (SP: PRODUCT_AD, SB: COMPONENT)
7Old placement enumsCheck mapping table above
8Old bidding strategy enumsLEGACY_FOR_SALES → SALES_DOWN_ONLY etc.
9Separate negative endpointsUse same /targets endpoint with negative: true
10Expecting servingStatus always presentstatus is optional in Unified API

Step 7: Open Questions (Things to Verify)

These items cannot be determined from API schemas alone. Recommend opening a support case:

SP

  • How to clear campaign endDateTime to "no end date" (null may not work as expected)
  • Whether defaultBid has a server-side default value when not provided
  • Exact behavior of PRODUCT_SIMILAR match type (is it identical to v3's ASIN_EXPANDED_FROM?)

SB

  • Exact goal → goalSettings.kpi mapping (PAGE_VISIT→CLICKS, BRAND_IMPRESSION_SHARE→TOP_OF_SEARCH_IMPRESSION_SHARE)
  • Whether audienceId values from v4 are directly portable
  • How "default audience" is expressed without audienceSegmentType

Both

  • costType not returned in SP campaign response — is this by design?
  • status field not present on all objects — when is it populated?
  • Timeline for v3/v4 sunset (when will legacy APIs stop working?)

常见问题

Unified Api Migration Guide AI 技能有什么作用?

Use when a developer asks about migrating from legacy Amazon Ads APIs (SP v3 or SB v4) to the Unified API (/adsApi/v1/), assessing migration scope, identifying effort levels, determining what can and cannot be migrated, and planning migration steps.

为什么在 TypingMind 中使用 Unified Api Migration Guide?

因为您只需安装一次,就能搭配任何模型使用。Unified Api Migration Guide 采用纯 Markdown 格式,而非特定提供商专用的代码,因此同一技能可用于 GPT-5、Claude、Gemini、Grok 或本地模型。您甚至可以在聊天中途切换模型,而不会影响技能的正常使用。TypingMind 使用您自己的 API 密钥,因此您直接向提供商付费,而不是按席位订阅;您的技能和聊天记录也都保留在您自己的存储空间中。

如何在 TypingMind 中安装 Unified Api Migration Guide?

在 TypingMind 中打开“插件 → 技能 → 从 GitHub 安装”,然后粘贴 https://github.com/wjwwwww/amazon-ads-api-skills/tree/main/skills/unified-api-migration-guide。TypingMind 会读取其中的 SKILL.md,并将其安装为技能,供您在各个聊天中按需启用。

哪些 AI 模型可以使用 Unified Api Migration Guide?

您在 TypingMind 中连接的任何模型都可以。AI 技能采用纯 Markdown 指令,而非特定提供商专用的代码,因此 GPT、Claude、Gemini、Grok 和本地模型都能在请求匹配时加载此技能。

Unified Api Migration Guide 可以搭配多少个 AI 模型使用?

数量不限。只要模型支持技能,您就可以将它与 Unified Api Migration Guide 搭配使用。GPT、Claude、Gemini、Grok、DeepSeek、Mistral、Llama 等模型都可以通过您自己的 API 密钥接入 TypingMind。

Unified Api Migration Guide AI 技能免费吗?

是的。wjwwwww 已在 GitHub 上根据 MIT 许可证发布了该技能。您只需向自己的 AI 提供商支付所用 Token 的费用。

什么是 AI 技能?

AI 技能是一组可复用的指令,用于教会 AI 模型完成某项特定任务。它遵循开放的 Agent Skills 格式:包含名称和描述的 SKILL.md 文件,以及模型可能需要的脚本、模板或参考文件。模型仅在您的请求与技能匹配时才会读取这些指令,因此已安装的技能在使用前不会产生任何费用。

AI 技能与插件或 MCP 服务器有何不同?

插件或 MCP 服务器为模型提供可调用的新工具,也就是在某处运行并返回结果的代码。AI 技能则为模型提供知识和流程:如何处理任务、遵循哪些步骤,以及怎样的输出才算优质。技能采用纯 Markdown 格式,因此不需要服务器、API 密钥或运行时环境,并且适用于任何模型。

查看全部

立即创建您自己的 AI 工作区

订阅我们的电子简报,获取新功能和后续赠奖活动的通知 👇