コンテンツにスキップ
ShopentlyLearn

商品 · 商品ファイル

upload_idを作成した後、multipart/form-dataでファイルを送信し、商品に関連付けます。ダウンロードにはBearerトークンとcategoryの権限が必要です。応答はファイルのバイト列で、公開URLやパスワードは使いません。 共通販売ファイルへの明示的なアクセス規則。 new_purchases / recent_and_new / selected / all_purchasers.

GET/api/v1/products/{product_id}/files

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/products/example/files?category=digital' \
  --header 'Authorization: Bearer EXAMPLE_ACCESS_TOKEN'

レスポンス

{
  "data": {
    "files": [
      {
        "category": "digital",
        "created_at": "2026-01-01T12:00:00Z",
        "current_version_id": "00000000-0000-4000-8000-000000000001",
        "file_id": "00000000-0000-4000-8000-000000000001",
        "filename": "manual.pdf",
        "id": "00000000-0000-4000-8000-000000000001",
        "label": "Manual",
        "mime_type": "application/pdf",
        "sha256": "5cd2f1cb0e5532b397e7ab1887baf6000c49450fd80ae279eb047c06e4545ecd",
        "size_bytes": 46,
        "state": "active",
        "version_number": 1
      }
    ],
    "product_version": 2
  },
  "meta": {
    "pagination": {
      "has_more": false,
      "limit": 50,
      "next_cursor": null
    },
    "request_id": "example"
  }
}

必要な権限

利用可能な最低プラン
STANDARD
必要な権限
特定のフィールドに必要な追加権限
  • category=internal: 商品ファイルの閲覧 · 内部ファイルcatalog.product_file:read_internal
  • category=customer_document: 商品ファイルの閲覧 · 購入者向け資料catalog.product_file:read_customer_document
  • category=digital: 商品ファイルの閲覧 · デジタル商品catalog.product_file:read_digital