linkfox-amazon-store-fulfillment-inbound
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseAmazon 店铺 Fulfillment Inbound
Amazon Store Fulfillment Inbound
本 Skill 覆盖 Amazon Fulfillment Inbound 的 45 个 operation,以及仍需配合新流程使用的 6 个 查询/文档 operation。所有请求继续使用 Amazon Store 系列的生产链路:,由服务端通过 解析授权。
v2024-03-20v0POST /spApi/developerProxysellerId + regionThis Skill covers 45 operations of Amazon Fulfillment Inbound , as well as 6 query/document operations that still need to be used with new processes. All requests continue to use the production link of the Amazon Store series: , with authorization resolved by the server via .
v2024-03-20v0POST /spApi/developerProxysellerId + regionPrerequisites(必须先读)
Prerequisites (Must Read First)
- 本 Skill 依赖 。先运行
linkfox-amazon-store-auth;若 exit code 为python scripts/check_auth_dependency.py且 stderr 含42,先安装或加载该依赖。DEPENDENCY_MISSING: - 通过 auth Skill 选定店铺,取得 与
sellerId。region仅允许region、NA、EU。FE - 不接收、存储或透传 、
amzAccessToken、accessToken。不要让调用方覆盖 AmazonrefreshToken、path或网关method。queryString - 先读与任务匹配的分组文档;完整契约入口见 references/api.md。
- This Skill depends on . Run
linkfox-amazon-store-authfirst; if the exit code ispython scripts/check_auth_dependency.pyand stderr contains42, install or load this dependency first.DEPENDENCY_MISSING: - Select a store via the auth Skill to obtain and
sellerId.regiononly allowsregion,NA,EU.FE - Do not receive, store, or transmit ,
amzAccessToken,accessToken. Do not allow callers to override AmazonrefreshToken,pathor gatewaymethod.queryString - Read the grouped documentation matching the task first; the complete contract entry is available at references/api.md.
调用方式
Calling Methods
- API 端点:(完整参数/响应/错误码见
POST /spApi/developerProxy)references/api.md - Python 脚本:
python scripts/<operation_script>.py '<JSON 参数>' [--inline] [--no-cache] - 调用约束:本工具沿用 Amazon Store Skill 的统一免费配置;同一会话同一参数组合默认只调用一次,脚本带 24h 本地缓存。失败/空结果不得自动换参数、翻页或连续试探;需要继续调用时先征得用户同意。
输出策略(脚本默认行为):
- 始终将完整响应写入 (
<cwd>/linkfox/<YYYY-MM-DD>/<session>/data/linkfox-amazon-store-fulfillment-inbound-<timestamp>.json为脚本执行时的工作目录,<cwd>取自环境变量<session>;禁止写入SESSION_ID,当前目录不可写则报错)/tmp - 响应体 ≤ 8 KB:落盘后把完整 JSON 打印到 stdout
- 响应体 > 8 KB:落盘后 stdout 只输出摘要(顶层字段、常见计数、最大列表字段长度及前 3 条样本)
- 加 强制全量打印到 stdout(同样落盘)
--inline - 加 强制本次读/生成操作访问网关;只在用户要求刷新或已确认外部状态变化时使用
--no-cache
读数据建议:先看摘要判断是否足够;需要具体字段时优先用 或 从保存的 JSON 文件按需抽取,避免整份 JSON 进入上下文。
jqConvertFrom-Json- API Endpoint: (complete parameters/responses/error codes can be found in
POST /spApi/developerProxy)references/api.md - Python Script:
python scripts/<operation_script>.py '<JSON parameters>' [--inline] [--no-cache] - Calling Constraints: This tool follows the unified free configuration of Amazon Store Skills; the same parameter combination in the same session is only called once by default, with the script having a 24h local cache. Do not automatically change parameters, paginate, or continuously retry on failure/empty results; obtain user consent before proceeding with further calls.
Output Strategy (Default Script Behavior):
- Always write the complete response to (
<cwd>/linkfox/<YYYY-MM-DD>/<session>/data/linkfox-amazon-store-fulfillment-inbound-<timestamp>.jsonis the working directory when the script is executed,<cwd>is taken from the environment variable<session>; writing toSESSION_IDis prohibited, and an error will be reported if the current directory is not writable)/tmp - Response body ≤ 8 KB: Print the complete JSON to stdout after saving to disk
- Response body > 8 KB: Print only a summary (top-level fields, common counts, maximum list field length and first 3 samples) to stdout after saving to disk
- Add to force full printing to stdout (still saves to disk)
--inline - Add to force the current read/generation operation to access the gateway; only use when the user requests a refresh or confirms external state changes
--no-cache
Data Reading Suggestion: Check the summary first to see if it is sufficient; when specific fields are needed, prefer to extract them from the saved JSON file using or as needed, avoiding loading the entire JSON into context.
jqConvertFrom-Json工作方式
Working Mechanism
每个公开脚本只代表一个固定 operation,并且一次执行最多调用一次网关。统一执行器负责:
- 校验公共字段、path/query/body、枚举、分页上限和关键嵌套约束;
- 对 path segment 与 query 参数进行百分号编码;
- 将 v0 CLI 的 lowerCamelCase 参数映射为 Amazon 要求的 PascalCase wire 名称;
- 识别 200/201/202/204 成功响应并解析 JSON;
- 对异步响应返回显式 ,但不自动轮询;
nextAction - 保存完整响应,大响应只在 stdout 展示摘要。
调用格式:
bash
python scripts/<operation_script>.py '<JSON parameters>' [--inline] [--no-cache]公共参数:
| 参数 | 必填 | 说明 |
|---|---|---|
| 是 | 已授权 Seller ID |
| 是 | |
| path/query 参数 | 条件 | 使用各 operation 文档中的 lowerCamelCase 名称 |
| 条件 | Amazon JSON body;推荐显式传此对象,也兼容将 body 字段放在顶层 |
| 提交类操作必填 | 用户明确确认目标和选择后传布尔值 |
| 否 | 仅本地调试使用 |
示例:
bash
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"}'Each public script represents only one fixed operation, and executes at most one gateway call per run. The unified executor is responsible for:
- Validating public fields, path/query/body, enums, pagination limits and key nested constraints;
- Performing percent-encoding on path segments and query parameters;
- Mapping lowerCamelCase parameters from v0 CLI to PascalCase wire names required by Amazon;
- Identifying 200/201/202/204 successful responses and parsing JSON;
- Returning explicit for asynchronous responses, but not automatically polling;
nextAction - Saving the complete response, and only displaying a summary in stdout for large responses.
Calling Format:
bash
python scripts/<operation_script>.py '<JSON parameters>' [--inline] [--no-cache]Public Parameters:
| Parameter | Required | Description |
|---|---|---|
| Yes | Authorized Seller ID |
| Yes | |
| path/query parameters | Conditional | Use lowerCamelCase names from each operation's documentation |
| Conditional | Amazon JSON body; it is recommended to explicitly pass this object, and it is also compatible with placing body fields at the top level |
| Required for submission operations | Pass the boolean value |
| No | Only for local debugging |
Examples:
bash
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
Selecting Operations
| 分组 | 用途 | 详细参数与脚本 |
|---|---|---|
| Inbound Plans | 创建、读取、取消、改名、查看 plan 内容 | inbound-plans.md |
| Packing | 生成/确认装箱方案、提交箱规、查看 packing group | packing.md |
| Placement | 生成、列出、确认分仓方案 | placement.md |
| Shipments | 读取货件、箱/件/托盘、名称和地址、tracking | shipments.md |
| Content Updates | 预览并确认已建货件内容变更 | shipment-content-updates.md |
| Delivery | delivery window 与 delivery challan | delivery-windows-and-documents.md |
| Self-Ship | India 自配送预约槽与预约 | self-ship-appointments.md |
| Transportation | 生成、比较、确认运输方案 | transportation.md |
| Prep / Compliance / Labels | 预处理、合规和商品标签 | prep-compliance-labels.md |
| Async Status | 查询 | asynchronous-operations.md |
| Retained v0 | prep instructions、箱唛、BOL、旧货件查询 | legacy-v0.md |
| Group | Purpose | Detailed Parameters & Scripts |
|---|---|---|
| Inbound Plans | Create, read, cancel, rename, view plan content | inbound-plans.md |
| Packing | Generate/confirm packing plans, submit box specifications, view packing groups | packing.md |
| Placement | Generate, list, confirm placement plans | placement.md |
| Shipments | Read shipments, boxes/items/pallets, names and addresses, tracking | shipments.md |
| Content Updates | Preview and confirm content changes for existing shipments | shipment-content-updates.md |
| Delivery | Delivery windows and delivery challans | delivery-windows-and-documents.md |
| Self-Ship | Self-ship appointment slots and bookings for India | self-ship-appointments.md |
| Transportation | Generate, compare, confirm transportation solutions | transportation.md |
| Prep / Compliance / Labels | Prep work, compliance, and product labels | prep-compliance-labels.md |
| Async Status | Query the execution status of | asynchronous-operations.md |
| Retained v0 | Prep instructions, box labels, BOL, legacy shipment queries | legacy-v0.md |
执行规则
Execution Rules
- 先确认当前工作流阶段及已有 ID;ID 的来源和跨版本映射见 references/identifiers.md。已有 plan/shipment 时优先只读恢复,不重复创建。
- 写操作前确认用户意图和目标店铺。以下 8 个确定性提交操作必须在执行前向用户展示关键选择并取得明确确认:、
cancelInboundPlan、confirmPackingOption、confirmPlacementOption、confirmShipmentContentUpdatePreview、confirmDeliveryWindowOptions、cancelSelfShipAppointment、scheduleSelfShipAppointment。confirmTransportationOptions - 可能接受运输费用;确认前展示每个 shipment 的 option、费用、币种、时效与 expiration。不得替用户默认选择收费项。
confirmTransportationOptions - 19 个异步发起 operation 返回 后,只调用
operationId查询。get_inbound_operation_status.py时停止并告知稍后再查;IN_PROGRESS时展示FAILED,不得进入下游写步骤;仅operationProblems可继续。SUCCESS - 脚本层不自动翻页、轮询、换参数试探或重放 POST/PUT。现有网关仅在识别到 token 过期时会刷新 token 并透明重试一次;429/500/503 或超时造成结果不确定时,优先通过 status/read operation 恢复状态。
- 、
updateInboundPlanName的 204 空 body 是成功,不当作解析失败。updateShipmentName - /
getLabels必须使用getBillOfLading返回的getShipment;脚本同时接受该别名。下载 URL 可能很快过期,应在取得后立即下载,不要长期保存 URL。shipmentConfirmationId
完整标准路径、Pack Later、India、自有承运人和 shipment content update 流程见 references/workflows.md。市场限制见 references/marketplace-constraints.md。
- First confirm the current workflow stage and existing IDs; see references/identifiers.md for ID sources and cross-version mappings. When there are existing plans/shipments, prioritize read-only recovery and avoid duplicate creation.
- Confirm user intent and target store before write operations. The following 8 deterministic submission operations must display key selections to the user and obtain explicit confirmation before execution: ,
cancelInboundPlan,confirmPackingOption,confirmPlacementOption,confirmShipmentContentUpdatePreview,confirmDeliveryWindowOptions,cancelSelfShipAppointment,scheduleSelfShipAppointment.confirmTransportationOptions - may involve transportation fees; display the option, fee, currency, time limit, and expiration for each shipment before confirmation. Do not select paid items by default for users.
confirmTransportationOptions - After 19 asynchronous initiation operations return , only call
operationIdto query. Stop and inform the user to check later when the status isget_inbound_operation_status.py; displayIN_PROGRESSwhenoperationProblems, and do not proceed to downstream write steps; only continue whenFAILED.SUCCESS - The script layer does not automatically paginate, poll, retry with different parameters, or replay POST/PUT requests. The existing gateway will only refresh the token and transparently retry once when token expiration is detected; when results are uncertain due to 429/500/503 or timeout, prioritize restoring status via status/read operations.
- A 204 empty body for and
updateInboundPlanNameindicates success and should not be treated as a parsing failure.updateShipmentName - /
getLabelsmust use thegetBillOfLadingreturned byshipmentConfirmationId; the script also accepts this alias. Download URLs may expire quickly, so download immediately after obtaining them and do not save the URLs for long-term use.getShipment
Complete standard paths, Pack Later, India, self-carrier, and shipment content update processes can be found in references/workflows.md. Marketplace restrictions are available in references/marketplace-constraints.md.
输出与错误处理
Output & Error Handling
- 完整响应保存到 ;stdout 会打印实际路径。
linkfox/<YYYY-MM-DD>/<session>/data/linkfox-amazon-store-fulfillment-inbound-<timestamp>.json - 响应不超过 8 KB 时打印完整 JSON;更大时打印摘要;强制打印完整 JSON。
--inline - 始终先判断 ,再判断
developerProxy.errcode,最后读取 operation 结果字段。httpStatus - 401/402、API Key、授权、积分或余额问题按 references/onboarding.md 处理。
- Amazon 返回 400/403/404/409/413/415/422 时,修正输入或流程状态后由用户决定是否再次调用。
- The complete response is saved to ; stdout will print the actual path.
linkfox/<YYYY-MM-DD>/<session>/data/linkfox-amazon-store-fulfillment-inbound-<timestamp>.json - Print the complete JSON when the response does not exceed 8 KB; print a summary for larger responses; forces printing of the complete JSON.
--inline - Always check first, then
developerProxy.errcode, and finally read the operation result fields.httpStatus - Handle 401/402, API Key, authorization, points or balance issues according to references/onboarding.md.
- When Amazon returns 400/403/404/409/413/415/422, correct the input or process status and let the user decide whether to call again.
参考路由
Reference Routes
- 字段、响应、分页、错误语义:读 references/api.md。
- 业务流程选择:读 references/workflows.md。
- ID 产生和 v2024/v0 映射:读 references/identifiers.md。
- 国家/市场差异:读 references/marketplace-constraints.md。
- 某个 operation 的 method/path/body/script:只读对应的 分组文档。
references/apis/*.md
问题反馈使用 ,并附脱敏后的 operation、关联 ID 与 响应。
skillName: linkfox-amazon-store-fulfillment-inbounddeveloperProxy- Fields, responses, pagination, error semantics: Read references/api.md.
- Business process selection: Read references/workflows.md.
- ID generation and v2024/v0 mapping: Read references/identifiers.md.
- Country/market differences: Read references/marketplace-constraints.md.
- Method/path/body/script for a specific operation: Only read the corresponding grouped documentation in .
references/apis/*.md
For issue feedback, use , and attach the desensitized operation, associated ID, and response.
skillName: linkfox-amazon-store-fulfillment-inbounddeveloperProxy积分消耗规则
Points Consumption Rules
No points are consumed (subject to actual gateway billing).
More cross-border Skills: LinkFox Skills