marketplace
PATCH /v1/marketplace/listings/{listing_id}/images/{image_id}
Set the alt text, the gallery position, or make this the cover.
Kimlik Doğrulama
Bir API anahtarını bearer token olarak gönderin. Bu uç nokta, teknik özelliklerde belirli bir yetki belirtmemektedir; bu nedenle, varsaymak yerine anahtarınıza ihtiyaç duyduğu en az yetkiyi verin ve yanıtı kontrol edin.
Bu uç nokta hiçbir organizasyon kimliği almaz. Anahtarınız zaten ait olduğu organizasyonu tanımlar ve yanıt bu organizasyonla sınırlandırılır.
Dene
Köşeli parantez içindeki her şeyi kendi değerlerinizle ve anahtar yer tutucusunu panonuzdan bir anahtarla değiştirin.
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 '{ }'Oturum açtınız mı? Panonuzdaki API konsolu, gerçek organizasyon kimliğinizi ve kendi anahtarınızı otomatik olarak doldurur ve isteği canlı API üzerinde çalıştırarak gerçek yanıtı görmenizi sağlar. Bu uç noktayı API konsolunda açın
Ayrıntılar
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.
Parametreler
| Ad | Tür | Zorunlu | Ne olduğu |
|---|---|---|---|
listing_id (path) | string | Evet | — |
image_id (path) | string | Evet | — |
İstek gövdesi
| Ad | Tür | Zorunlu | Ne olduğu |
|---|---|---|---|
alt | string | Hayır | — |
position | integer | Hayır | — |
is_cover | boolean | Hayır | Only `true` is meaningful — a listing always has exactly one cover. |
Yanıt
| Ad | Tür | Zorunlu | Ne olduğu |
|---|---|---|---|
id | string | Evet | — |
url | string | Hayır | 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 | Hayır | 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 | Evet | 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 | Evet | Pixel height after orientation is applied. |
alt | string | Hayır | — |
is_cover | boolean | Evet | — |
position | integer | Evet | — |
Bu uç noktanın dönderebileceği hatalar
401 · 404