Docs/REST API/api_vendor_upload_gallery
POST/api/v1/vendor/assets/{id}/gallery-image?slot={0..4}Authorization: Bearer <token>

Upload Gallery Image

Upload thumbnail and showcase gallery images for card grids and product galleries.

Description

Slot 0 serves as the primary card thumbnail rendered across storefront grids. Slots 1 through 4 serve as high-resolution gallery slides on the product detail showcase.

Parameters

3 parameters
ParameterTypeRequiredDefaultDescription
idstringRequiredTarget asset GUID.
slotnumberRequiredGallery slot index (0 for primary thumbnail, 1-4 for extra preview slides).
filebinary (multipart/form-data)RequiredHigh-resolution JPG, PNG, or WebP image.

Request Example

curl -X POST "https://api.trykrafto.xyz/api/v1/vendor/assets/6f94726b-67a3-41bb-a5a4-927429beecfa/gallery-image?slot=0" \
  -H "Authorization: Bearer kr_live_token..." \
  -F "file=@/path/to/hero_thumbnail.jpg"

Response Example

application/json (200 OK)
{
  "id": "prv_9921_bc",
  "assetId": "6f94726b-67a3-41bb-a5a4-927429beecfa",
  "kind": "Gallery",
  "sortOrder": 0,
  "url": "/api/v1/previews/prv_9921_bc"
}