Skip to content
For the complete documentation index, see llms.txt. This page is also available as Markdown.

Create a product image

Adds an image to a product.

Supply the image in one of the two ways described under Supplying the Image: send the file content in image, or reference an already stored file with image_path together with height and width. Requests that satisfy neither form are rejected with the business error product_image_500_1. Note that a record created through image always ends up with height and width set to null — see the caveat under Supplying the Image.

order is required on create; see Display Order.

The image is created with an active status; the status of an image is not part of this API.

When the product is a seller product, the new image is copied to every offer of that product, as described under Marketplace Offer Propagation.

If the product had no active image before this one, the listability of the product's variant group is recalculated. That recalculation is governed by the LISTABLE_PRODUCT_RULES and LIST_SIMPLE_INSTEAD_OF_META dynamic settings; see Listability Side Effects and Dynamic Settings & Environment Variables.

post
/product_image/
Authorizations
AuthorizationstringRequired

Token credential sent in the Authorization header, in the form: Token <your-token>. Requires a staff (admin) account.

Body

The image to attach to a product. Supply the file content in image, or reference an already stored file with image_path together with height and width. See Supplying the Image.

productintegerRequired

Identifier of the product the image belongs to.

Example: 1024
imagestringOptional

The file content to store, as text — this is not a binary file upload. The stored path and name are determined by the platform, and the stored record always ends up without dimensions. Takes precedence over image_path if both are sent. See the caveat under Supplying the Image.

image_pathstringOptional

Path of a file that is already present in the platform's media storage, to be referenced instead of sending new content. Whenever this field is sent, height and width are both required — including when it is sent alongside image and therefore ignored. Accepted in requests only; never returned in a response.

Example: products/2026/01/15/1024/6f1c2a48-9b3e-4d17-8f2a-0c5d7e9a1b34.jpg
orderinteger · max: 32767Required

Position of the image within the product's gallery. Lower values are shown first. Required.

Example: 0
heightinteger · max: 2147483647 · nullableOptional

Height of the image in pixels. Required when image_path is sent. Discarded when image is sent — the created record is then stored with a null height.

Example: 1200
widthinteger · max: 2147483647 · nullableOptional

Width of the image in pixels. Required when image_path is sent. Discarded when image is sent — the created record is then stored with a null width.

Example: 800
Responses
201

The product image was created.

application/json

An image attached to a product, together with its display order and stored dimensions.

pkintegerRequired

Unique identifier of the product image.

Example: 55
productintegerRequired

Identifier of the product the image belongs to.

Example: 1024
imagestringRequired

Path of the stored image file within the platform's media storage. Generated by the platform when the file content is sent in image, or the value supplied in image_path when an already stored file is referenced.

Example: products/2026/01/15/1024/6f1c2a48-9b3e-4d17-8f2a-0c5d7e9a1b34.jpg
orderintegerRequired

Position of the image within the product's gallery. Lower values are shown first.

Example: 0
heightinteger · nullableRequired

Height of the image in pixels. null when the record was created by sending the file content in image, or when no dimension was ever recorded for it.

Example: 1200
widthinteger · nullableRequired

Width of the image in pixels. null when the record was created by sending the file content in image, or when no dimension was ever recorded for it.

Example: 800
post/product_image/
POST /api/v1/remote/1/product_image/ HTTP/1.1
Host: sandbox.akinon.com
Authorization: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 148

{
  "product": 1024,
  "image": "text",
  "image_path": "products/2026/01/15/1024/6f1c2a48-9b3e-4d17-8f2a-0c5d7e9a1b34.jpg",
  "order": 0,
  "height": 1200,
  "width": 800
}
{
  "pk": 55,
  "product": 1024,
  "image": "products/2026/01/15/1024/6f1c2a48-9b3e-4d17-8f2a-0c5d7e9a1b34.jpg",
  "order": 0,
  "height": 1200,
  "width": 800
}

Last updated

Was this helpful?