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 ، اعمال شد.
تاریخ آخرین بهروزرسانی 2025-01-18 بهوقت ساعت هماهنگ جهانی.
[null,null,["تاریخ آخرین بهروزرسانی 2025-01-18 بهوقت ساعت هماهنگ جهانی."],[[["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"]]