user3338098
user3338098

Reputation: 874

google shopping api documentation

I would like to test our new code without incurring the wrath of google, but the documentation from google leaves much to be desired...

A former employee used to use the GShoppingContent.php library, however it doesn't support the version 2 api. so now I need to learn the api...

https://support.google.com/merchants/answer/188494 seems to indicate that our use of the mpn field is fine as it is a considered a unique identifier. However it also says that the id is required, which as far as the code suggests, has never been set... as GShoppingContent has NO setProductId or setId function for the products, we have only ever used mpn, so I'll assume that this is a new requirement... Also https://developers.google.com/shopping-content/v2/reference/v2/inventory/custombatch makes no reference to the possibility of using mpn or any other unique id that they offer...

Where might I find a list of REQUIRED changes? (including for example the use of the id attribute...) If product id is not required for inventory updates, then where is the accurate and complete documentation for the batch inventory method?

As an alternative is there a way to test our new code with out getting banned by google for incorrect product data... (when we have done changes in the past it has resulted in being almost banned, even for the smallest of issues...)

Upvotes: 0

Views: 1117

Answers (1)

user3338098
user3338098

Reputation: 874

Can't be certain, but it seems GShoppingContent sets the id to online:en:US:*SKU* where *SKU* is what was passed into GSC_Product::setSKU.

Managed to learn this by OAuthing on https://developers.google.com/shopping-content/v2/reference/v2/products/list

they have a dry-run option so I felt safe running this without worry of damaging our product data, even temporarily. (plus list doesn't sound very likely to cause data corruption, but you never know...)

Upvotes: 0

Related Questions