Import: Update Product Content
update_pre_publish_product_content[Import List Product]
[What it does] Changes non-price content of one pre-publish product — an item on the DSers Import List page: title, description, images, package, options and option values, variants, SKUs, and stock, including deletions and duplications.
[When to use] Use it when the user wants to edit, clean up, or save translated content for a pre-publish product, and once the agent has final wording or has identified the exact rows to change. Trigger words: change the title, edit description, remove images, delete variants, fix this import list product, save translation.
[When not to use] For selling or compare-at prices, use update_pre_publish_product_price. For a product already pushed to a store, including Draft status, use update_managed_store_product. It does not translate; it only saves content you already produced.
[How to use]
Take
import_item_idandresource_versionfrom a freshget_pre_publish_product; stale versions are rejected, and at least one editable field must be sent.Every option, option-value, and variant operation needs the ID plus its zero-based index, because duplicated rows keep the original ID.
supplier_product_image_url_listreplaces the whole list rather than appending; resend all images even to add one, the first becomes the main image, and each must be a public HTTPS URL with a resource path.Deletions cascade: removing an option value deletes every variant using it, and
delete_optionskeeps only variants matching the reserve value you name. At least one option, one value, and one variant must remain.Titles of variants that have options are derived; rename them through
rename_option_values, notsupplier_product_variant_list[].supplier_product_variant_name.An empty string clears a field while omitting it preserves the field;
cost,currency, and supplier are protected and cannot be changed.This write is not idempotent. Send it once. The server verifies the stored content before returning
import_item_id,changed_fields,changed_variant_ids, andchanged_option_ids; it does not return a newresource_version. Before another write, or if the outcome is unknown, re-read withget_pre_publish_productinstead of resending.Import List products, draft products, and pre-publish products name the same objects; accept the old wording and answer in generic product terms rather than sending the user to a page. [Side effects] Rewrites the pre-publish product; deletions cannot be undone. [Confirmation] Required but skippable; always confirm deletions first.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| package | No | Optional product package update. Provide at least one field; omitted fields are preserved and empty strings clear supplied fields. Paste JSON example: {"dimension_unit":"CENTIMETER","height":"5","length":"20","weight":"0.5","weight_unit":"KILOGRAMS","width":"10"}. | |
| delete_options | No | Delete whole options while preserving supplier mapping. At least one product option remains. For each deleted option, choose one current option value to retain in reserve_option; only variants matching all selected reserve values remain. Paste JSON example: [{"reserve_supplier_product_option_value_id":"10002","reserve_value_index":0,"supplier_product_option_id":"10001"}]. | |
| import_item_id | Yes | Copy from get_pre_publish_product response import_item_id field. Required. | |
| delete_variants | No | Optional variant rows to delete. At least one variant must remain. Always copy both supplier_product_variant_id and variant_index from detail. Paste JSON example: [{"supplier_product_variant_id":"10050011958743970","variant_index":0}]. | |
| resource_version | Yes | Copy from get_pre_publish_product response resource_version field. Stale versions are rejected — re-read get_pre_publish_product if more than a few minutes old. Required. | |
| duplicate_variants | No | Copy individual variant rows. The copied row retains supplier_product_variant_id but must receive a distinct new_sku. Paste JSON example: [{"new_sku":"SKU-BLACK-M-COPY","supplier_product_variant_id":"10050011958743970","variant_index":0}]. | |
| option_value_images | No | Optional option-value picture changes. Matching variant option items and variant images are synchronized. An empty supplier_product_option_value_image_url clears the picture. Paste JSON example: [{"supplier_product_option_id":"10001","supplier_product_option_value_id":"10002","supplier_product_option_value_image_url":"https://example.com/black.jpg","value_index":0}]. | |
| delete_option_values | No | Optional option-value deletions. Each deleted value is removed from its option and every variant using it is deleted. At least one value must remain in that option and at least one product variant must remain. Paste JSON example: [{"supplier_product_option_id":"10001","supplier_product_option_value_id":"10002","value_index":0}]. | |
| rename_option_values | No | Rename option values. The option definition, every matching variant option item, and every affected derived variant title are updated together. Paste JSON example: [{"supplier_product_option_id":"10001","supplier_product_option_value_id":"10002","supplier_product_option_value_name":"Black","value_index":0}]. | |
| supplier_product_title | No | Optional replacement supplier product title. It is trimmed, must remain non-empty, and is limited to 5000 bytes. | |
| duplicate_in_option_values | No | Copy an option value as the Import List page does. The copied value retains source_supplier_product_option_value_id, receives new_supplier_product_option_value_name, and each copied variant retains supplier_product_variant_id but receives a distinct new_sku. Paste JSON example: [{"new_supplier_product_option_value_name":"Navy","source_supplier_product_option_value_id":"10002","source_value_index":0,"supplier_product_option_id":"10001","variant_skus":[{"new_sku":"SKU-NAVY-M","supplier_product_variant_id":"10050011958743970","variant_index":0}]}]. | |
| supplier_product_description | No | Optional replacement supplier product description. Empty clears it. Dangerous executable HTML is rejected; maximum 500000 bytes. | |
| supplier_product_variant_list | No | Optional variant field changes. Always provide supplier_product_variant_id and variant_index. For variants with options, titles are derived and must be changed through rename_option_values. Paste JSON example: [{"supplier_product_variant_id":"10050011958743970","supplier_product_variant_sku":"SKU-BLACK-M","variant_index":0}]. | |
| supplier_product_image_url_list | No | Optional final ordered supplier product image URL list. Replaces the current list; the first URL becomes the main image. Use 1-100 unique public HTTPS image URLs with a resource path. Paste JSON example: ["https://example.com/product-main.jpg","https://example.com/product-detail.jpg"]. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| changed_fields | No | Editable fields changed by this mutation | |
| import_item_id | Yes | Updated import-list item ID | |
| changed_option_ids | No | Options changed by this mutation | |
| changed_variant_ids | No | Variant rows changed by this mutation | |
| toolcall_response_at | Yes | UTC timestamp when the Tool response was returned, formatted as RFC3339. |