产品 · 数字版本
创建 upload_id 后,以 multipart/form-data 上传文件,再关联到商品。下载需要 Bearer 令牌及 category 对应权限;响应直接包含文件字节,不使用公开地址或密码。 共享销售文件的明确访问规则。 new_purchases / recent_and_new / selected / all_purchasers.
GET
/api/v1/products/{product_id}/file-releasescURL 请求
curl --disable --globoff --fail-with-body --silent --show-error \
--proto '=https' --connect-timeout 5 --max-time 30 \
--request GET \
--url https://shop.onshopently.com/api/v1/products/example/file-releases \
--header 'Authorization: Bearer EXAMPLE_ACCESS_TOKEN'
响应
{
"data": {
"current_release_id": "00000000-0000-4000-8000-000000000001",
"product_version": 2,
"releases": [
{
"changelog": "Manual update",
"files": [
{
"file_id": "00000000-0000-4000-8000-000000000001",
"sort_order": 0,
"version_id": "00000000-0000-4000-8000-000000000001"
}
],
"id": "00000000-0000-4000-8000-000000000001",
"manifest_sha256": "1111111111111111111111111111111111111111111111111111111111111111",
"published_at": null,
"release_sequence": null,
"state": "active",
"version_label": "1.0",
"withdrawn_at": null
}
],
"update_days": 365,
"update_mode": "period",
"update_months": null
},
"meta": {
"pagination": {
"has_more": false,
"limit": 50,
"next_cursor": null
},
"request_id": "example"
}
}