marketplace

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

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

All marketplace endpoints

Authentication

Send an API key as a bearer token. This endpoint does not state a specific permission in the specification, so give your key the least it needs and check the response rather than assuming.

This endpoint takes no organisation id. Your key already identifies the organisation it belongs to, and the response is scoped to it.

Try it

Replace anything in angle brackets with your own values, and the key placeholder with a key from your dashboard.

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 '{  }'

Signed in? The API console in your dashboard fills in your real organisation id and your own key, and runs the request against the live API so you can see the actual response. Open this endpoint in the API console

Details

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.

Parameters

NameTypeRequiredWhat it is
listing_id (path)stringYes
image_id (path)stringYes

Request body

NameTypeRequiredWhat it is
altstringNo
positionintegerNo
is_coverbooleanNoOnly `true` is meaningful — a listing always has exactly one cover.

Response

NameTypeRequiredWhat it is
idstringYes
urlstringNoThe 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…
srcsetstringNoWidth 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…
widthintegerYesPixel width AFTER orientation is applied. Required in the markup to reserve space — an `<img>` without it is the largest single source of layout shift.
heightintegerYesPixel height after orientation is applied.
altstringNo
is_coverbooleanYes
positionintegerYes

Errors this endpoint can return

401 · 404