marketplace
POST /v1/marketplace/listings/{listing_id}/images
Upload one image to a listing.
Նույնականացում
Ուղարկեք API բանալին որպես bearer թոքեն։ Այս վերջնակետը բնութագրում չի նշում որոշակի թույլտվության մասին, ուստի տվեք ձեր բանալուն նվազագույն անհրաժեշտը և ենթադրություններ անելու փոխարեն ստուգեք պատասխանը:
Այս վերջնակետը կազմակերպության ID չի ընդունում: Ձեր բանալին արդեն իսկ նույնականացնում է այն կազմակերպությունը, որին պատկանում է, և պատասխանը սահմանափակված է դրանով:
Փորձել
Փոխարինեք անկյունային փակագծերում գտնվող ցանկացած բան ձեր սեփական արժեքներով, և բանալու տեղապահը՝ ձեր վահանակի բանալիով:
curl -X POST https://api.zinndigital.com/v1/marketplace/listings/{listing_id}/images \
-H "Authorization: Bearer zdk_live_…"Մուտք գործե՞լ եք: Ձեր վահանակի API վահանակը լրացնում է ձեր իրական կազմակերպության ID-ն և ձեր սեփական բանալին և գործարկում է հարցումը ուղիղ API-ի դեմ, որպեսզի կարողանաք տեսնել փաստացի պատասխանը: Բացեք այս վերջնակետը 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 | Այո | — |
Պատասխան
| Անուն | Տեսակ | Պահանջվում է | Ինչ է դա |
|---|---|---|---|
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 · 422