Here are some examples you can use to test your implementation with the
products
resource.
Add a product
Construct valid JSON for a product.
Make an
insert
request with the product data and your merchant ID:POST https://shoppingcontent.googleapis.com/content/v2.1/merchantId/products
Verify that you receive an
HTTP 200
status code.
View a product
Make a
get
request with your merchant ID, and the product's productId:GET https://shoppingcontent.googleapis.com/content/v2.1/merchantId/products/productId
Verify that you receive an
HTTP 200
status code, and the JSON data for the product.
Update a product
Construct the new JSON for a product. For example, change a single field in the JSON
availability: in stock
, toavailability: out of stock
for the product you used to test theinsert
call.Make an
insert
request with the new product data and your merchant ID:POST https://shoppingcontent.googleapis.com/content/v2.1/merchantId/products
Verify that you receive an
HTTP 200
status code. After at least five minutes, you can make anotherget
request to confirm the updated value,availability: out of stock
, was applied.
Delete a product
Make a
delete
request with your merchant ID, and the product'sproductId
:DELETE https://shoppingcontent.googleapis.com/content/v2.1/merchantId/products/productId
Verify that you receive an
HTTP 204
status code.