How should you go about retrieving your invalid offers from the API? You can do this by using a new optional URL parameter that has been added to the products.list method, called
includeInvalidInsertedItems
. (Yes, it's a long name; we apologize for the extra keystrokes.) If you set this parameter to true
, your response will include products that were invalid at the time of insertion. The default value is false
, so if you don't include the parameter in your request, you will not have invalid products in your response. This preserves existing behavior, with the exception that if you have invalid product offers from feeds, they will also not be returned in the response. Note that you can still use the 'get' and 'delete' methods to reference product offers directly by ID, even if they are invalid. No additional parameter is needed for those methods.We are introducing one new error when inserting product offers, called "The item could not be inserted". An invalid offer is inserted only if it does not overwrite an existing valid offer. When there already is an existing valid offer, an additional error is returned, stating "The item could not be inserted". This also means that the product offer will not be available for review from products.list nor in the Diagnostics tab. Product offers are matched based on the full product ID, of the form
channel:languageCode:countryCode:offerId
.It's important to remember that the new
includeInvalidInsertedItems
parameter will only filter between valid and invalid product offers, as determined at insertion time, ignoring whether they were or not later disapproved. This means that it will return invalid product offers inserted both from the API and from feeds. To distinguish between approved and disapproved product offers, use the Productstatuses Service.To try out this new parameter, add
includeInvalidInsertedItems
as a query parameter to your products.list request. If you have more questions or feedback, please head on over to our developer forum.