---
title: "product.image.add"
method: POST
path: "/product.image.add.json"
tags: ["product"]
---

# product.image.add

`POST /product.image.add.json`

## Request

- Base URL: `https://api.api2cart.com/v1.1`
- URL: `https://api.api2cart.com/v1.1/product.image.add.json`
- Auth: API key in header `x-api-key` and API key in header `x-store-key`

Add image to product

## Request body

- ProductImageAdd
  - `type` 'small' | 'base' | 'additional' | 'thumbnail', required: Defines image's types that are specified by comma-separated list
  - `image_name` string, required: Defines image's name
  - `product_id` string: Defines product id where the image should be added
  - `product_variant_id` string: Defines product's variants specified by variant id
  - `variant_ids` string: Defines product's variants ids
  - `option_value_ids` string: Defines product's option values ids
  - `store_id` string: Store Id
  - `lang_id` string: Add product image on specified language id
  - `url` string: Defines URL of the image that has to be added
  - `content` string: Content(body) encoded in base64 of image file
  - `label` string: Defines alternative text that has to be attached to the picture
  - `mime` string: Mime type of image http://en.wikipedia.org/wiki/Internet_media_type.
  - `position` integer: Defines image’s position in the list
  - `use_latest_api_version` boolean: Use the latest platform API version
  - `idempotency_key` string: A unique identifier associated with a specific request. Repeated requests with the same <strong>idempotency_key</strong> return a cached response without re-executing the business logic. <strong>Please note that the cache lifetime is 15 minutes.</strong>

## Response `200`

successful operation

- object
  - `return_code` integer
  - `return_message` string
  - `result` object
    - `id` string
    - `image_path` string

---

[API](https://skmtc.dev/api2cart/apis/api2cart-openapi.md) · [All operations](https://skmtc.dev/api2cart/apis/api2cart-openapi/llms.txt) · [OpenAPI document](https://skmtc.dev/api2cart/apis/api2cart-openapi/revisions/c34440741693?raw)
