编程

亚马逊-店铺Fulfillment Inbound

试用

亚马逊 FBA 入仓与 Fulfillment Inbound SP-API 能力,经 LinkFox /spApi/developerProxy 管理 inbound plan、装箱、placement、shipment、shipment content update、delivery window、自配送预约、运输方案、合规、预处理、标签及 BOL。用户提到 createInboundPlan、packing option、placement option、transportation option、FBA 入库计划、货件箱唛、入仓标签、送仓预约、shipmentConfirmationId、Fulfillment Inbound API 或 v2024-03-20/v0 时触发。

它能做什么

亚马逊 FBA 入仓与 Fulfillment Inbound SP-API 能力,经 LinkFox /spApi/developerProxy 管理 inbound plan、装箱、placement、shipment、shipment content update、delivery window、自配送预约、运输方案、合规、预处理、标签及 BOL。用户提到 createInboundPlan、packing option、placement option、transportation option、FBA 入库计划、货件箱唛、入仓标签、送仓预约、shipmentConfirmationId、Fulfillment Inbound API 或 v2024-03-20/v0 时触发。

技能文档

Amazon 店铺 Fulfillment Inbound

本 Skill 覆盖 Amazon Fulfillment Inbound v2024-03-20 的 45 个 operation,以及仍需配合新流程使用的 6 个 v0 查询/文档 operation。所有请求继续使用 Amazon Store 系列的生产链路:POST /spApi/developerProxy,由服务端通过 sellerId + region 解析授权。

Prerequisites(必须先读)

  1. 本 Skill 依赖 linkfox-amazon-store-auth。先运行 python scripts/check_auth_dependency.py;若 exit code 为 42 且 stderr 含 DEPENDENCY_MISSING:,先安装或加载该依赖。
  2. 通过 auth Skill 选定店铺,取得 sellerIdregionregion 仅允许 NAEUFE
  3. 不接收、存储或透传 amzAccessTokenaccessTokenrefreshToken。不要让调用方覆盖 Amazon pathmethod 或网关 queryString
  4. 先读与任务匹配的分组文档;完整契约入口见 references/api.md

