linkfox-amazon-store-fulfillment-inbound

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Amazon 店铺 Fulfillment Inbound

Amazon Store Fulfillment Inbound

本 Skill 覆盖 Amazon Fulfillment Inbound
v2024-03-20
的 45 个 operation,以及仍需配合新流程使用的 6 个
v0
查询/文档 operation。所有请求继续使用 Amazon Store 系列的生产链路:
POST /spApi/developerProxy
,由服务端通过
sellerId + region
解析授权。
This Skill covers 45 operations of Amazon Fulfillment Inbound
v2024-03-20
, as well as 6
v0
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:
POST /spApi/developerProxy
, with authorization resolved by the server via
sellerId + region
.

Prerequisites(必须先读)

Prerequisites (Must Read First)

  1. 本 Skill 依赖
    linkfox-amazon-store-auth
    。先运行
    python scripts/check_auth_dependency.py
    ;若 exit code 为
    42
    且 stderr 含
    DEPENDENCY_MISSING:
    ,先安装或加载该依赖。
  2. 通过 auth Skill 选定店铺,取得
    sellerId
    region
    region
    仅允许
    NA
    EU
    FE
  3. 不接收、存储或透传
    amzAccessToken
    accessToken
    refreshToken
    。不要让调用方覆盖 Amazon
    path
    method
    或网关
    queryString
  4. 先读与任务匹配的分组文档;完整契约入口见 references/api.md
  1. This Skill depends on
    linkfox-amazon-store-auth
    . Run
    python scripts/check_auth_dependency.py
    first; if the exit code is
    42
    and stderr contains
    DEPENDENCY_MISSING:
    , install or load this dependency first.
  2. Select a store via the auth Skill to obtain
    sellerId
    and
    region
    .
    region
    only allows
    NA
    ,
    EU
    ,
    FE
    .
  3. Do not receive, store, or transmit
    amzAccessToken
    ,
    accessToken
    ,
    refreshToken
    . Do not allow callers to override Amazon
    path
    ,
    method
    or gateway
    queryString
    .
  4. 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 条样本)
  • --inline
    强制全量打印到 stdout(同样落盘)
  • --no-cache
    强制本次读/生成操作访问网关;只在用户要求刷新或已确认外部状态变化时使用
读数据建议:先看摘要判断是否足够;需要具体字段时优先用
jq
ConvertFrom-Json
从保存的 JSON 文件按需抽取,避免整份 JSON 进入上下文。
  • API Endpoint:
    POST /spApi/developerProxy
    (complete parameters/responses/error codes can be found in
    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>.json
    (
    <cwd>
    is the working directory when the script is executed,
    <session>
    is taken from the environment variable
    SESSION_ID
    ; writing to
    /tmp
    is prohibited, and an error will be reported if the current directory is not writable)
  • 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
    --inline
    to force full printing to stdout (still saves to disk)
  • Add
    --no-cache
    to force the current read/generation operation to access the gateway; only use when the user requests a refresh or confirms external state changes
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
jq
or
ConvertFrom-Json
as needed, avoiding loading the entire JSON into context.

工作方式

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]
公共参数:
参数必填说明
sellerId
已授权 Seller ID
region
NA
/
EU
/
FE
path/query 参数条件使用各 operation 文档中的 lowerCamelCase 名称
requestBody
条件Amazon JSON body;推荐显式传此对象,也兼容将 body 字段放在顶层
confirmWrite
提交类操作必填用户明确确认目标和选择后传布尔值
true
;8 个确定性提交操作缺少该值时脚本会在网关调用前拒绝
skipDepCheck
仅本地调试使用
示例:
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
    nextAction
    for asynchronous responses, but not automatically polling;
  • 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:
