ย้ายข้อมูลการจัดการแหล่งข้อมูล

แหล่งข้อมูลช่วยให้คุณอัปโหลดผลิตภัณฑ์ไปยัง Google ได้ แหล่งข้อมูลอัตโนมัติทำให้การส่งข้อมูลผลิตภัณฑ์ไปยัง Google ง่ายขึ้น ดูข้อมูลเพิ่มเติมได้ที่ภาพรวม API แหล่งข้อมูลของผู้ขาย

ตัวอย่างการเปรียบเทียบคำขอใน Content API for Shopping กับ API แหล่งข้อมูลผู้ขายมีดังนี้

API เนื้อหาสำหรับช็อปปิ้ง API แหล่งข้อมูลผู้ขาย
URL https://shoppingcontent.googleapis.com/content/v2.1/{merchantId}/datafeeds https://merchantapi.googleapis.com/datasources/v1beta/{parent}/dataSources
ตัวระบุ {id} {name}

วิธีการ

การเปรียบเทียบวิธีการฟีดข้อมูลใน Content API for Shopping และ Merchant Data Source API มีดังนี้

วิธีการ API เนื้อหาสำหรับช็อปปิ้ง API แหล่งข้อมูลผู้ขาย
customBatch ได้ ไม่ได้
insert ได้ ได้
get ได้ ได้
update ได้ ได้
delete ได้ ได้
list ได้ ได้
fetchNow ได้ ได้

ตัวระบุ

ชื่อของแหล่งข้อมูลจะสร้างจากรหัส Content API ไม่ได้เนื่องจากค่ารหัสมีการเปลี่ยนแปลง ซึ่งแตกต่างจากทรัพยากรอื่นๆ คุณสามารถเรียกใช้เมธอดรายการเพื่อรับรหัสใหม่ของแหล่งข้อมูลได้

หรือจะเรียกใช้เมธอด accounts.products.get และรับรหัสแหล่งข้อมูลใหม่จากทรัพยากร product ก็ได้

วิธีการ

สิ่งที่เปลี่ยนแปลงสำหรับฟีดข้อมูลใน Merchant Data Source API มีดังนี้

วิธีการ URL ใน Content API for Shopping URL ใน API แหล่งข้อมูลผู้ขาย ตัวระบุใน Content API for Shopping ตัวระบุใน API แหล่งข้อมูลผู้ขาย คำอธิบาย
create POST https://shoppingcontent.googleapis.com/content/v2.1/{merchantId}/datafeeds POST https://merchantapi.googleapis.com/datasources/v1beta/{parent=accounts/*}/dataSources {merchantId} {parent} ใน Content API for Shopping สถานการณ์createเพียงอย่างเดียวคือการสร้างฟีดไฟล์หลัก เราได้แนะนำสถานการณ์ create อื่นๆ ทั้งหมดใหม่ใน Merchant Data Source API
update PUT https://shoppingcontent.googleapis.com/content/v2.1/{merchantId}/datafeeds/{datafeedId} PATCH https://merchantapi.googleapis.com/datasources/v1beta/{dataSource.name=accounts/*/dataSources/*} {merchantId}/datafeeds/{datafeedId} {dataSource.name=accounts/*/dataSources/*}
delete DELETE https://shoppingcontent.googleapis.com/content/v2.1/{merchantId}/datafeeds/{datafeedId} DELETE https://merchantapi.googleapis.com/datasources/v1beta/{name=accounts/*/dataSources/*} {merchantId}/ฟีดข้อมูล/{datafeedId} {name=accounts/*/dataSources/*}
get GET https://shoppingcontent.googleapis.com/content/v2.1/{merchantId}/datafeeds/{datafeedId} GET https://merchantapi.googleapis.com/datasources/v1beta/{name=accounts/*/dataSources/*} {merchantId}/datafeeds/{datafeedId} {name=accounts/*/dataSources/*}
list GET https://shoppingcontent.googleapis.com/content/v2.1/{merchantId}/datafeeds GET https://merchantapi.googleapis.com/datasources/v1beta/{parent=accounts/*}/dataSources {merchantId} {parent}
fetchnow โพสต์ https://shoppingcontent.googleapis.com/content/v2.1/{merchantId}/datafeeds/{datafeedId}/fetchNow POST https://merchantapi.googleapis.com/datasources/v1beta/{name=accounts/*/dataSources/*}:fetch {merchantId}/ฟีดข้อมูล/{datafeedId} {name=accounts/*/dataSources/*}