GET https://shoppingcontent.googleapis.com/content/v2.1/merchantId/products/productId
Убедитесь, что вы получили код состояния HTTP 200 и данные JSON для продукта.
Обновить продукт
Создайте новый JSON для продукта. Например, измените одно поле в JSON availability: in stock на availability: out of stock для продукта, который вы использовали для тестирования вызова insert .
Сделайте запрос insert указав новые данные о продукте и идентификатор вашего продавца:
POST https://shoppingcontent.googleapis.com/content/v2.1/merchantId/products
Убедитесь, что вы получили код состояния HTTP 200 . По крайней мере, через пять минут вы можете сделать еще один запрос get , чтобы подтвердить, что было применено обновленное значение « availability: out of stock .
[[["Прост для понимания","easyToUnderstand","thumb-up"],["Помог мне решить мою проблему","solvedMyProblem","thumb-up"],["Другое","otherUp","thumb-up"]],[["Отсутствует нужная мне информация","missingTheInformationINeed","thumb-down"],["Слишком сложен/слишком много шагов","tooComplicatedTooManySteps","thumb-down"],["Устарел","outOfDate","thumb-down"],["Проблема с переводом текста","translationIssue","thumb-down"],["Проблемы образцов/кода","samplesCodeIssue","thumb-down"],["Другое","otherDown","thumb-down"]],["Последнее обновление: 2025-01-18 UTC."],[[["This page provides examples of how to interact with the `products` resource using the Content API for Shopping."],["You can add a new product by constructing valid JSON and making an `insert` request."],["View an existing product using a `get` request with your merchant ID and the product ID."],["Update a product's information by making an `insert` request with the updated JSON data."],["Delete a product using a `delete` request with your merchant ID and the product ID."]]],["To add a product, create valid JSON for it, then send an `insert` request via POST with the data and merchant ID, expecting an `HTTP 200` response. To view, send a `get` request via GET with the merchant ID and product ID, confirming an `HTTP 200` status and the JSON. To update, create new JSON, make an `insert` POST request, and verify `HTTP 200` then check with `get`. To delete, send a `delete` request via DELETE with the ID, verifying an `HTTP 204` status.\n"]]