marketplace
PATCH /v1/marketplace/listings/{listing_id}/images/{image_id}
Set the alt text, the gallery position, or make this the cover.
تصدیقهویت
د بیارر ټوکن په توګه یو API کي وسپارئ. دا پای ټکی په مشخصاتو کې کوم ځانګړی اجازه لیک نه بیانوي، نو خپل کیلي ته لږترلږه هغه څه ورکړئ چې ورته اړتیا لري او د فرض کولو پر ځای ځواب وپلټئ.
دا پای نقطه د سازمان هېڅ آی ډي نه اخلي. ستاسو کیلي مخکې تر مخکې هغه سازمان په ګوته کوي چې پورې اړه لري، او ځواب ورته محدود دی.
هڅه وکړئ
د انګلیسي په زاوي پنسونو کې هرڅه د خپلو ارزښتونو سره بدل کړئ، او د کلي ځای لرونکی ستاسو د ډشبورډ د کلي سره.
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 په وړاندې پرمخ وړي ترڅو تاسو وکولی شئ اصلي ځواب وګورئ. دا پای ټکی (endpoint) د 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 t… |
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