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 ارسال کنید. این نقطه پایانی مجوز خاصی را در مشخصات خود ذکر نمی‌کند، بنابراین به جای فرض کردن، حداقل نیازهای کلید خود را بدهید و پاسخ را بررسی کنید.

این نقطه پایانی هیچ شناسه سازمانی را دریافت نمی‌کند. کلید شما در حال حاضر سازمان مربوطه را مشخص می‌کند و پاسخ در همان محدوده ارائه می‌شود.

امتحان کنید

هر چیزی را که داخل براکت‌های زاویه‌دار قرار دارد با مقادیر خودتان جایگزین کنید، و نگهدارنده کلید را با کلیدی از داشبورد خود جایگزین نمایید.

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 در داشبورد شما شناسه سازمان واقعی و کلید خودتان را پر می‌کند و درخواست را روی 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 t…
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