Loading...
Loading...
亚马逊店铺文件上传(与 linkfox-amazon-store-auth 等同系列),经 /spApi/developerProxy 调用 Uploads API v2020-11-01 的 createUploadDestinationForResource,再向返回 URL 上传文件,供 A+ Content、Messaging 等 API 使用。当用户提到上传文件、createUploadDestinationForResource、upload destination、contentMD5、预签名上传、SP-API 上传、A+ 图片上传、Messaging 附件上传 时触发。
npx skill4agent add linkfox-ai/linkfox-skills linkfox-amazon-store-uploadslinkfox-amazon-store-authstoreTokensdeveloperProxyupload_to_destination.py这是 Uploads API,不是 Orders 订单接口。订单见;批量 Feed 文件见linkfox-amazon-store-orders。linkfox-amazon-store-feeds
linkfox-amazon-store-authresourceaplus/2020-11-01/contentDocumentscontentMD5filePathcontentcreate_upload_destination_for_resource → uploadDestination { uploadDestinationId, url, headers }
upload_to_destination (PUT url + headers) → 在 A+/Messaging 等 API 中引用 uploadDestinationId| 脚本 | 说明 |
|---|---|
| POST |
| PUT 到返回的 |
| 内部公共模块 |
export LINKFOXAGENT_API_KEY="<your-key>"
# 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"
}'
# 2) 上传文件(将上一步 stdout 中的 uploadDestination 传入)
python scripts/upload_to_destination.py '{
"uploadDestination": { "url": "...", "headers": { } },
"filePath": "/path/to/banner.jpg"
}'developerProxyuploadDestinationresource//uploads/2020-11-01/skillNamelinkfox-amazon-store-uploadspython 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|tableread