訂單 · 下載 · 檔案
下載訂單中的一個檔案。每次請求都會驗證權杖及購買目前具有的存取權限。
GET
/api/v1/orders/{order_id}/files/{order_file_id}/contentcURL 請求
: "${SHOPENTLY_SHOP_URL:?}"
curl --disable --globoff --fail-with-body --silent --show-error \
--proto '=https' --connect-timeout 5 --max-time 300 \
--request GET \
--header "Authorization: Bearer ${SHOPENTLY_ACCESS_TOKEN:?}" \
--max-filesize 262144000 \
--output "${SHOPENTLY_OUTPUT_FILE:?}" \
--url "${SHOPENTLY_SHOP_URL%/}"'/api/v1/orders/example/files/00000000-0000-4000-8000-000000000001/content?category=digital'
回應
Content-Type: application/pdf
Content-Disposition: attachment; filename="manual.pdf"
所需權限
特定欄位所需的附加權限
category=internal: 下載訂單檔案 · 內部檔案orders.order_file:read_internalcategory=customer_document: 下載訂單檔案 · 客戶文件orders.order_file:read_customer_documentcategory=digital: 下載訂單檔案 · 數位商品orders.order_file:read_digital