Skip to content

Latest commit

 

History

History
61 lines (39 loc) · 2.83 KB

File metadata and controls

61 lines (39 loc) · 2.83 KB

Product and Variation Images in the Trade Catalog: Overview of Methods

{% note tip "" %}

If you are developing integrations for Bitrix24 using AI tools (Codex, Claude Code, Cursor), connect to the MCP server so that the assistant can utilize the official REST documentation.

{% endnote %}

Different types of images can be added to products and variations:

  • DETAIL_PICTURE — detailed image, the field is available in the old product card
  • PREVIEW_PICTURE — preview image, the field is available in the old product card
  • MORE_PHOTO — additional images

Quick navigation: all methods

How to Add an Image to a Created Product

To add or replace an image for a created product, use the methods catalog.productImage.*. Specify the image type and pass an array of two elements in the fileContent parameter:

  • the name of the image file with its extension
  • the file in base64 encoding

If the image type is not specified, it will be saved as an additional image MORE_PHOTO.

How to Add an Image When Creating a Product

Use the method catalog.product.add and pass an object in the format {fileData: [value1, value2]} to the previewPicture or detailPicture parameters:

  • value1 — the name of the image file with its extension
  • value2 — the file in base64 encoding

{% note tip "Typical use-cases and scenarios" %}

{% endnote %}

Relationship with Other Objects

Products. Specify the product ID for which you want to add an image. The list of IDs can be obtained using the methods:

Overview of Methods {#all-methods}

Scope: catalog

Who can perform the method: administrator

#| || Method | Description || || catalog.productImage.add | Adds an image to a product or variation || || catalog.productImage.get | Returns information about a specific product or variation image || || catalog.productImage.list | Returns a list of product or variation images || || catalog.productImage.delete | Deletes an image from a product or variation || || catalog.productImage.getFields | Returns available fields for a product or variation image || |#