rocket
ขอแนะนำ
Merchant API
ซึ่งเป็นเวอร์ชันต่อไปอย่างเป็นทางการของ Content API for Shopping
update
รับข้อมูลล่าสุด
เกี่ยวกับฟีเจอร์ใหม่ การแก้ไขข้อบกพร่อง และการอัปเดตของ Merchant API
add_alert
หมายเหตุ: Content API for Shopping จะหยุดให้บริการในวันที่ 18 สิงหาคม 2026
รายการลิงก์
จัดทุกอย่างให้เป็นระเบียบอยู่เสมอด้วยคอลเล็กชัน
บันทึกและจัดหมวดหมู่เนื้อหาตามค่ากำหนดของคุณ
ทั้งพาร์ทเนอร์ Shopping และบัญชีผู้ขายแต่ละบัญชีสามารถมีลิงก์ที่ถูกแจ้งหลายลิงก์ระหว่างบัญชีของตนกับบัญชีอื่นๆ ได้
เมธอด listlinks
จะแสดงรายการลิงก์ทั้งหมดเหล่านี้สำหรับบัญชี Merchant Center
ที่ทำการเรียก API โดยไม่ต้องใช้พารามิเตอร์ใดๆ และเรียกใช้โดยใช้คำขอ HTTP GET
สถานะบริการ
เมื่อแสดงลิงก์ คำตอบจะแสดง status
สำหรับ service
แต่ละรายการภายในลิงก์ ผู้ขายมีตัวเลือกในการอนุมัติบริการทั้งหมดที่ระบุ
หรืออนุมัติเฉพาะบริการบางส่วนที่เสนอในคำขอ
บริการจะเริ่มต้นในสถานะ pending
จนกว่าจะได้รับอนุมัติจาก
ผู้ขายอย่างชัดเจน หลังจากได้รับอนุมัติแล้ว บริการจะมีactive
สถานะ
บริการที่ถูกนำออกจะมีสถานะเป็น inactive
หากมีบริการ pending
หรือ active
อื่นๆ อยู่ด้วย เมื่อนำบริการทั้งหมดที่ประกอบกันเป็นลิงก์ออกแล้ว
เมธอด listlinks
จะไม่แสดงลิงก์นั้นอีกต่อไป
ตัวอย่างคำขอ
หากต้องการแสดงคำขอลิงก์ที่พาร์ทเนอร์ 123456789
ส่งมา ให้ส่งGET
คำขอที่ไม่มีพารามิเตอร์โดยใช้เมธอด listlinks
GET https://shoppingcontent.googleapis.com/content/v2.1/123456789/accounts/123456789/listlinks
ตัวอย่างการตอบกลับ
ในตัวอย่างนี้ ผู้ขาย98765
ยังไม่ได้อนุมัติคำขอ ดังนั้นบริการแต่ละรายการจึงมีสถานะเป็น pending
{
"linkedAccountId": "98765",
"services": [
{
"service": "shoppingAdsProductManagement",
"status": "pending"
},
{
"service": "shoppingActionsOrderManagement",
"status": "pending"
}
]
}
ส่วนถัดไปจะอธิบายวิธีอนุมัติคำขอลิงก์
เนื้อหาของหน้าเว็บนี้ได้รับอนุญาตภายใต้ใบอนุญาตที่ต้องระบุที่มาของครีเอทีฟคอมมอนส์ 4.0 และตัวอย่างโค้ดได้รับอนุญาตภายใต้ใบอนุญาต Apache 2.0 เว้นแต่จะระบุไว้เป็นอย่างอื่น โปรดดูรายละเอียดที่นโยบายเว็บไซต์ Google Developers Java เป็นเครื่องหมายการค้าจดทะเบียนของ Oracle และ/หรือบริษัทในเครือ
อัปเดตล่าสุด 2025-08-13 UTC
[null,null,["อัปเดตล่าสุด 2025-08-13 UTC"],[[["\u003cp\u003eThe Merchant API is the new version of the Content API for Shopping and represents the future of the platform.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003elistlinks\u003c/code\u003e method allows retrieval of all flagged links between accounts, providing insight into account relationships.\u003c/p\u003e\n"],["\u003cp\u003eEach service within a link has a status, starting as \u003ccode\u003epending\u003c/code\u003e, transitioning to \u003ccode\u003eactive\u003c/code\u003e upon approval, and ultimately becoming \u003ccode\u003einactive\u003c/code\u003e when removed.\u003c/p\u003e\n"],["\u003cp\u003eA simple HTTP GET request to the \u003ccode\u003elistlinks\u003c/code\u003e endpoint is sufficient to retrieve link information without requiring any parameters.\u003c/p\u003e\n"]]],["The beta version of the Merchant API, the new Content API for Shopping, is introduced. The `listlinks` method retrieves all links between merchant accounts without parameters via a `GET` request. Each service within a link has a `status`: `pending` (awaiting merchant approval), `active` (approved), or `inactive` (removed, but other services remain). Once all services are removed, the link is no longer listed. A `GET` request example and the `listlinks` method's response format are provided.\n"],null,["# List links\n\nBoth Shopping partners and individual merchant accounts can have multiple\nflagged links between their accounts and others.\nThe [`listlinks`](/shopping-content/reference/rest/v2.1/accounts/listlinks) method\nreturns a list of all these links for the merchant center account\nmaking the API call. It does not require any parameters and is invoked using an\nHTTP `GET` request.\n\nService status\n--------------\n\nWhen listing links, responses will show a `status` for each individual `service`\nwithin a link. Merchants have the option to either approve all listed services\nor only a subset of those proposed in the request.\n\nServices start out in a `pending` status until explicitly [approved by a\nmerchant](/shopping-content/guides/flagging/approve). After they are approved, services have an `active` status.\n\nRemoved services will show a status of `inactive` if there are other `pending`\nor `active` services also present. Once all services comprising a link are\nremoved, the link will no longer be returned by the\n[`listlinks`](/shopping-content/reference/rest/v2.1/accounts/listlinks) method.\n\nExample request\n---------------\n\nTo list the link request sent by partner `123456789`, send a `GET`\nrequest with no parameters using the [`listlinks`](/shopping-content/reference/rest/v2.1/accounts/listlinks) method. \n\n GET https://shoppingcontent.googleapis.com/content/v2.1/123456789/accounts/123456789/listlinks\n\nExample response\n----------------\n\nIn this example, the merchant `98765` has yet to approve the request, so the\nindividual services have a `pending` status. \n\n {\n \"linkedAccountId\": \"98765\",\n \"services\": [\n {\n \"service\": \"shoppingAdsProductManagement\",\n \"status\": \"pending\"\n },\n {\n \"service\": \"shoppingActionsOrderManagement\",\n \"status\": \"pending\"\n }\n ]\n }\n\nThe [next section](/shopping-content/guides/flagging/approve) describes how to approve a linking request."]]