add_alert
สำคัญ: Content API for Shopping จะหยุดให้บริการในวันที่ 18 สิงหาคม 2026
rocket
พบกับ
Merchant API
ซึ่งเป็นเวอร์ชันต่อไปอย่างเป็นทางการของ Content API for Shopping
update
รับข้อมูลล่าสุด
เกี่ยวกับฟีเจอร์ใหม่ การแก้ไขข้อบกพร่อง และการอัปเดตของ Merchant API
Google uses AI technology to translate content into your preferred language. AI translations can contain errors.
การทดสอบทรัพยากรผลิตภัณฑ์
จัดทุกอย่างให้เป็นระเบียบอยู่เสมอด้วยคอลเล็กชัน
บันทึกและจัดหมวดหมู่เนื้อหาตามค่ากำหนดของคุณ
ตัวอย่างที่คุณใช้ทดสอบการติดตั้งใช้งานด้วยproductsได้มีดังนี้
เพิ่มผลิตภัณฑ์
สร้าง JSON ที่ถูกต้องสำหรับ
ผลิตภัณฑ์
ส่งinsert
คำขอ
พร้อมข้อมูลผลิตภัณฑ์และรหัสผู้ขาย
POST https://shoppingcontent.googleapis.com/content/v2.1/merchantId/products
ตรวจสอบว่าคุณได้รับรหัสสถานะ HTTP 200
ดูผลิตภัณฑ์
ส่งget
คำขอ
พร้อมรหัสผู้ขายและ
productId ของผลิตภัณฑ์
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 หลังจากผ่านไปอย่างน้อย 5 นาที คุณสามารถส่งgetคำขออีกครั้งเพื่อยืนยันว่าค่าที่อัปเดตแล้ว
availability: out of stockมีผล
ลบผลิตภัณฑ์
ส่งdelete
คำขอ
พร้อมรหัสผู้ขายและproductIdของผลิตภัณฑ์
DELETE https://shoppingcontent.googleapis.com/content/v2.1/merchantId/products/productId
ตรวจสอบว่าคุณได้รับรหัสสถานะ HTTP 204
เนื้อหาของหน้าเว็บนี้ได้รับอนุญาตภายใต้ใบอนุญาตที่ต้องระบุที่มาของครีเอทีฟคอมมอนส์ 4.0 และตัวอย่างโค้ดได้รับอนุญาตภายใต้ใบอนุญาต Apache 2.0 เว้นแต่จะระบุไว้เป็นอย่างอื่น โปรดดูรายละเอียดที่นโยบายเว็บไซต์ Google Developers Java เป็นเครื่องหมายการค้าจดทะเบียนของ Oracle และ/หรือบริษัทในเครือ
อัปเดตล่าสุด 2026-07-06 UTC
[null,null,["อัปเดตล่าสุด 2026-07-06 UTC"],[],["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"]]