marketplace
POST /v1/marketplace/listings/{listing_id}/images
Upload one image to a listing.
Authentification
Envoyez une clé d'API en tant que jeton du porteur (bearer token). Cet endpoint n'indique pas de permission spécifique dans la spécification, attribuez donc à votre clé le minimum requis et vérifiez la réponse plutôt que de faire des suppositions.
Cet endpoint ne prend aucun identifiant d'organisation. Votre clé identifie déjà l'organisation à laquelle elle appartient, et la réponse y est limitée.
Essayer
Remplacez tout ce qui se trouve entre crochets par vos propres valeurs, et le espace réservé à la clé par une clé de votre tableau de bord.
curl -X POST https://api.zinndigital.com/v1/marketplace/listings/{listing_id}/images \
-H "Authorization: Bearer zdk_live_…"Connecté ? La console d'API de votre tableau de bord saisit votre véritable ID d'organisation ainsi que votre propre clé, et exécute la requête sur l'API de production afin que vous puissiez voir la réponse réelle. Ouvrir ce point de terminaison dans la console API
Détails
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).
Paramètres
| Nom | Type | Obligatoire | Qu'est-ce que c'est |
|---|---|---|---|
listing_id (path) | string | Oui | — |
Réponse
| Nom | Type | Obligatoire | Qu'est-ce que c'est |
|---|---|---|---|
id | string | Oui | — |
url | string | Non | 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 | Non | 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 | Oui | 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 | Oui | Pixel height after orientation is applied. |
alt | string | Non | — |
is_cover | boolean | Oui | — |
position | integer | Oui | — |
Erreurs que cet point de terminaison peut renvoyer
401 · 404 · 422