The Business Profile Performance API is now launched! Migration work is required.
Review the deprecation schedule and instructions to migrate over to new v1 APIs from older deprecated v4 API.

Package google.mybusiness.notifications.v1

Stay organized with collections Save and categorize content based on your preferences.

Index

NotificationSettings

This service allows users to manage notification settings for their business accounts.

GetNotificationSetting

rpc GetNotificationSetting(GetNotificationSettingRequest) returns (NotificationSetting)

Returns the pubsub notification settings for the account.

Authorization Scopes

Requires the following OAuth scope:

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

For more information, see the OAuth 2.0 Overview.

UpdateNotificationSetting

rpc UpdateNotificationSetting(UpdateNotificationSettingRequest) returns (NotificationSetting)

Sets the pubsub notification setting for the account informing Google which topic to send pubsub notifications for. Use the notification_types field within notification_setting to manipulate the events an account wants to subscribe to.

An account will only have one notification setting resource, and only one pubsub topic can be set. To delete the setting, update with an empty notification_types

Authorization Scopes

Requires the following OAuth scope:

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

For more information, see the OAuth 2.0 Overview.

ErrorCode

All errors codes returned by the API.

Enums
ERROR_CODE_UNSPECIFIED Missing error code.
SHARES_PUBSUB_TOPIC_MESSAGE_ACROSS_VERSIONS The pub/sub topic name provided in the 'updateNotificationSetting' rpc is being used by other versions of this API. Please supply a new topic name to mitigate this issue.
PUBLISH_PERMISSIONS_MISSING_FOR_PUBSUB_TOPIC The pub/sub topic name supplied for update notification setting doesn't have publish permissions for the user.
INVALID_PUBSUB_TOPIC The pub/sub topic name supplied for update notification setting is invalid.

GetNotificationSettingRequest

Request message for NotificationSettings.GetNotificationSettings.

Fields
name

string

Required. The resource name of the notification setting we are trying to fetch.

NotificationSetting

A Google Pub/Sub topic where notifications can be published when a location is updated or has a new review. There will be only one notification setting resource per-account.

Fields
name

string

Required. The resource name this setting is for. This is of the form accounts/{account_id}/notificationSetting.

pubsub_topic

string

Optional. The Google Pub/Sub topic that will receive notifications when locations managed by this account are updated. If unset, no notifications will be posted.

The account mybusiness-api-pubsub@system.gserviceaccount.com must have at least Publish permissions on the Pub/Sub topic.

notification_types[]

NotificationType

The types of notifications that will be sent to the Pub/Sub topic. To stop receiving notifications entirely, use NotificationSettings.UpdateNotificationSetting with an empty notification_types or set the pubsub_topic to an empty string.

NotificationType

Type of notification sent to the Pub/Sub topic.

Enums
NOTIFICATION_TYPE_UNSPECIFIED No notification type. Will not match any notifications.
GOOGLE_UPDATE The location has Google updates for review. The location_name field on the notification will provide the resource name of the location with Google updates.
NEW_REVIEW A new review has been added to the location. The review_name field on the notification will provide the resource name of the review that was added, and location_name will have the location's resource name.
UPDATED_REVIEW A review on the location has been updated. The review_name field on the notification will provide the resource name of the review that was added, and location_name will have the location's resource name.
NEW_CUSTOMER_MEDIA A new media item has been added to the location by a Google Maps user. The notification will provide the resource name of the new media item.
NEW_QUESTION A new question is added to the location. The notification will provide the resource name of question.
UPDATED_QUESTION A question of the location is updated. The notification will provide the resource name of question.
NEW_ANSWER A new answer is added to the location. The notification will provide the resource name of question and answer.
UPDATED_ANSWER An answer of the location is updated. The notification will provide the resource name of question and answer.
DUPLICATE_LOCATION Indicates whether there is a change in location metadata's duplicate location field.
LOSS_OF_VOICE_OF_MERCHANT

Deprecated: Migrate the existing usages of this value to the more expanded "VOICE_OF_MERCHANT_UPDATED".

VOICE_OF_MERCHANT_UPDATED Indicates whether the location has an update in voice of merchant status. Call GetVoiceOfMerchantState rpc for more details

UpdateNotificationSettingRequest

Request message for NotificationSettings.UpdateNotificationSettings.

Fields
notification_setting

NotificationSetting

Required. The updated notification settings.

update_mask

FieldMask

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