REST Resource: locations.admins
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
资源:Admin
JSON 表示法 |
{
"name": string,
"admin": string,
"account": string,
"role": enum (AdminRole ),
"pendingInvitation": boolean
} |
字段 |
name |
string
不可变。资源名称。 对于账号管理员,其格式为:accounts/{account_id}/admins/{admin_id} 对于营业地点管理员,其格式为:locations/{locationId}/admins/{admin_id} 如果在管理员创建过程中设置了此字段,系统会忽略此字段。
|
admin |
string
可选。管理员的姓名。发出初始邀请时,这是邀请对象的电子邮件地址。调用 GET 时,如果邀请仍处于待处理状态,则返回用户的电子邮件地址。否则,它包含用户的名字和姓氏。 只有在创建管理员期间才需要设置此字段。
|
account |
string
不可变。此管理员所指的账号资源的名称。在调用 locations.admins.create 以邀请营业地点组作为管理员时使用。 如果在 CREATE 请求中同时设置了此字段和 admin ,则此字段的优先级更高,admin 中的电子邮件地址将被忽略。 格式:accounts/{account} 。
|
role |
enum (AdminRole )
必需。指定此管理员在指定账号或位置使用的角色。
|
pendingInvitation |
boolean
仅限输出。指明此管理员是否有对指定资源的待处理邀请。
|
方法 |
|
邀请指定用户担任指定营业地点的管理员。 |
|
移除担任指定营业地点管理员的指定管理员。 |
|
列出指定营业地点的所有管理员。 |
|
更新指定营业地点的管理员。 |
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-07-25。
[null,null,["最后更新时间 (UTC):2025-07-25。"],[[["\u003cp\u003eAn Admin is an administrator of an Account or a location, with an immutable resource name and a role specifying their access level.\u003c/p\u003e\n"],["\u003cp\u003eAdmins can be invited, removed, listed, and updated for specific locations using provided methods.\u003c/p\u003e\n"],["\u003cp\u003eAdmin creation requires the \u003ccode\u003erole\u003c/code\u003e field, while optional fields include the admin's name/email and associated account.\u003c/p\u003e\n"],["\u003cp\u003eA pending invitation status is indicated for each admin, along with whether it's for an Account or Location.\u003c/p\u003e\n"],["\u003cp\u003eAdmins for Accounts are in the form \u003ccode\u003eaccounts/{account_id}/admins/{admin_id}\u003c/code\u003e and for Locations are in the form \u003ccode\u003elocations/{locationId}/admins/{admin_id}\u003c/code\u003e.\u003c/p\u003e\n"]]],["Admins, representing administrators of an Account or location, are managed via various methods. Key actions include: `create`, which invites a user to be a location administrator; `delete`, which removes an admin; `list`, to view all location admins; and `patch`, to update admin details. An admin's JSON representation includes their name, role, account affiliation, and pending invitation status. Fields such as `name`, `admin`, `account`, `role`, and `pendingInvitation` are described with their type and usage.\n"],null,["# REST Resource: locations.admins\n\n- [Resource: Admin](#Admin)\n - [JSON representation](#Admin.SCHEMA_REPRESENTATION)\n- [Methods](#METHODS_SUMMARY)\n\nResource: Admin\n---------------\n\nAn administrator of an Account or a location.\n\n| JSON representation |\n|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ``` { \"name\": string, \"admin\": string, \"account\": string, \"role\": enum (/my-business/reference/accountmanagement/rest/v1/accounts.admins#Admin.AdminRole), \"pendingInvitation\": boolean } ``` |\n\n| Fields ||\n|---------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `name` | `string` Immutable. The resource name. For account admins, this is in the form: `accounts/{account_id}/admins/{admin_id}` For location admins, this is in the form: `locations/{locationId}/admins/{admin_id}` This field will be ignored if set during admin creation. |\n| `admin` | `string` Optional. The name of the admin. When making the initial invitation, this is the invitee's email address. On `GET` calls, the user's email address is returned if the invitation is still pending. Otherwise, it contains the user's first and last names. This field is only needed to be set during admin creation. |\n| `account` | `string` Immutable. The name of the Account resource that this Admin refers to. Used when calling locations.admins.create to invite a LocationGroup as an admin. If both this field and `admin` are set on `CREATE` requests, this field takes precedence and the email address in `admin` will be ignored. Format: `accounts/{account}`. |\n| `role` | `enum (`[AdminRole](/my-business/reference/accountmanagement/rest/v1/accounts.admins#Admin.AdminRole)`)` Required. Specifies the role that this admin uses with the specified Account or Location. |\n| `pendingInvitation` | `boolean` Output only. Indicates whether this admin has a pending invitation for the specified resource. |\n\n| Methods ------- ||\n|----------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------|\n| ### [create](/my-business/reference/accountmanagement/rest/v1/locations.admins/create) | Invites the specified user to become an administrator for the specified location. |\n| ### [delete](/my-business/reference/accountmanagement/rest/v1/locations.admins/delete) | Removes the specified admin as a manager of the specified location. |\n| ### [list](/my-business/reference/accountmanagement/rest/v1/locations.admins/list) | Lists all of the admins for the specified location. |\n| ### [patch](/my-business/reference/accountmanagement/rest/v1/locations.admins/patch) | Updates the Admin for the specified location. |"]]