linkfox-amazon-store-uploads
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseAmazon 店铺 Uploads(文件上传)
Amazon 店铺 Uploads(文件上传)
本 skill 专用于 向 Amazon 申请上传目的地并上传文件,与 同系列:先 ,再 调用 createUploadDestinationForResource,最后用 对返回的 URL 执行 PUT(不经网关)。
linkfox-amazon-store-authstoreTokensdeveloperProxyupload_to_destination.py这是 Uploads API,不是 Orders 订单接口。订单见;批量 Feed 文件见linkfox-amazon-store-orders。linkfox-amazon-store-feeds
本 skill 专用于 向 Amazon 申请上传目的地并上传文件,与 同系列:先 ,再 调用 createUploadDestinationForResource,最后用 对返回的 URL 执行 PUT(不经网关)。
linkfox-amazon-store-authstoreTokensdeveloperProxyupload_to_destination.py这是 Uploads API,不是 Orders 订单接口。订单相关请见;批量 Feed 文件请见linkfox-amazon-store-orders。linkfox-amazon-store-feeds
官方参考
官方参考
Prerequisites
前置条件
- 依赖 。
linkfox-amazon-store-auth - 须与下游 API 文档一致(例如 A+:
resource;Messaging 为对应 messages 资源路径)。aplus/2020-11-01/contentDocuments - 为待上传文件内容的 Base64 MD5 摘要;传
contentMD5/filePath时脚本可自动计算。content
- 依赖 。
linkfox-amazon-store-auth - 必须与下游 API 文档一致(例如 A+:
resource;Messaging 为对应 messages 资源路径)。aplus/2020-11-01/contentDocuments - 为待上传文件内容的 Base64 MD5 摘要;传入
contentMD5/filePath时脚本可自动计算。content
工作流
工作流
text
create_upload_destination_for_resource → uploadDestination { uploadDestinationId, url, headers }
upload_to_destination (PUT url + headers) → 在 A+/Messaging 等 API 中引用 uploadDestinationIdtext
create_upload_destination_for_resource → uploadDestination { uploadDestinationId, url, headers }
upload_to_destination (PUT url + headers) → 在 A+/Messaging 等 API 中引用 uploadDestinationIdScripts
脚本
| 脚本 | 说明 |
|---|---|
| POST |
| PUT 到返回的 |
| 内部公共模块 |
| 脚本 | 说明 |
|---|---|
| POST |
| PUT 到返回的 |
| 内部公共模块 |
示例
示例
bash
export LINKFOXAGENT_API_KEY="<your-key>"bash
export LINKFOXAGENT_API_KEY="<your-key>"1) 创建上传目的地(自动根据 filePath 计算 contentMD5)
1) 创建上传目的地(自动根据 filePath 计算 contentMD5)
python scripts/create_upload_destination_for_resource.py '{
"sellerId":"A1...",
"region":"NA",
"resource":"aplus/2020-11-01/contentDocuments",
"marketplaceId":"ATVPDKIKX0DER",
"filePath":"/path/to/banner.jpg",
"contentType":"image/jpeg"
}'
python scripts/create_upload_destination_for_resource.py '{
"sellerId":"A1...",
"region":"NA",
"resource":"aplus/2020-11-01/contentDocuments",
"marketplaceId":"ATVPDKIKX0DER",
"filePath":"/path/to/banner.jpg",
"contentType":"image/jpeg"
}'
2) 上传文件(将上一步 stdout 中的 uploadDestination 传入)
2) 上传文件(将上一步 stdout 中的 uploadDestination 传入)
python scripts/upload_to_destination.py '{
"uploadDestination": { "url": "...", "headers": { } },
"filePath": "/path/to/banner.jpg"
}'
---python scripts/upload_to_destination.py '{
"uploadDestination": { "url": "...", "headers": { } },
"filePath": "/path/to/banner.jpg"
}'
---Display Rules
显示规则
- 成功创建目的地常为 HTTP 201;先看 ,再看
developerProxy。uploadDestination - 不要带前导
resource;path 中会对/做编码。/ - 网关需放行 前缀。
uploads/2020-11-01/
Feedback: :。
skillNamelinkfox-amazon-store-uploads更多跨境 skill:LinkFox Skills
<!-- LF_LARGE_RESPONSE_BLOCK -->- 成功创建目的地通常返回 HTTP 201;优先查看 ,再查看
developerProxy。uploadDestination - 不要带前导
resource;路径中会对/进行编码。/ - 网关需放行 前缀。
uploads/2020-11-01/
反馈: :。
skillNamelinkfox-amazon-store-uploads更多跨境 skill:LinkFox Skills
<!-- LF_LARGE_RESPONSE_BLOCK -->Handling Large Responses
处理大响应
To avoid overflowing the agent context, persist the response to disk and extract only the fields you need:
python scripts/response_io.py run --script scripts/check_auth_dependency.py --out-dir <DIR> '<params>'
python scripts/response_io.py read <file> --fields "<paths>" # or --path "<JMESPath>"Pickoutside any git working tree (e.g.--out-diron Unix,/tmp/...on Windows). Persisted responses may contain PII, pricing, or auth-sensitive data — do not commit them. Files are not auto-deleted; clean up when the task is done.%TEMP%/...
This skill exposes multiple entry scripts:,check_auth_dependency.py,create_upload_destination_for_resource.py. Passupload_to_destination.pyto choose the one you need.--script scripts/<name>.py
runread--limit/--offset--format json|jsonl|csv|tableWhen to prefer this pattern — apply your judgment based on the response characteristics, e.g.:
- High field count per record, or fields you don't need
- Batch/paginated results (multiple items per call)
- Long-text fields (descriptions, reviews, HTML, time series)
- Output reused across later steps rather than consumed immediately
For small, single-use responses, calling the main script directly is fine.
⚠️ The preview is a truncated schema + sample, not the full data. Any field-level decision must read from the persisted file via .
<!-- /LF_LARGE_RESPONSE_BLOCK -->read为避免超出 Agent 上下文限制,可将响应持久化到磁盘并仅提取所需字段:
python scripts/response_io.py run --script scripts/check_auth_dependency.py --out-dir <DIR> '<params>'
python scripts/response_io.py read <file> --fields "<paths>" # 或 --path "<JMESPath>"请将选择在 git 工作区之外(例如 Unix 系统的--out-dir,Windows 系统的/tmp/...)。持久化的响应可能包含个人身份信息(PII)、定价或敏感认证数据——请勿提交这些文件。文件不会自动删除;任务完成后请自行清理。%TEMP%/...
本 skill 提供多个入口脚本:、check_auth_dependency.py、create_upload_destination_for_resource.py。通过传递upload_to_destination.py选择所需脚本。--script scripts/<name>.py
runread--limit/--offset--format json|jsonl|csv|table何时优先使用此模式——根据响应特性自行判断,例如:
- 每条记录字段数量多,或包含不需要的字段
- 批量/分页结果(单次调用返回多条数据)
- 长文本字段(描述、评论、HTML、时间序列)
- 输出需在后续步骤中复用,而非立即使用
对于小型、单次使用的响应,直接调用主脚本即可。
⚠️ 预览内容是截断的 schema + 示例,并非完整数据。任何基于字段的决策都必须通过 从持久化文件中读取。
<!-- /LF_LARGE_RESPONSE_BLOCK -->read