marketplace

PATCH /v1/marketplace/listings/{listing_id}/images/{image_id}

Set the alt text, the gallery position, or make this the cover.

Све marketplace крајње тачке

Сва документација за програмере →

Аутентификација

Пошаљите 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Да—

Тело захтева

НазивТипОбавезноШта је ово
altstringНе—
positionintegerНе—
is_coverbooleanНеOnly true is meaningful — a listing always has exactly one cover.

Одговор

НазивТипОбавезноШта је ово
idstringДа—
urlstringНе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…
srcsetstringНе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…
widthintegerДа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.
heightintegerДаPixel height after orientation is applied.
altstringНе—
is_coverbooleanДа—
positionintegerДа—

Грешке које ова крајња тачка може вратити

401 · 404