marketplace

POST /v1/marketplace/listings/{listing_id}/images

Upload one image to a listing.

Всички крайни точки в marketplace

Упълномощаване

Изпратете API ключ като носител (bearer token). Тази точка за достъп не указва конкретно разрешение в спецификацията, затова дайте на ключа си най-малкото необходимо и проверете отговора, вместо да правите предположения.

Този ендпойнт не изисква идентификатор на организация. Вашият ключ вече идентифицира организацията, към която принадлежи, и отговорът е ограничен до нея.

Опитайте

Заменете всичко в квадратни скоби със собствени стойности, а ключовия заместващ символ – с ключ от вашето табло за управление.

curl -X POST https://api.zinndigital.com/v1/marketplace/listings/{listing_id}/images \
  -H "Authorization: Bearer zdk_live_…"

Влязохте ли в профила си? API конзолата във вашето табло за управление попълва действителното идентификационно число на вашата организация и вашия собствен ключ и изпълнява заявката спрямо реалното API, за да можете да видите действителния отговор. Отворете този крайpoint в API конзолата

Детайли

The bytes are decoded to decide the format — the declared `Content-Type` and the filename are both caller-chosen — checked against the listing type's policy, stripped of EXIF and re-encoded with orientation applied, and only then stored. A rejected upload leaves nothing behind: no object, no row. ⛔⛔ **EXIF is removed before storage, not on the way out.** A phone photo of a house for sale carries the GPS coordinates of the house. ⛔ **An image is content**, so adding one to a live third-party listing takes it off sale and back into the review queue (`docs/78` §5). A 422 carries `code` and `params` in `details` — `TOO_SMALL` with the actual and required dimensions, for example — so the surface renders the sentence in the seller's own language rather than the engine hardcoding English (CLAUDE.md §2.19).

Параметри

ИмеТипЗадължителноКакво представлява
listing_id (path)stringДа

Отговор

ИмеТипЗадължителноКакво представлява
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Да

Грешки, които този крайpoint може да върне

401 · 404 · 422