In July, there was a change in how the
Content API for Shopping responds when inserting products that contain validation errors due to work related to
advanced feed management.
What changed?
Here are the changes in behavior when inserting product information that contains validation errors and would result in an invalid product:
|
Before
|
After
|
Inserting new product |
Error (inserted) |
Success (inserted) |
Updating invalid product |
Error (inserted) |
Success (inserted) |
Updating valid product |
Error (not inserted) |
Error (not inserted) |
That is, before the Content API would return an error whenever the new product information contained validation errors. Now, an error is returned only if the product information cannot be updated because it would invalidate the currently valid product.
Note: With this change, the Content API now returns an error response to product insertion only when the returned error response contains the
not_inserted
error. Since this error is now redundant, we plan to remove it in the future.
Why has this behavior changed?
With the new advanced feed management features, the products inserted via the Content API may be augmented with information from associated supplemental feeds. This means that a product that would normally be invalid from just the information provided by the Content API may become valid when the information is combined with supplemental feeds to produce the final version of a product.
For example, suppose you submit product information via the Content API that lacks needed
GTIN information. You then submit the GTIN information for your products separately via a supplemental feed that is connected to the Content API feed in Merchant Center. The products inserted by the Content API are not valid products due to the lack of GTIN information, but once the GTIN information from the supplemental feed is added, the resulting products are valid.
What do I need to do?
If you depend on error responses from
Products.insert
to detect validation issues, then you should instead also check your Content API feed for validation issues by using either
Productstatuses or
Accountstatuses. This will catch products that were inserted with invalid information and have not been made valid after insertion via supplemental feeds.
Note: If you are using
Productstatuses.list
to check all the products in a given account, you'll need to set the
includeInvalidInsertedItems
parameter to return products with validation errors.
If you have any questions or feedback about this change or any other questions about the Content API for Shopping, please let us know on the
forum.
- Stevie Strickland, Content API for Shopping Team