コンテンツにスキップ
ShopentlyLearn

ファイルの対象者を選択

対象となる購入を選びます。選択した注文に、この商品の支払い済みかつ未返金の購入が必要です。

PATCH/api/v1/products/{product_id}/files/{file_id}/audience

cURLリクエスト

curl --disable --globoff --fail-with-body --silent --show-error \
  --proto '=https' --connect-timeout 5 --max-time 30 \
  --request PATCH \
  --url https://shop.onshopently.com/api/v1/products/example/files/00000000-0000-4000-8000-000000000007/audience \
  --header 'Authorization: Bearer EXAMPLE_ACCESS_TOKEN' \
  --header 'Idempotency-Key: 4e239a57-b0ef-576e-9aa1-683b3adeeb8c' \
  --header 'Content-Type: application/json' \
  --data-raw '{"audience":{"mode":"all_purchasers"},"expected_version":1}'

レスポンス

{
  "data": {
    "deleted": false,
    "id": "00000000-0000-4000-8000-000000000001",
    "version": 2
  },
  "meta": {
    "request_id": "example-request"
  }
}

必要な権限

利用可能な最低プラン
STANDARD
キーの権限
商品ファイルの管理 · デジタル商品catalog.product_file:write_digital