marketplace
PATCH /v1/marketplace/listings/{listing_id}/images/{image_id}
Set the alt text, the gallery position, or make this the cover.
Uthibitishaji
Tuma ufunguo wa API kama tokeni ya kubeba. Sehemu hii ya mwisho haitaji ruhusa maalum katika maelezo, kwa hivyo ipe ufunguo wako kiwango cha chini kabisa kinachohitajika na uangalie jibu badala ya kukisia.
Endpoint hii haichukui kitambulisho cha shirika. Ufunguo wako tayari unalitambua shirika linalohusika, na jibu limewekewa kikomo kwa shirika hilo pekee.
Jaribu
Badilisha chochote kilicho ndani ya mabano ya pembe na maadili yako mwenyewe, na kishikiliaji cha ufunguo na ufunguo kutoka kwa dashibodi yako.
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 '{ }'Umeingia kwenye akaunti? Dashibodi yako ya kiweko cha API inajaza kitambulisho chako halisi cha shirika na ufunguo wako mwenyewe, na kuendesha ombi dhidi ya API ya moja kwa moja ili uweze kuona jibu halisi. Fungua sehemu hii ya mwisho (endpoint) kwenye konsole ya API
Maelezo
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.
Vigezo
| Jina | Aina | Inayohitajika | Kilicho hiki |
|---|---|---|---|
listing_id (path) | string | Ndiyo | — |
image_id (path) | string | Ndiyo | — |
Mwili wa ombi
| Jina | Aina | Inayohitajika | Kilicho hiki |
|---|---|---|---|
alt | string | Hapana | — |
position | integer | Hapana | — |
is_cover | boolean | Hapana | Only `true` is meaningful — a listing always has exactly one cover. |
Majibu
| Jina | Aina | Inayohitajika | Kilicho hiki |
|---|---|---|---|
id | string | Ndiyo | — |
url | string | Hapana | 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 | Hapana | 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 | Ndiyo | 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 | Ndiyo | Pixel height after orientation is applied. |
alt | string | Hapana | — |
is_cover | boolean | Ndiyo | — |
position | integer | Ndiyo | — |
Hitilafu ambazo mwisho huu unaweza kurudisha
401 · 404