คุณสามารถใช้ Merchant API เพื่อแชร์ข้อมูลสินค้าคงคลัง ร้านค้า และยอดขายกับ Google เพื่อให้มองเห็นและจัดการได้ดียิ่งขึ้น
ฟีเจอร์ใหม่
นอกจากฟีเจอร์ Content API แล้ว Merchant API ยังมีฟีเจอร์ใหม่ดังต่อไปนี้
- เมธอดในการดึงข้อมูลสถานะของพร็อพเพอร์ตี้ระดับธุรกิจที่เกี่ยวข้องกับการผสานรวมพาร์ทเนอร์ทางธุรกิจสำหรับฟีดในร้าน
- เมธอดในการส่งการแจ้งเตือนไปยังผู้ค้าปลีก
ดูรายละเอียดเกี่ยวกับเมธอดเหล่านี้ได้ที่ Local feeds partnership API
คำขอ
ใช้รูปแบบ URL คำขอต่อไปนี้สำหรับ Local feeds partnership API
POST https://merchantapi.googleapis.com/lfp/v1/{PARENT}/lfpInventories:insert
ดูข้อมูลเพิ่มเติมได้ที่ Method: accounts.lfpInventories.insert.
ตัวอย่างการเปรียบเทียบ Content API for Shopping กับ Local feeds partnership API สำหรับคำขอแทรกสินค้าคงคลัง
| Content API | Merchant API | |
| URL |
POST https://shoppingcontent.googleapis.com/content/v2.1/{MERCHANT_ID}/pos/{TARGETMERCHANT_ID}/inventory
|
POST https://merchantapi.googleapis.com/lfp/v1/{PARENT}/lfpInventories:insert
|
| รหัสระบุ |
{MERCHANT_ID}/pos/{TARGETMERCHANT_ID}
|
{PARENT} |
ตัวอย่างการเปรียบเทียบ Content API for Shopping กับ Local feeds partnership API สำหรับคำขอแทรกยอดขาย
| Content API | Merchant API | |
| URL | POST https://shoppingcontent.googleapis.com/content/v2.1/{MERCHANT_ID}/pos/{TARGETMERCHANT_ID}/sale |
POST https://merchantapi.googleapis.com/lfp/v1/{PARENT}/lfpSales:insert |
| รหัสระบุ | {MERCHANT_ID}/pos/{TARGETMERCHANT_ID} |
{PARENT} |
ตัวอย่างการเปรียบเทียบ Content API for Shopping กับ Local feeds partnership API สำหรับคำขอแทรกร้านค้า
| Content API | Merchant API | |
| URL | POST https://shoppingcontent.googleapis.com/content/v2.1/{MERCHANT_ID}/pos/{TARGETMERCHANT_ID}/store |
POST https://merchantapi.googleapis.com/lfp/v1/{PARENT}/lfpStores:insert |
| รหัสระบุ | {MERCHANT_ID}/pos/{TARGETMERCHANT_ID} |
{PARENT} |
เมธอด
สิ่งที่เปลี่ยนแปลงสำหรับเมธอด Store API ใน Local feeds partnership API มีดังนี้
| เมธอด | URL ใน Content API for Shopping | URL ใน Merchant API | รหัสระบุใน Content API for Shopping | รหัสระบุใน Merchant API | คำอธิบาย |
insert |
POST https://shoppingcontent.googleapis.com/content/v2.1/{MERCHANT_ID}/pos/{TARGETMERCHANT_ID}/store |
POST https://merchantapi.googleapis.com/lfp/v1/{parent=accounts/*}/lfpStores:insert |
{MERCHANT_ID}/pos/{TARGETMERCHANT_ID} |
{PARENT} | parent อยู่ในรูปแบบ accounts/{IFP_PARTNER_ACCOUNT_ID} |
delete |
DELETE https://shoppingcontent.googleapis.com/content/v2.1/{MERCHANT_ID}/pos/{TARGETMERCHANT_ID}/store/{STORE_CODE} |
DELETE https://merchantapi.googleapis.com/lfp/v1/{name=accounts/*/lfpStores/*} |
{MERCHANT_ID}/pos/{TARGETMERCHANT_ID}/store/{STORE_CODE} |
{NAME} | name อยู่ในรูปแบบ accounts/{IFP_PARTNER_ACCOUNT_ID}/lfpStores/{TARGETMERCHANT_ID}~{STORE_CODE} |
get |
GET https://shoppingcontent.googleapis.com/content/v2.1/{MERCHANT_ID}/pos/{TARGETMERCHANT_ID}/store/{STORE_CODE} |
GET https://merchantapi.googleapis.com/lfp/v1/{name=accounts/*/lfpStores/*} |
{MERCHANT_ID}/pos/{TARGETMERCHANT_ID}/store/{STORE_CODE} |
{NAME} | name อยู่ในรูปแบบ accounts/{IFP_PARTNER_ACCOUNT_ID}/lfpStores/{TARGETMERCHANT_ID}~{STORE_CODE} |
list |
GET https://shoppingcontent.googleapis.com/content/v2.1/{MERCHANT_ID}/pos/{TARGETMERCHANT_ID}/store |
GET https://merchantapi.googleapis.com/lfp/v1/{parent=accounts/*}/lfpStores |
/{MERCHANT_ID}/pos/{TARGETMERCHANT_ID} |
{PARENT} | {PARENT} อยู่ในรูปแบบ accounts/{IFP_PARTNER_ACCOUNT_ID} |
สิ่งที่เปลี่ยนแปลงสำหรับเมธอด Inventory API ใน Local feeds partnership API มีดังนี้
| เมธอด | URL ใน Content API for Shopping | URL ใน Merchant API | รหัสระบุใน Content API for Shopping | รหัสระบุใน Merchant API | คำอธิบาย |
insert |
POST https://shoppingcontent.googleapis.com/content/v2.1/{MERCHANT_ID}/pos/{TARGETMERCHANT_ID}/store |
POST https://merchantapi.googleapis.com/lfp/v1/{PARENT}/lfpInventories:insert |
{MERCHANT_ID}/pos/{TARGETMERCHANT_ID} |
{PARENT} | parent อยู่ในรูปแบบ accounts/{IFP_PARTNER_ACCOUNT_ID} |
สิ่งที่เปลี่ยนแปลงสำหรับเมธอด Sales API ใน Local feeds partnership API มีดังนี้
| เมธอด | URL ใน Content API for Shopping | URL ใน Merchant API | รหัสระบุใน Content API for Shopping | รหัสระบุใน Merchant API | คำอธิบาย |
insert |
POST https://shoppingcontent.googleapis.com/content/v2.1/{MERCHANT_ID}/pos/{TARGETMERCHANT_ID}/store |
POST https://merchantapi.googleapis.com/lfp/v1/{PARENT}/lfpSales:insert |
{MERCHANT_ID}/pos/{TARGETMERCHANT_ID} |
{PARENT} | {PARENT} อยู่ในรูปแบบ accounts/{IFP_PARTNER_ACCOUNT_ID} |
แหล่งข้อมูล
สิ่งที่เปลี่ยนแปลงสำหรับแหล่งข้อมูล Store ใน Local feeds partnership API มีดังนี้ ฟิลด์ที่ไม่ได้ระบุไว้ที่นี่จะไม่มีการเปลี่ยนแปลง
| Content API for Shopping | Merchant API | คำอธิบาย |
| ไม่รองรับ | name: string |
เพิ่มฟิลด์ใหม่เพื่อแยกความแตกต่างของร้านค้าต่างๆ |
| ไม่รองรับ | targetAccount: integer |
บัญชี Merchant Center ที่จะแทรกสินค้าคงคลัง |
targetCountry: string |
regionCode: string |
เปลี่ยนชื่อ targetCountry เป็น regionCode |
websiteUrl: string |
websiteUri: string |
เปลี่ยนชื่อ websiteUrl เป็น websiteUri |
kind: string |
ไม่รองรับ | Local feeds partnership API ไม่รองรับ kind |
สิ่งที่เปลี่ยนแปลงสำหรับการแทรกสินค้าคงคลังมีดังนี้ ฟิลด์ที่ไม่ได้ระบุไว้ที่นี่จะไม่มีการเปลี่ยนแปลง
| Content API for Shopping | Merchant API | คำอธิบาย |
| ไม่รองรับ | name: string |
เพิ่มฟิลด์ใหม่เพื่อแยกความแตกต่างของสินค้าคงคลังต่างๆ |
| ไม่รองรับ | targetAccount: integer |
บัญชี Merchant Center ที่จะแทรกสินค้าคงคลัง |
targetCountry: string |
regionCode: string |
เปลี่ยนชื่อ targetCountry เป็น regionCode รหัสอาณาเขต CLDR สำหรับประเทศที่จำหน่ายผลิตภัณฑ์ |
itemId: string |
offerId: string |
เปลี่ยนชื่อ itemId เป็น offerId |
quantity: string |
quantity: string |
อัปเดต quantity ให้เป็นตัวเลือก |
| ไม่รองรับ | availability: string |
availability ต้องมี |
|
|
คำจำกัดความของราคาเปลี่ยนแปลงแล้ว ดูข้อมูลเพิ่มเติมได้ที่ ราคา |
timestamp: string |
collectionTime: string |
เปลี่ยนชื่อ timestamp เป็น collectionTime |
kind: string |
ไม่รองรับ | Local feeds partnership API ไม่รองรับ kind |
สิ่งที่เปลี่ยนแปลงสำหรับการแทรกยอดขายมีดังนี้ ฟิลด์ที่ไม่ได้ระบุไว้ที่นี่จะไม่มีการเปลี่ยนแปลง
| Content API for Shopping | Merchant API | คำอธิบาย |
| ไม่รองรับ | name: string |
เพิ่มฟิลด์ใหม่เพื่อแยกความแตกต่างของสินค้าคงคลังต่างๆ |
| ไม่รองรับ | targetAccount:integer |
บัญชี Merchant Center ที่จะแทรกยอดขาย |
targetCountry: string |
regionCode: string |
รหัสอาณาเขต CLDR สำหรับประเทศที่จำหน่ายผลิตภัณฑ์ |
itemId: string |
offerId: string |
เปลี่ยนชื่อ itemId เป็น offerId |
|
|
คำจำกัดความของราคาเปลี่ยนแปลงแล้ว ดูข้อมูลเพิ่มเติมได้ที่ ราคา |
timestamp: string |
saleTime: string |
เปลี่ยนชื่อ timestamp เป็น saleTime |
kind: string |
ไม่รองรับ | Local feeds partnership API ไม่รองรับ kind |