rocket
मिलें
Merchant API
से. यह Content API for Shopping की जगह लेने वाला आधिकारिक एपीआई है.
update
Merchant API की नई सुविधाओं, गड़बड़ियों को ठीक करने के तरीके, और अपडेट के बारे में
अपडेट पाएं.
add_alert
ध्यान दें: Content API for Shopping, 18 अगस्त, 2026 को बंद हो जाएगा.
प्रॉडक्ट संसाधन की जांच करना
संग्रह की मदद से व्यवस्थित रहें
अपनी प्राथमिकताओं के आधार पर, कॉन्टेंट को सेव करें और कैटगरी में बांटें.
यहां कुछ ऐसे उदाहरण दिए गए हैं जिनका इस्तेमाल करके,
products
संसाधन.
प्रॉडक्ट जोड़ें
किसी विंडो के लिए मान्य JSON बनाना
प्रॉडक्ट है.
insert
बनाएं
अनुरोध करें
अपने Merchant Center खाते से जोड़ने के लिए:
POST https://shoppingcontent.googleapis.com/content/v2.1/merchantId/products
पुष्टि करें कि आपको HTTP 200
स्टेटस कोड मिल रहा है.
कोई प्रॉडक्ट देखें
get
बनाएं
अनुरोध करें
अपने मर्चेंट ID और प्रॉडक्ट के
productId:
GET https://shoppingcontent.googleapis.com/content/v2.1/merchantId/products/productId
पुष्टि करें कि आपको HTTP 200
स्थिति कोड और
प्रॉडक्ट.
प्रॉडक्ट अपडेट करें
किसी प्रॉडक्ट के लिए नया 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
को लागू किया गया.
प्रॉडक्ट मिटाना
delete
बनाएं
अनुरोध करें
अपने मर्चेंट ID और प्रॉडक्ट के
productId
:
DELETE https://shoppingcontent.googleapis.com/content/v2.1/merchantId/products/productId
पुष्टि करें कि आपको HTTP 204
स्टेटस कोड मिल रहा है.
जब तक कुछ अलग से न बताया जाए, तब तक इस पेज की सामग्री को Creative Commons Attribution 4.0 License के तहत और कोड के नमूनों को Apache 2.0 License के तहत लाइसेंस मिला है. ज़्यादा जानकारी के लिए, Google Developers साइट नीतियां देखें. Oracle और/या इससे जुड़ी हुई कंपनियों का, Java एक रजिस्टर किया हुआ ट्रेडमार्क है.
आखिरी बार 2025-07-25 (UTC) को अपडेट किया गया.
[null,null,["आखिरी बार 2025-07-25 (UTC) को अपडेट किया गया."],[[["\u003cp\u003eThis page provides examples of how to interact with the \u003ccode\u003eproducts\u003c/code\u003e resource using the Content API for Shopping.\u003c/p\u003e\n"],["\u003cp\u003eYou can add a new product by constructing valid JSON and making an \u003ccode\u003einsert\u003c/code\u003e request.\u003c/p\u003e\n"],["\u003cp\u003eView an existing product using a \u003ccode\u003eget\u003c/code\u003e request with your merchant ID and the product ID.\u003c/p\u003e\n"],["\u003cp\u003eUpdate a product's information by making an \u003ccode\u003einsert\u003c/code\u003e request with the updated JSON data.\u003c/p\u003e\n"],["\u003cp\u003eDelete a product using a \u003ccode\u003edelete\u003c/code\u003e request with your merchant ID and the product ID.\u003c/p\u003e\n"]]],["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"],null,["# Testing the products resource\n\nHere are some examples you can use to test your implementation with the\n`products` resource.\n\nAdd a product\n-------------\n\n1. Construct [valid JSON for a\n product](/shopping-content/reference/rest/v2.1/products#resource:-product).\n\n2. Make an [`insert`\n request](/shopping-content/reference/rest/v2.1/products/insert#http-request)\n with the product data and your merchant ID:\n\n POST https://shoppingcontent.googleapis.com/content/v2.1/\u003cvar translate=\"no\"\u003emerchantId\u003c/var\u003e/products\n\n3. Verify that you receive an `HTTP 200` status code.\n\nView a product\n--------------\n\n1. Make a [`get`\n request](/shopping-content/reference/rest/v2.1/products/get#http-request)\n with your merchant ID, and the product's\n [productId](/shopping-content/guides/products/product-id):\n\n GET https://shoppingcontent.googleapis.com/content/v2.1/\u003cvar translate=\"no\"\u003emerchantId\u003c/var\u003e/products/\u003cvar translate=\"no\"\u003eproductId\u003c/var\u003e\n\n2. Verify that you receive an `HTTP 200` status code, and the JSON data for the\n product.\n\nUpdate a product\n----------------\n\n1. Construct the new JSON for a product. For example, change a single field in\n the JSON `availability: in stock`, to `availability: out of stock` for the\n product you used to test the `insert` call.\n\n2. Make an [`insert`\n request](/shopping-content/reference/rest/v2.1/products/insert#http-request)\n with the new product data and your merchant ID:\n\n POST https://shoppingcontent.googleapis.com/content/v2.1/\u003cvar translate=\"no\"\u003emerchantId\u003c/var\u003e/products\n\n3. Verify that you receive an `HTTP 200` status code. After at least five\n minutes, you can make another `get` request to confirm the updated value,\n `availability: out of stock`, was applied.\n\nDelete a product\n----------------\n\n1. Make a [`delete`\n request](/shopping-content/reference/rest/v2.1/products/delete#http-request)\n with your merchant ID, and the product's\n [`productId`](/shopping-content/guides/products/product-id):\n\n DELETE https://shoppingcontent.googleapis.com/content/v2.1/\u003cvar translate=\"no\"\u003emerchantId\u003c/var\u003e/products/\u003cvar translate=\"no\"\u003eproductId\u003c/var\u003e\n\n2. Verify that you receive an `HTTP 204` status code."]]