marketplace
PATCH /v1/marketplace/listings/{listing_id}/images/{image_id}
Set the alt text, the gallery position, or make this the cover.
Аутентификација
Пошаљите API кључ као bearer токен. Ова крајња тачка не наводи конкретну дозволу у спецификацији, па свом кључу доделите најмања неопходна овлашћења и проверите одговор уместо да претпостављате.
Ова крајња тачка не прихвата 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… |
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