marketplace

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

Upload one image to a listing.

Tất cả các điểm cuối marketplace

Xác thực

Gửi khóa API dưới dạng mã thông báo bearer. Điểm cuối này không nêu rõ quyền cụ thể trong thông số kỹ thuật, vì vậy hãy cấp cho khóa của bạn quyền tối thiểu cần thiết và kiểm tra phản hồi thay vì phỏng đoán.

Endpoint này không nhận ID tổ chức. Khóa của bạn đã xác định tổ chức mà nó thuộc về và phản hồi được giới hạn trong phạm vi đó.

Dùng thử

Thay thế bất kỳ nội dung nào trong ngoعل (angle brackets) bằng giá trị của riêng bạn và trình giữ chỗ key bằng một key từ trang tổng quan của bạn.

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

Đã đăng nhập? Bảng điều khiển API trong trang quản lý của bạn sẽ tự điền ID tổ chức thực tế và khóa của riêng bạn, sau đó chạy yêu cầu đối với API trực tiếp để bạn có thể xem phản hồi thực tế. Mở điểm cuối này trong bảng điều khiển API

Chi tiết

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).

Tham số

TênLoạiBắt buộcNội dung này là gì
listing_id (path)string

Phản hồi

TênLoạiBắt buộcNội dung này là gì
idstring
urlstringKhôngThe 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…
srcsetstringKhôngWidth 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…
widthintegerPixel width AFTER orientation is applied. Required in the markup to reserve space — an `<img>` without it is the largest single source of layout shift.
heightintegerPixel height after orientation is applied.
altstringKhông
is_coverboolean
positioninteger

Các lỗi điểm cuối này có thể trả về

401 · 404 · 422