hermosodocs

upsert_merchant_product

Create or replace a Merchant Center product destructive

Area: MERCHANT SETTINGS, THE WRITE HALF · Ad campaign management. Generated from the running MCP server, like the rest of the tool reference.

Description

Create or replace a product in a Merchant Center feed — this is how a merchant's catalogue gets populated, and it is what Shopping ads, free listings and retail Performance Max actually serve. It is an UPSERT and a WHOLE-ROW write: calling it again for the same offerId REPLACES the product rather than patching it, so send every field you want kept each time. You do not have to find a feed first — omit dataSource and it resolves the account's one writable feed, creates one if there is none, and REFUSES by name if there are several rather than putting the product in a market the campaigns may not target. offerId, contentLanguage and feedLabel together ARE the product's identity and are all immutable; contentLanguage and feedLabel are taken from the feed when the feed declares them. For the product to serve at all Google needs title, description, link, imageLink, availability and price — a row missing any of them is stored and then disapproved, and the reply says so rather than letting you believe it published. The reply reports what GOOGLE STORED, not what was sent. Free: a feed edit cannot spend.

Parameters

ParameterTypeDescription
merchantCenterIdrequiredstringfrom list_merchant_accounts
offerIdrequiredstringyour own unique id for the product — IMMUTABLE, and what you update or delete it by later
dataSourcestringthe feed to write into, from list_merchant_data_sources. Omit to resolve the account's one writable feed (created if there is none, refused by name if there are several)
dataSourceNamestringdisplay name for a feed created on the fly
contentLanguagestringtwo-letter, e.g. "en" — taken from the feed when the feed declares one
feedLabelstringmarket bucket, e.g. "US" — taken from the feed when the feed declares one
titlestringproduct title; Google needs it for the product to serve
descriptionstringproduct description; Google needs it for the product to serve
linkstringthe product page URL on the merchant's store
imageLinkstringmain product image URL (https); Google needs it for the product to serve
additionalImageLinksstring[]extra product image URLs, as a list
availabilitystringin_stock | out_of_stock | preorder | backorder
conditionstringnew | refurbished | used
priceobjectprice object: {value in major units or amountMicros, currencyCode}
price.valuenumbermajor units, e.g. 19.99
price.amountMicrosstringmicros, if you already have them — 1 unit = 1000000
price.currencyCoderequiredstringthree-letter ISO 4217, e.g. USD
salePriceobjectsale price, same shape as price
salePrice.valuenumbermajor units, e.g. 19.99
salePrice.amountMicrosstringmicros, if you already have them — 1 unit = 1000000
salePrice.currencyCoderequiredstringthree-letter ISO 4217, e.g. USD
brandstringbrand name
gtinstringGTIN barcode (UPC, EAN or similar)
mpnstringmanufacturer part number
identifierExistsbooleanfalse for a product with no GTIN/MPN/brand, such as a service or a bundle
googleProductCategorystringGoogle product taxonomy category
productTypesstring[]merchant-defined category labels for the product, as a list
colorstringproduct colour
sizestringproduct size
materialstringproduct material
ageGroupstringnewborn, infant, toddler, kids or adult
genderstringmale, female or unisex
itemGroupIdstringshared id that groups the variants of one product, e.g. colours or sizes
attributesobjectany other product attribute by its Merchant API name — there are 145 and only the common ones are named above
customAttributesobject[]extra attributes as a list of {name, value} objects
customAttributes[].namerequiredstringattribute name
customAttributes[].valuerequiredstringattribute value

Example call

Every required parameter is shown, filled from the schema where it gives a value and otherwise with a placeholder naming the type. Replace the placeholders with real values. The same call works on the MCP server, the CLI and POST https://app.hermoso.ai/v1/tools/upsert_merchant_product.

MCP (tools/call)

{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"upsert_merchant_product","arguments":{"merchantCenterId":"<string>","offerId":"<string>"}}}

CLI

hermoso call upsert_merchant_product --json '{"merchantCenterId":"<string>","offerId":"<string>"}'

Credits

Credits are spent only on two things: running an AI model (image, video, voice, text, planning, post-production) and Ad Spy research. See Credits & costs.

All 759 Ad campaign management tools · tools.json