產品 · 狀態 · upload_id
建立 upload_id 後,以 multipart/form-data 上傳檔案,再關聯至商品。下載需要 Bearer 權杖及 category 對應權限;回應直接包含檔案位元組,不使用公開網址或密碼。 共用銷售檔案的明確存取規則。 new_purchases / recent_and_new / selected / all_purchasers.
GET
/api/v1/product-file-uploads/{upload_id}cURL 請求
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/product-file-uploads/00000000-0000-4000-8000-000000000001?category=digital' \
--header 'Authorization: Bearer EXAMPLE_ACCESS_TOKEN'
回應
{
"data": {
"category": "digital",
"expires_at": "2026-01-01T12:00:00Z",
"filename": "manual.pdf",
"id": "00000000-0000-4000-8000-000000000001",
"product_id": "example",
"received_bytes": 46,
"sha256": "5cd2f1cb0e5532b397e7ab1887baf6000c49450fd80ae279eb047c06e4545ecd",
"size_bytes": 46,
"status": "ready"
},
"meta": {
"request_id": "example"
}
}
所需權限
特定欄位所需的附加權限
category=internal: 檢視商品檔案 · 內部檔案catalog.product_file:read_internalcategory=customer_document: 檢視商品檔案 · 客戶文件catalog.product_file:read_customer_documentcategory=digital: 檢視商品檔案 · 數位商品catalog.product_file:read_digital