Products
Add a product image
One of url (a public image to import), upload_id (a file you PUT to a slot from POST /v1/uploads) or media_id (an image already in the store's media library). JPG, PNG, WebP or AVIF, 3 MB at most.
Ordexs makes the sizes the storefront serves (WebP, 320 to 1920 px), adds the file to the media library (it counts toward the store's storage) and puts the image on the product at position (0 is the main image; default last). At most 50 images a product, and 500 images a store a day through the API (quota_exceeded).
Path parameters
- product_idstringRequired
starts with prod_
Body
- urlstring
uri · up to 2000 characters
- upload_idstring
starts with upl_
- media_idstring
starts with med_
- altstring or null
Describes the image for screen readers and search engines.
up to 300 characters
- positioninteger
0 is the main image.
0–49
Returns
201 Created · The image, on the product. ProductImage
- idstring
starts with img_
- objectstring
always "product_image"
- product_idstring
- urlstring
The largest size. The others are the same address ending in -320, -640 and -1024 instead of -1920.
- altstring or null
- positioninteger
0 is the main image.
- media_idstring or null
The file in the media library.
- created_atstring
ISO 8601 date-time, UTC
Errors
Every error has the same shape. This endpoint can answer with:
