انتقل إلى المحتوى
ShopentlyLearn

المنتجات · تنزيل · الملف

بعد إنشاء upload_id أرسل الملفات بصيغة multipart/form-data ثم اربطها بالمنتج. يتطلب التنزيل رمز Bearer وصلاحية category؛ يحتوي الرد على بايتات الملف دون عنوان عام أو كلمة مرور. قاعدة وصول صريحة إلى الملف المشترك. new_purchases / recent_and_new / selected / all_purchasers.

GET/api/v1/products/{product_id}/files/{file_id}/versions/{version_id}/content

طلب cURL

: "${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/products/example/files/00000000-0000-4000-8000-000000000001/versions/00000000-0000-4000-8000-000000000001/content?category=digital'

الاستجابة

Content-Type: application/pdf
Content-Disposition: attachment; filename="manual.pdf"

الصلاحيات المطلوبة

المصادقة
رمز الوصول
متاح بدءًا من
STANDARD
الصلاحيات المطلوبة
صلاحيات إضافية لحقول محددة
  • category=internal: عرض ملفات المنتج · ملفات داخليةcatalog.product_file:read_internal
  • category=customer_document: عرض ملفات المنتج · مستندات العميلcatalog.product_file:read_customer_document
  • category=digital: عرض ملفات المنتج · منتجات رقميةcatalog.product_file:read_digital