43 lines
1.1 KiB
HTTP
43 lines
1.1 KiB
HTTP
@baseUrl = http://127.0.0.1:8020/api/v1
|
|
@shopeeId = 24720421377
|
|
@apiKey = replace-with-api-key
|
|
|
|
### 更新商品标题
|
|
PUT {{baseUrl}}/shopee/products/{{shopeeId}}/title?apikey={{apiKey}}
|
|
Content-Type: application/json
|
|
|
|
{
|
|
"title": "【台灣出貨】測試商品新標題"
|
|
}
|
|
|
|
### 使用已有图片 URL 更新主图
|
|
PUT {{baseUrl}}/shopee/products/{{shopeeId}}/cover
|
|
X-API-Key: {{apiKey}}
|
|
Content-Type: application/json
|
|
|
|
{
|
|
"coverUrl": "https://example.com/product-cover.jpg"
|
|
}
|
|
|
|
### cmshopee:替换第一张主图(Idempotency-Key 每次业务操作固定且唯一)
|
|
PUT {{baseUrl}}/shopee/products/{{shopeeId}}/cover
|
|
X-API-Key: {{apiKey}}
|
|
Idempotency-Key: cmshopee-cover-20260918-001
|
|
Content-Type: application/json
|
|
|
|
{
|
|
"coverUrl": "https://example.com/product-cover.jpg",
|
|
"coverStrategy": "replace_first"
|
|
}
|
|
|
|
### 上传本地文件并更新主图(按实际文件路径修改)
|
|
PUT {{baseUrl}}/shopee/products/{{shopeeId}}/cover?apikey={{apiKey}}
|
|
Content-Type: multipart/form-data; boundary=WebAppBoundary
|
|
|
|
--WebAppBoundary
|
|
Content-Disposition: form-data; name="cover"; filename="cover.jpg"
|
|
Content-Type: image/jpeg
|
|
|
|
< ./cover.jpg
|
|
--WebAppBoundary--
|