Package google.mybusiness.accountmanagement.v1

Index

AccessControl

This service allows management of the users that have access to accounts and locations.

AcceptInvitation

rpc AcceptInvitation(AcceptInvitationRequest) returns (Empty)

Accepts the specified invitation.

Authorization scopes

Requires the following OAuth scope:

  • https://www.googleapis.com/auth/business.manage

For more information, see the OAuth 2.0 Overview.

CreateAccountAdmin

rpc CreateAccountAdmin(CreateAccountAdminRequest) returns (Admin)

Invites the specified user to become an administrator for the specified account. The invitee must accept the invitation in order to be granted access to the account. See [AcceptInvitation] [google.mybusiness.accountmanagement.v1.AcceptInvitation] to programmatically accept an invitation.

Authorization scopes

Requires the following OAuth scope:

  • https://www.googleapis.com/auth/business.manage

For more information, see the OAuth 2.0 Overview.

CreateLocationAdmin

rpc CreateLocationAdmin(CreateLocationAdminRequest) returns (Admin)

Invites the specified user to become an administrator for the specified location. The invitee must accept the invitation in order to be granted access to the location. See [AcceptInvitation] [google.mybusiness.accountmangement.v1.AcceptInvitation] to programmatically accept an invitation.

Authorization scopes

Requires the following OAuth scope:

  • https://www.googleapis.com/auth/business.manage

For more information, see the OAuth 2.0 Overview.

DeclineInvitation

rpc DeclineInvitation(DeclineInvitationRequest) returns (Empty)

Declines the specified invitation.

Authorization scopes

Requires the following OAuth scope:

  • https://www.googleapis.com/auth/business.manage

For more information, see the OAuth 2.0 Overview.

DeleteAccountAdmin

rpc DeleteAccountAdmin(DeleteAccountAdminRequest) returns (Empty)

Removes the specified admin from the specified account.

Authorization scopes

Requires the following OAuth scope:

  • https://www.googleapis.com/auth/business.manage

For more information, see the OAuth 2.0 Overview.

DeleteLocationAdmin

rpc DeleteLocationAdmin(DeleteLocationAdminRequest) returns (Empty)

Removes the specified admin as a manager of the specified location.

Authorization scopes

Requires the following OAuth scope:

  • https://www.googleapis.com/auth/business.manage

For more information, see the OAuth 2.0 Overview.

ListAccountAdmins

rpc ListAccountAdmins(ListAccountAdminsRequest) returns (ListAccountAdminsResponse)

Lists the admins for the specified account.

Authorization scopes

Requires the following OAuth scope:

  • https://www.googleapis.com/auth/business.manage

For more information, see the OAuth 2.0 Overview.

ListInvitations

rpc ListInvitations(ListInvitationsRequest) returns (ListInvitationsResponse)

Lists pending invitations for the specified account.

Authorization scopes

Requires the following OAuth scope:

  • https://www.googleapis.com/auth/business.manage

For more information, see the OAuth 2.0 Overview.

ListLocationAdmins

rpc ListLocationAdmins(ListLocationAdminsRequest) returns (ListLocationAdminsResponse)

Lists all of the admins for the specified location.

Authorization scopes

Requires the following OAuth scope:

  • https://www.googleapis.com/auth/business.manage

For more information, see the OAuth 2.0 Overview.

TransferLocation

rpc TransferLocation(TransferLocationRequest) returns (Empty)

Moves a location from an account that the user owns to another account that the same user administers. The user must be an owner of the account the location is currently associated with and must also be at least a manager of the destination account.

Authorization scopes

Requires the following OAuth scope:

  • https://www.googleapis.com/auth/business.manage

For more information, see the OAuth 2.0 Overview.

UpdateAccountAdmin

rpc UpdateAccountAdmin(UpdateAccountAdminRequest) returns (Admin)

Updates the Admin for the specified Account Admin.

Authorization scopes

Requires the following OAuth scope:

  • https://www.googleapis.com/auth/business.manage

For more information, see the OAuth 2.0 Overview.

