marketplace
PATCH /v1/marketplace/listings/{listing_id}/images/{image_id}
Set the alt text, the gallery position, or make this the cover.
認証
ベアラー トークンとして API キーを送信します。このエンドポイントでは仕様に特定の権限が記載されていないため、キーに必要な最小限の権限を付与し、推測するのではなくレスポンスを確認してください。
このエンドポイントは組織IDを受け付けません。お使いのキーによって所属する組織がすでに特定されており、レスポンスはその組織にスコープされます。
試してみる
アングルブラケット内のすべてをご自身の値に置き換え、キーのプレースホルダーをご利用中のダッシュボードのキーに置き換えてください。
curl -X PATCH https://api.zinndigital.com/v1/marketplace/listings/{listing_id}/images/{image_id} \
-H "Authorization: Bearer zdk_live_…" \
-H "Content-Type: application/json" \
-d '{ }'ログインしていますか?ダッシュボード内のAPIコンソールでは、実際の組織IDやお客様ご自身のキーが自動入力され、ライブAPIに対してリクエストが実行されるため、実際のレスポンスを確認することができます。 API コンソールでこのエンドポイントを開く
詳細
Promoting a cover demotes the incumbent in the same write — there is a partial unique constraint allowing exactly one cover per listing, so doing it in two steps would fail.
パラメータ
| 名前 | タイプ | 必須 | これがその内容です |
|---|---|---|---|
listing_id (path) | string | はい | — |
image_id (path) | string | はい | — |
リクエスト本文
| 名前 | タイプ | 必須 | これがその内容です |
|---|---|---|---|
alt | string | いいえ | — |
position | integer | いいえ | — |
is_cover | boolean | いいえ | Only `true` is meaningful — a listing always has exactly one cover. |
返信
| 名前 | タイプ | 必須 | これがその内容です |
|---|---|---|---|
id | string | はい | — |
url | string | いいえ | The original. ⛔ `null` when no public delivery origin is configured, rather than a guessed URL — an R2 bucket is not public by default, and a card with a broken image is worse t… |
srcset | string | いいえ | Width candidates through Cloudflare image resizing with `format=auto`, so a phone downloads a phone-sized AVIF/WebP and an old browser still gets something it can decode. Empty… |
width | integer | はい | Pixel width AFTER orientation is applied. Required in the markup to reserve space — an `<img>` without it is the largest single source of layout shift. |
height | integer | はい | Pixel height after orientation is applied. |
alt | string | いいえ | — |
is_cover | boolean | はい | — |
position | integer | はい | — |
このエンドポイントが返すエラー
401 · 404