marketplace
PATCH /v1/marketplace/listings/{listing_id}/images/{image_id}
Set the alt text, the gallery position, or make this the cover.
Autenticazione
Invia una chiave API come bearer token. Questo endpoint non specifica un permesso specifico nella specifica, quindi assegna alla tua chiave i permessi minimi necessari e verifica la risposta invece di fare supposizioni.
Questo endpoint non richiede alcun ID organizzazione. La tua chiave identifica già l'organizzazione a cui appartiene e la risposta è limitata ad essa.
Provalo
Sostituisci qualsiasi elemento tra parentesi angolari con i tuoi valori e il segnaposto key con una chiave dalla tua 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 '{ }'Hai effettuato l'accesso? La console API nella tua dashboard inserisce il tuo ID organizzazione reale e la tua chiave personale, ed esegue la richiesta sull'API live in modo da poter vedere la risposta effettiva. Apri questo endpoint nella console API
Dettagli
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.
Parametri
| Nome | Tipo | Obbligatorio | Che cos'è |
|---|---|---|---|
listing_id (path) | string | Sì | — |
image_id (path) | string | Sì | — |
Corpo della richiesta
| Nome | Tipo | Obbligatorio | Che cos'è |
|---|---|---|---|
alt | string | No | — |
position | integer | No | — |
is_cover | boolean | No | Only `true` is meaningful — a listing always has exactly one cover. |
Risposta
| Nome | Tipo | Obbligatorio | Che cos'è |
|---|---|---|---|
id | string | Sì | — |
url | string | No | 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 | No | 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 | Sì | 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 | Sì | Pixel height after orientation is applied. |
alt | string | No | — |
is_cover | boolean | Sì | — |
position | integer | Sì | — |
Errori che questo endpoint può restituire
401 · 404