调用方式

  • API 端点POST /spApi/developerProxy(完整参数/响应/错误码见 references/api.md
  • Python 脚本python scripts/.py '' [--inline] [--no-cache]
  • 调用约束:本工具沿用 Amazon Store Skill 的统一免费配置;同一会话同一参数组合默认只调用一次,脚本带 24h 本地缓存。失败/空结果不得自动换参数、翻页或连续试探;需要继续调用时先征得用户同意。

输出策略(脚本默认行为)

  • 始终将完整响应写入 /linkfox///data/linkfox-amazon-store-fulfillment-inbound-.json 为脚本执行时的工作目录, 取自环境变量 SESSION_ID;禁止写入 /tmp,当前目录不可写则报错)
  • 响应体 ≤ 8 KB:落盘后把完整 JSON 打印到 stdout
  • 响应体 > 8 KB:落盘后 stdout 只输出摘要(顶层字段、常见计数、最大列表字段长度及前 3 条样本)
  • --inline 强制全量打印到 stdout(同样落盘)
  • --no-cache 强制本次读/生成操作访问网关;只在用户要求刷新或已确认外部状态变化时使用

读数据建议:先看摘要判断是否足够;需要具体字段时优先用 jqConvertFrom-Json 从保存的 JSON 文件按需抽取,避免整份 JSON 进入上下文。

工作方式

每个公开脚本只代表一个固定 operation,并且一次执行最多调用一次网关。统一执行器负责:

  • 校验公共字段、path/query/body、枚举、分页上限和关键嵌套约束;
  • 对 path segment 与 query 参数进行百分号编码;
  • 将 v0 CLI 的 lowerCamelCase 参数映射为 Amazon 要求的 PascalCase wire 名称;
  • 识别 200/201/202/204 成功响应并解析 JSON;
  • 对异步响应返回显式 nextAction,但不自动轮询;
  • 保存完整响应,大响应只在 stdout 展示摘要。

调用格式:

python scripts/.py '' [--inline] [--no-cache]

公共参数:

参数必填说明
sellerId已授权 Seller ID
regionNA / EU / FE
path/query 参数条件使用各 operation 文档中的 lowerCamelCase 名称
requestBody条件Amazon JSON body;推荐显式传此对象,也兼容将 body 字段放在顶层
confirmWrite提交类操作必填用户明确确认目标和选择后传布尔值 true;8 个确定性提交操作缺少该值时脚本会在网关调用前拒绝
skipDepCheck仅本地调试使用

示例:

python scripts/get_inbound_plan.py '{"sellerId":"A1...","region":"NA","inboundPlanId":"wf12345678-1234-1234-1234-123456789012"}'

python scripts/create_inbound_plan.py '{"sellerId":"A1...","region":"NA","requestBody":{"destinationMarketplaces":["ATVPDKIKX0DER"],"items":[{"labelOwner":"AMAZON","msku":"SKU-1","prepOwner":"SELLER","quantity":10}],"sourceAddress":{"name":"Warehouse","addressLine1":"1 Main St","city":"Seattle","countryCode":"US","phoneNumber":"+1-206-555-0100","postalCode":"98101","stateOrProvinceCode":"WA"}}}'

python scripts/get_labels.py '{"sellerId":"A1...","region":"NA","shipmentConfirmationId":"FBA...","pageType":"PackageLabel_Letter_2","labelType":"UNIQUE"}'

选择 operation

分组用途详细参数与脚本
Inbound Plans创建、读取、取消、改名、查看 plan 内容inbound-plans.md
Packing生成/确认装箱方案、提交箱规、查看 packing grouppacking.md
Placement生成、列出、确认分仓方案placement.md
Shipments读取货件、箱/件/托盘、名称和地址、trackingshipments.md
Content Updates预览并确认已建货件内容变更shipment-content-updates.md
Deliverydelivery window 与 delivery challandelivery-windows-and-documents.md
Self-ShipIndia 自配送预约槽与预约self-ship-appointments.md
Transportation生成、比较、确认运输方案transportation.md
Prep / Compliance / Labels预处理、合规和商品标签prep-compliance-labels.md
Async Status查询 operationId 的执行状态asynchronous-operations.md
Retained v0prep instructions、箱唛、BOL、旧货件查询legacy-v0.md

执行规则

  1. 先确认当前工作流阶段及已有 ID;ID 的来源和跨版本映射见 references/identifiers.md。已有 plan/shipment 时优先只读恢复,不重复创建。
  2. 写操作前确认用户意图和目标店铺。以下 8 个确定性提交操作必须在执行前向用户展示关键选择并取得明确确认:cancelInboundPlanconfirmPackingOptionconfirmPlacementOptionconfirmShipmentContentUpdatePreviewconfirmDeliveryWindowOptionscancelSelfShipAppointmentscheduleSelfShipAppointmentconfirmTransportationOptions
  3. confirmTransportationOptions 可能接受运输费用;确认前展示每个 shipment 的 option、费用、币种、时效与 expiration。不得替用户默认选择收费项。
  4. 19 个异步发起 operation 返回 operationId 后,只调用 get_inbound_operation_status.py 查询。IN_PROGRESS 时停止并告知稍后再查;FAILED 时展示 operationProblems,不得进入下游写步骤;仅 SUCCESS 可继续。
  5. 脚本层不自动翻页、轮询、换参数试探或重放 POST/PUT。现有网关仅在识别到 token 过期时会刷新 token 并透明重试一次;429/500/503 或超时造成结果不确定时,优先通过 status/read operation 恢复状态。
  6. updateInboundPlanNameupdateShipmentName 的 204 空 body 是成功,不当作解析失败。
  7. getLabels / getBillOfLading 必须使用 getShipment 返回的 shipmentConfirmationId;脚本同时接受该别名。下载 URL 可能很快过期,应在取得后立即下载,不要长期保存 URL。

完整标准路径、Pack Later、India、自有承运人和 shipment content update 流程见 references/workflows.md。市场限制见 references/marketplace-constraints.md

输出与错误处理

  • 完整响应保存到 linkfox///data/linkfox-amazon-store-fulfillment-inbound-.json;stdout 会打印实际路径。
  • 响应不超过 8 KB 时打印完整 JSON;更大时打印摘要;--inline 强制打印完整 JSON。
  • 始终先判断 developerProxy.errcode,再判断 httpStatus,最后读取 operation 结果字段。
  • 401/402、API Key、授权、积分或余额问题按 references/onboarding.md 处理。
  • Amazon 返回 400/403/404/409/413/415/422 时,修正输入或流程状态后由用户决定是否再次调用。

参考路由

  • 字段、响应、分页、错误语义:读 references/api.md
  • 业务流程选择:读 references/workflows.md
  • ID 产生和 v2024/v0 映射:读 references/identifiers.md
  • 国家/市场差异:读 references/marketplace-constraints.md
  • 某个 operation 的 method/path/body/script:只读对应的 references/apis/*.md 分组文档。

问题反馈使用 skillName: linkfox-amazon-store-fulfillment-inbound,并附脱敏后的 operation、关联 ID 与 developerProxy 响应。

积分消耗规则

不消耗积分(以网关实际计费为准)。


更多跨境 Skill:LinkFox Skills

相关技能

亚马逊店铺 Fulfillment by Amazon(FBA)系列(与 linkfox-amazon-store-auth 同系列),经 /spApi/developerProxy 调用 SP-API:FBA Inbound Eligibility(getItemEligibilityPreview)、FBA Inventory(getInventorySummaries/createInventoryItem/deleteInventoryItem/addInventory)、Fulfillment Inbound v2024-03-20(InboundPlan/装箱/放置/运输/货件等)与 v0(prepInstructions/labels/BOL/shipments)、Fulfillment Outbound 2020-07-01(MCF 履约单/预览/退货/tracking/features)。当用户提到 FBA、入仓资格、Inbound Eligibility、FBA 库存摘要、Send to Amazon、Inbound Plan、FBA 货件、MCF、多渠道履约、getItemEligibilityPreview、getInventorySummaries、createInboundPlan、createFulfillmentOrder 时触发。与 External Fulfillment / 普通 Orders 不同。

1 次安装

亚马逊 Multi-Channel Fulfillment(MCF)出仓履约 Skill,经 LinkFox /spApi/developerProxy 调用 Fulfillment Outbound API v2026-07-04,并提供该文档角色列表关联的 Invoices v2026-06-25 getInvoiceHeaders;支持配送报价与预览、创建/查询/列出/更新/取消履约订单、动态沙箱订单/包裹状态更新及发票头分页查询。用户提到 Fulfillment Outbound、MCF、多渠道配送、getOffers、getOrderPreview、createOrder、getInvoiceHeaders、Amazon 库存配送到站外客户、订单包裹与跟踪、签收证明或投递照片、receivedBy、locker/drop-off location、商品序列号/unitIdentifiers、v2026-07-04 时触发。与 External Fulfillment、普通 Orders API 和旧版 v2020-07-01 不同。

亚马逊店铺 External Fulfillment(与 linkfox-amazon-store-auth / orders / listings 同系列),经 /spApi/developerProxy 调用 SP-API External Fulfillment v2024-09-11:Inventory 的 batchInventory(按 location 查/写库存);Shipping 的 getShipments、getShipment、processShipment、createPackages、updatePackage、updatePackageStatus、retrieveShippingOptions、generateInvoice、retrieveInvoice、generateShipLabels;Returns 的 listReturns、getReturn。覆盖 Seller Flex / Easy Ship / Self Ship / MFN Self Delivery 等。当用户提到 External Fulfillment、SmartConnect、Seller Flex、FBA Onsite、Easy Ship、Self Ship、batchInventory、location 库存、履约单 shipment、面单、发票、EF 退货、externalFulfillment 时触发。与普通 Orders/Feeds 库存不同,本技能专指 External Fulfillment API。

1 次安装

亚马逊 FBA 库存计划与补货专家。适用于库存规划、销量速度估算、补货时间计算、安全库存设置、库存风险检查、FBA 补货测算和库存计划报告的场景。

通过 /spApi/developerProxy 调用 SP-API Orders,覆盖 v2026-01-01 与 v0 的查询、发货与管制订单接口。

14 次安装

亚马逊店铺 Feeds(与 linkfox-amazon-store-auth / report / listings / pricing / orders 同系列),经 /spApi/developerProxy 调用 SP-API Feeds v2021-06-30:createFeedDocument、getFeedDocument、createFeed、getFeed、getFeeds、cancelFeed;另含 upload_feed_document 向预签名 URL 上传内容。当用户提到亚马逊 Feed、提交库存/Listing Feed、POST_FLAT_FILE、feedType、feedDocumentId、feedId、取消 Feed、查询 Feed 处理状态、Feeds API、SP-API 上传文件 时触发。

14 次安装