marketplace
PATCH /v1/marketplace/listings/{listing_id}/images/{image_id}
Set the alt text, the gallery position, or make this the cover.
Аутентификация
API кілтін bearer токені ретінде жіберіңіз. Бұл соңғы нүкте сипаттамада арнайы рұқсатты көрсетпейді, сондықтан болжағаннан гөрі кілтіңізге қажетті ең аз рұқсатты беріп, жауапты тексеріңіз.
Бұл соңғы нүкте ұйым идентификаторын қабылдамайды. Сіздің кілтіңіз оның қай ұйымға тиесілі екенін өзі анықтайды және жауап соған шектеледі.
Әрекет етіп көру
Бұрыштық жақшалардағы кез келген нәрсені өз мәндеріңізбен, ал кілт орналастырушысын басқару тақтасынан алынған кілтпен алмастырыңыз.
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 консолі ұйымыңыздың нақты идентификаторы мен жеке кілтіңізді автоматты түрде толтырады да, нақты жауапты көре алуыңыз үшін сұрауды тікелей жұмыс істеп тұрған 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.
Параметрлер
| Аты | Tүрі | Міндетті | Мазмұны |
|---|---|---|---|
listing_id (path) | string | Иә | — |
image_id (path) | string | Иә | — |
Сұрау денесі
| Аты | Tүрі | Міндетті | Мазмұны |
|---|---|---|---|
alt | string | Жоқ | — |
position | integer | Жоқ | — |
is_cover | boolean | Жоқ | Only `true` is meaningful — a listing always has exactly one cover. |
Жауап
| Аты | Tүрі | Міндетті | Мазмұны |
|---|---|---|---|
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