Serve a media file
A file of the store's media, for a store whose server serves its media itself (direct delivery — local development). Public, cached as immutable. On a store whose host delivers its own files, every key answers 404: use the URL the API gives.
path Parameters
keyA Media Key, e.g. products/3f2a9c0b1d2e4f5061728394a5b6c7d8.webp
Serve a media file › Responses
The file, with its Content-Type
Ticket an image upload
Records a pending upload and answers how the browser sends the file (send). Then call POST /api/media/uploads/{id}/complete; the image's key is attachable once complete.
Ticket an image upload › Request Body
folderproducts (gallery, categories, the logo, rich text, apps) or landing (landing-page stacks)
contentTypebytesThe file's exact size
Ticket an image upload › Responses
The ticket
successSend a relayed upload's bytes
Complete an image upload
Confirms the file with the store's host. Completing twice answers the same image.
path Parameters
idThe ticket's mediaId
The ticket's mediaId
Complete an image upload › Request Body
hostRefFor a form ticket: the fileId the host answered
widthThe image's width as the browser measured it
heightThe image's height as the browser measured it
Complete an image upload › Responses
The image, ready
successdata