在 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" }
如何邀請 LocationGroup 擔任某地點的管理員
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}