ParameterRequiredDescription
sellerId
YesAuthorized Seller ID
region
Yes
NA
/
EU
/
FE
path/query parametersConditionalUse lowerCamelCase names from each operation's documentation
requestBody
ConditionalAmazon JSON body; it is recommended to explicitly pass this object, and it is also compatible with placing body fields at the top level
confirmWrite
Required for submission operationsPass the boolean value
true
after the user explicitly confirms the target and selection; the script will reject the gateway call if this value is missing for 8 deterministic submission operations
skipDepCheck
NoOnly 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 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
GroupPurposeDetailed Parameters & Scripts
Inbound PlansCreate, read, cancel, rename, view plan contentinbound-plans.md
PackingGenerate/confirm packing plans, submit box specifications, view packing groupspacking.md
PlacementGenerate, list, confirm placement plansplacement.md
ShipmentsRead shipments, boxes/items/pallets, names and addresses, trackingshipments.md
Content UpdatesPreview and confirm content changes for existing shipmentsshipment-content-updates.md
DeliveryDelivery windows and delivery challansdelivery-windows-and-documents.md
Self-ShipSelf-ship appointment slots and bookings for Indiaself-ship-appointments.md
TransportationGenerate, compare, confirm transportation solutionstransportation.md
Prep / Compliance / LabelsPrep work, compliance, and product labelsprep-compliance-labels.md
Async StatusQuery the execution status of
operationId
asynchronous-operations.md
Retained v0Prep instructions, box labels, BOL, legacy shipment querieslegacy-v0.md

执行规则

Execution Rules

  1. 先确认当前工作流阶段及已有 ID;ID 的来源和跨版本映射见 references/identifiers.md。已有 plan/shipment 时优先只读恢复,不重复创建。
  2. 写操作前确认用户意图和目标店铺。以下 8 个确定性提交操作必须在执行前向用户展示关键选择并取得明确确认:
    cancelInboundPlan
    confirmPackingOption
    confirmPlacementOption
    confirmShipmentContentUpdatePreview
    confirmDeliveryWindowOptions
    cancelSelfShipAppointment
    scheduleSelfShipAppointment
    confirmTransportationOptions
  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. updateInboundPlanName
    updateShipmentName
    的 204 空 body 是成功,不当作解析失败。
  7. getLabels
    /
    getBillOfLading
    必须使用
    getShipment
    返回的
    shipmentConfirmationId
    ;脚本同时接受该别名。下载 URL 可能很快过期,应在取得后立即下载,不要长期保存 URL。
完整标准路径、Pack Later、India、自有承运人和 shipment content update 流程见 references/workflows.md。市场限制见 references/marketplace-constraints.md
  1. 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.
  2. 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
    .
  3. 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.
  4. After 19 asynchronous initiation operations return
    operationId
    , only call
    get_inbound_operation_status.py
    to query. Stop and inform the user to check later when the status is
    IN_PROGRESS
    ; display
    operationProblems
    when
    FAILED
    , and do not proceed to downstream write steps; only continue when
    SUCCESS
    .
  5. 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.
  6. A 204 empty body for
    updateInboundPlanName
    and
    updateShipmentName
    indicates success and should not be treated as a parsing failure.
  7. getLabels
    /
    getBillOfLading
    must use the
    shipmentConfirmationId
    returned by
    getShipment
    ; 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.
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

  • 完整响应保存到
    linkfox/<YYYY-MM-DD>/<session>/data/linkfox-amazon-store-fulfillment-inbound-<timestamp>.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 时,修正输入或流程状态后由用户决定是否再次调用。
  • The complete response is saved to
    linkfox/<YYYY-MM-DD>/<session>/data/linkfox-amazon-store-fulfillment-inbound-<timestamp>.json
    ; stdout will print the actual path.
  • Print the complete JSON when the response does not exceed 8 KB; print a summary for larger responses;
    --inline
    forces printing of the complete JSON.
  • Always check
    developerProxy.errcode
    first, then
    httpStatus
    , and finally read the operation result fields.
  • 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
    分组文档。
问题反馈使用
skillName: linkfox-amazon-store-fulfillment-inbound
,并附脱敏后的 operation、关联 ID 与
developerProxy
响应。
  • 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
skillName: linkfox-amazon-store-fulfillment-inbound
, and attach the desensitized operation, associated ID, and
developerProxy
response.

积分消耗规则

Points Consumption Rules

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

更多跨境 Skill:LinkFox Skills
No points are consumed (subject to actual gateway billing).

More cross-border Skills: LinkFox Skills