在 My Business Account Management API 中,企業帳戶和地點的管理員稱為管理員。如要進一步瞭解系統管理員如何管理帳戶和地點,請參閱「商家檔案帳戶和地點群組」和「管理商家檔案詳細資料」。
帳戶和地點的管理員會以以下集合表示:
管理員的資源路徑如下:
accounts/{accountId}/admins/{adminId} locations/{locationId}/admins/{adminId}
列出帳戶或地點的管理員
列出指定帳戶或地點的管理員。
如何列出帳戶的管理員
GET https://mybusiness.googleapis.com/v1/accounts/{accountId}/admins
如何列出某個地點的管理員
GET https://mybusinessaccountmanagement.googleapis.com/v1/locations/{locationId}/admins
為帳戶或地點新增管理員
邀請使用者成為帳戶或地點的管理員。您必須將受邀者的電子郵件地址與 Google 帳戶建立關聯。邀請對象使用 Google 帳戶登入商家檔案時,系統會提示他們同意條款及細則,才能進行變更。
如何邀請使用者成為帳戶管理員
POST https://mybusinessaccountmanagement.googleapis.com/v1/accounts/{accountId}/admins
邀請使用者擔任某個地點的管理員
POST https://mybusinessaccountmanagement.googleapis.com/v1/locations/{locationId}/admins { "role": "MANAGER", "adminName": "example@example.com" }
如要邀請營業地點群組擔任某個營業地點的管理員,請按照下列步驟操作:
POST https://mybusinessaccountmanagement.googleapis.com/v1/locations/{locationId}/admins { "account": "LocationGroupID", "role": "MANAGER" }
從帳戶或地點中移除管理員
從指定帳戶或地點中移除管理員。
如何從帳戶中移除管理員
DELETE https://mybusinessaccountmanagement.googleapis.com/v1/accounts/{accountId}/admins/{adminId}
如何從地點中移除管理員
DELETE https://mybusinessaccountmanagement.googleapis.com/v1/accounts/locations/{locationId}/admins/{adminId}