UpdateLocationAdmin

rpc UpdateLocationAdmin(UpdateLocationAdminRequest) returns (Admin)

Updates the Admin for the specified location. Only the AdminRole of the Admin can be updated.

Authorization scopes

Requires the following OAuth scope:

  • https://www.googleapis.com/auth/business.manage

For more information, see the OAuth 2.0 Overview.

Accounts

This API allows management of business accounts on Google. It defines the following resource model:

  • The API has a collection of Account resources, named accounts/*.

  • As a convenience, you may use the synonym "me" instead of the account id for the personal account of the authenticated caller. Examples: GET /v1/accounts/me GET /v1/accounts/me/locations

CreateAccount

rpc CreateAccount(CreateAccountRequest) returns (Account)

Creates an account with the specified name and type under the given parent.

  • Personal accounts and Organizations cannot be created.
  • User Groups cannot be created with a Personal account as primary owner.
  • Location Groups cannot be created with a primary owner of a Personal account if the Personal account is in an Organization.
  • Location Groups cannot own Location Groups.
Authorization scopes

Requires the following OAuth scope:

  • https://www.googleapis.com/auth/business.manage

For more information, see the OAuth 2.0 Overview.

GetAccount

rpc GetAccount(GetAccountRequest) returns (Account)

Gets the specified account. Returns NOT_FOUND if the account does not exist or if the caller does not have access rights to it.

Authorization scopes

Requires the following OAuth scope:

  • https://www.googleapis.com/auth/business.manage

For more information, see the OAuth 2.0 Overview.

ListAccounts

rpc ListAccounts(ListAccountsRequest) returns (ListAccountsResponse)

Lists all of the accounts for the authenticated user. This includes all accounts that the user owns, as well as any accounts for which the user has management rights.

Authorization scopes

Requires the following OAuth scope:

  • https://www.googleapis.com/auth/business.manage

For more information, see the OAuth 2.0 Overview.

UpdateAccount

rpc UpdateAccount(UpdateAccountRequest) returns (Account)

Updates the specified business account. Personal accounts cannot be updated using this method.

Authorization scopes

Requires the following OAuth scope:

  • https://www.googleapis.com/auth/business.manage

For more information, see the OAuth 2.0 Overview.

AcceptInvitationRequest

Request message for AccessControl.AcceptInvitation.

Fields
name

string

Required. The name of the invitation that is being accepted. accounts/{account_id}/invitations/{invitation_id}

Account

An account is a container for your location. If you are the only user who manages locations for your business, you can use your personal Google Account. To share management of locations with multiple users, create a business account.

Fields
name

string

Immutable. The resource name, in the format accounts/{account_id}.

account_name

string

Required. The name of the account. For an account of type PERSONAL, this is the first and last name of the user account.

primary_owner

string

Required. Input only. The resource name of the account which will be the primary owner of the account being created. It should be of the form accounts/{account_id}.

type

AccountType

Required. Contains the type of account. Accounts of type PERSONAL and ORGANIZATION cannot be created using this API.

role

AccountRole

Output only. Specifies the AccountRole of this account.

verification_state

VerificationState

Output only. If verified, future locations that are created are automatically connected to Google Maps, and have Google+ pages created, without requiring moderation.

vetted_state

VettedState

Output only. Indicates whether the account is vetted by Google. A vetted account is able to verify locations via the VETTED_PARTNER method.

account_number

string

Output only. Account reference number if provisioned.

permission_level

PermissionLevel

Output only. Specifies the permission level the user has for this account.

organization_info

OrganizationInfo

Output only. Additional info for an organization. This is populated only for an organization account.

AccountRole

Indicates the access level that the authenticated user has for this account. For more information, see the help center article

Enums
ACCOUNT_ROLE_UNSPECIFIED Not specified.
PRIMARY_OWNER The user is the primary owner this account.
OWNER The user owner of the account.
MANAGER The user can manage this account.
SITE_MANAGER The user can manage a limited set of features for the account.

AccountType

Indicates what kind of account this is: either a personal/user account or a business account.

Enums
ACCOUNT_TYPE_UNSPECIFIED Not specified.
PERSONAL An end-user account.
LOCATION_GROUP A group of Locations. For more information, see the help center article
USER_GROUP A User Group for segregating organization staff in groups. For more information, see the help center article
ORGANIZATION An organization representing a company. For more information, see the help center article

OrganizationInfo

Additional information stored for an organization.

Fields
registered_domain

string

Output only. The registered domain for the account.

address

PostalAddress

Output only. The postal address for the account.

phone_number

string

Output only. The contact number for the organization.

PermissionLevel

Indicates the access level that the authenticated user has for this account.

Enums
PERMISSION_LEVEL_UNSPECIFIED Not specified.
OWNER_LEVEL The user has owner level permission.
MEMBER_LEVEL The user has member level permission.

VerificationState

Indicates the verification state of the account.

Enums
VERIFICATION_STATE_UNSPECIFIED Not specified.
VERIFIED Verified account.
UNVERIFIED Account that is not verified, and verification has not been requested.
VERIFICATION_REQUESTED Account that is not verified, but verification has been requested.

VettedState

Indicates the vetted state of an account.

Enums
VETTED_STATE_UNSPECIFIED Not Specified
NOT_VETTED The account is not vetted by Google.
VETTED The account is vetted by Google and in a valid state. An account is automatically vetted if it has direct access to a vetted group account.
INVALID The account is vetted but in an invalid state. The account will behave like an unvetted account.

Admin

An administrator of an Account or a location.

Fields
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/{location_id}/admins/{admin_id}

This field will be ignored if set during admin creation.

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.

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}.

role

AdminRole

Required. Specifies the role that this admin uses with the specified Account or Location.

pending_invitation

bool

Output only. Indicates whether this admin has a pending invitation for the specified resource.

AdminRole

Indicates the access level that an admin has. For more information, see the help center article

Enums
ADMIN_ROLE_UNSPECIFIED Not specified.
PRIMARY_OWNER The admin has owner-level access and is the primary owner. (Displays as 'Primary Owner' in UI).
OWNER The admin has owner-level access. (Displays as 'Owner' in UI).
MANAGER The admin has managerial access.
SITE_MANAGER The admin can manage social (Google+) pages. (Displays as 'Site Manager' in UI). This API doesn't allow creating an account admin with a SITE_MANAGER role.

CreateAccountAdminRequest

Request message for AccessControl.CreateAccountAdmin.

Fields
parent

string

Required. The resource name of the account this admin is created for. accounts/{account_id}.

admin

Admin

Required. The admin to created. The role cannot be SITE_MANAGER

CreateAccountRequest

Request message for Accounts.CreateAccount.

Fields
account

Account

Required. Account information for the account that is to be created. The only allowed fields are account and type.

CreateLocationAdminRequest

Request message for AccessControl.CreateLocationAdmin.

Fields
parent

string

Required. The resource name of the location this admin is created for. locations/{location_id}/admins.

admin

Admin

Required. The admin to create.

DeclineInvitationRequest

Request message for AccessControl.DeclineInvitation.

Fields
name

string

Required. The name of the account invitation that is being declined. accounts/{account_id}/invitations/{invitation_id}

DeleteAccountAdminRequest

Request message for AccessControl.DeleteAccountAdmin.

Fields
name

string

Required. The resource name of the admin to remove from the account. accounts/{account_id}/admins/{admin_id}.

DeleteLocationAdminRequest

Request message for AccessControl.DeleteLocationAdmin.

Fields
name

string

Required. The resource name of the admin to remove from the location.

GetAccountRequest

Request message for Accounts.GetAccount.

Fields
name

string

Required. The name of the account to fetch.

Invitation

Represents a pending invitation.

Fields
name

string

Required. The resource name for the invitation. accounts/{account_id}/invitations/{invitation_id}.

role

AdminRole

Output only. The invited role on the account.

target_type

TargetType

Output only. Specifies which target types should appear in the response.

Union field target. Indicates the target this invitation is for. target can be only one of the following:
target_account

Account

The sparsely populated account this invitation is for.

target_location

TargetLocation

The target location this invitation is for.

TargetLocation

Represents a target location for a pending invitation.

Fields
location_name

string

The name of the location to which the user is invited.

address

string

The address of the location to which the user is invited.

TargetType

The type of target an invitation is for.

Enums
TARGET_TYPE_UNSPECIFIED Set when target type is unspecified.
ACCOUNTS_ONLY List invitations only for targets of type Account.
LOCATIONS_ONLY List invitations only for targets of type Location.

ListAccountAdminsRequest

Request message for AccessControl.ListAccountAdmins.

Fields
parent

string

Required. The name of the account from which to retrieve a list of admins. accounts/{account_id}/admins.

ListAccountAdminsResponse

Response message for AccessControl.ListAccountAdmins.

Fields
account_admins[]

Admin

A collection of Admin instances.

ListAccountsRequest

Request message for Accounts.ListAccounts.

Fields
parent_account

string

Optional. The resource name of the account for which the list of directly accessible accounts is to be retrieved. This only makes sense for Organizations and User Groups. If empty, will return ListAccounts for the authenticated user. accounts/{account_id}.

page_size

int32

Optional. How many accounts to fetch per page. The default and maximum is 20.

page_token

string

Optional. If specified, the next page of accounts is retrieved. The pageToken is returned when a call to accounts.list returns more results than can fit into the requested page size.

filter

string

Optional. A filter constraining the accounts to return. The response includes only entries that match the filter. If filter is empty, then no constraints are applied and all accounts (paginated) are retrieved for the requested account.

For example, a request with the filter type=USER_GROUP will only return user groups.

The type field is the only supported filter.

ListAccountsResponse

Response message for Accounts.ListAccounts.

Fields
accounts[]

Account

A collection of accounts to which the user has access. The personal account of the user doing the query will always be the first item of the result, unless it is filtered out.

next_page_token

string

If the number of accounts exceeds the requested page size, this field is populated with a token to fetch the next page of accounts on a subsequent call to accounts.list. If there are no more accounts, this field is not present in the response.

ListInvitationsRequest

Request message for AccessControl.ListInvitations.

Fields
parent

string

Required. The name of the account from which the list of invitations is being retrieved. accounts/{account_id}/invitations

filter

string

Optional. Filtering the response is supported via the Invitation.target_type field.

ListInvitationsResponse

Response message for AccessControl.ListInvitations.

Fields
invitations[]

Invitation

A collection of invitations that are pending for the account. The number of invitations listed here cannot exceed 1000.

ListLocationAdminsRequest

Request message for AccessControl.ListLocationAdmins.

Fields
parent

string

Required. The name of the location to list admins of. locations/{location_id}/admins.

ListLocationAdminsResponse

Response message for AccessControl.ListLocationAdmins.

Fields
admins[]

Admin

A collection of Admins.

TransferLocationRequest

Request message for AccessControl.TransferLocation.

Fields
name

string

Required. The name of the location to transfer. locations/{location_id}.

destination_account

string

Required. Name of the account resource to transfer the location to (for example, "accounts/{account}").

UpdateAccountAdminRequest

Request message for AccessControl.UpdateAccountAdmin.

Fields
account_admin

Admin

Required. The updated version of the Admin.

update_mask

FieldMask

Required. The specific fields that should be updated. The only editable field is role.

UpdateAccountRequest

Request message for Accounts.UpdateAccount.

Fields
account

Account

Required. The updated Account.

update_mask

FieldMask

Required. The specific fields that should be updated. The only editable field is accountName.

validate_only

bool

Optional. If true, the request is validated without actually updating the account.

UpdateLocationAdminRequest

Request message for AccessControl.UpdateLocationAdmin.

Fields
location_admin

Admin

Required. The updated version of the Admin.

update_mask

FieldMask

Required. The specific fields that should be updated. The only editable field is role.