REST Resource: accounts.locations.localPosts

Resource: LocalPost

Represents a local post for a location.

JSON representation
{
  "name": string,
  "languageCode": string,
  "summary": string,
  "callToAction": {
    object(CallToAction)
  },
  "createTime": string,
  "updateTime": string,
  "event": {
    object(LocalPostEvent)
  },
  "state": enum(LocalPostState),
  "media": [
    {
      object(MediaItem)
    }
  ],
  "searchUrl": string,
  "topicType": enum(LocalPostTopicType),

  // Union field topic_type_specific_fields can be only one of the following:
  "offer": {
    object(LocalPostOffer)
  },
  "product": {
    object(LocalPostProduct)
  }
  // End of list of possible types for union field topic_type_specific_fields.
}
Fields
name

string

Output only. Google identifier for this local post in the form: accounts/{account_id}/locations/{location_id}/localPosts/{local_post_id}

languageCode

string

The language of the local post.

summary

string

Description/body of the local post.

callToAction

object(CallToAction)

The URL that users are sent to when clicking through the promotion. Ignored for topic type OFFER.

createTime

string (Timestamp format)

Output only. Time of the creation of the post.

A timestamp in RFC3339 UTC "Zulu" format, accurate to nanoseconds. Example: "2014-10-02T15:01:23.045123456Z".

updateTime

string (Timestamp format)

Output only. Time of the last modification of the post made by the user.

A timestamp in RFC3339 UTC "Zulu" format, accurate to nanoseconds. Example: "2014-10-02T15:01:23.045123456Z".

event

object(LocalPostEvent)

Event information. Required for topic types EVENT and OFFER.

state

enum(LocalPostState)

Output only. The state of the post, indicating what part of its lifecycle it is in.

media[]

object(MediaItem)

The media associated with the post.

searchUrl

string

Output only. The link to the local post in Google search. This link can be used to share the post via social media, email, text, etc.

topicType

enum(LocalPostTopicType)

Required. The topic type of the post: standard, event, offer, or product.

Union field topic_type_specific_fields. Specific fields for a topic type. topic_type_specific_fields can be only one of the following:
offer

object(LocalPostOffer)

Additional data for offer posts. This should only be set when the topicType is OFFER.

product

object(LocalPostProduct)

Additional data for product posts. This should only be set when the topicType is PRODUCT.

CallToAction

An action that is performed when the user clicks through the post

JSON representation
{
  "actionType": enum(ActionType),
  "url": string
}
Fields
actionType

enum(ActionType)

The type of action that will be performed.

url

string

The URL the user will be directed to upon clicking. This field should be left unset for Call CTA.

ActionType

The type of action that will be performed.

Enums
ACTION_TYPE_UNSPECIFIED Type unspecified.
BOOK This post wants a user to book an appointment/table/etc.
ORDER This post wants a user to order something.
SHOP This post wants a user to browse a product catalog.
LEARN_MORE This post wants a user to learn more (at their website).
SIGN_UP This post wants a user to register/sign up/join something.
GET_OFFER Deprecated. Use OFFER in LocalPostTopicType to create a post with offer content.
CALL This post wants a user to call the business.

LocalPostEvent

All the information pertaining to an event featured in a local post.

JSON representation
{
  "title": string,
  "schedule": {
    object(TimeInterval)
  }
}
Fields
title

string

Name of the event.

schedule

object(TimeInterval)

Event start and end date/time.

TimeInterval

An interval of time, inclusive. It must contain all fields to be valid.

JSON representation
{
  "startDate": {
    object(Date)
  },
  "startTime": {
    object(TimeOfDay)
  },
  "endDate": {
    object(Date)
  },
  "endTime": {
    object(TimeOfDay)
  }
}
Fields
startDate

object(Date)

The start date of this period.

startTime

object(TimeOfDay)

The start time of this period.

endDate

object(Date)

The end date of this period.

endTime

object(TimeOfDay)

The end time of this period.

TimeOfDay

Represents a time of day. The date and time zone are either not significant or are specified elsewhere. An API may choose to allow leap seconds. Related types are google.type.Date and google.protobuf.Timestamp.

JSON representation
{
  "hours": number,
  "minutes": number,
  "seconds": number,
  "nanos": number
}
Fields
hours

number

Hours of day in 24 hour format. Should be from 0 to 23. An API may choose to allow the value "24:00:00" for scenarios like business closing time.

minutes

number

Minutes of hour of day. Must be from 0 to 59.

seconds

number

Seconds of minutes of the time. Must normally be from 0 to 59. An API may allow the value 60 if it allows leap-seconds.

nanos

number

Fractions of seconds in nanoseconds. Must be from 0 to 999,999,999.

LocalPostState

Indicates what state the post is in

Enums
LOCAL_POST_STATE_UNSPECIFIED State not specified.
REJECTED This post was rejected due to content policy violation.
LIVE This post is published and is currently appearing in search results.
PROCESSING This post is being processed and is not appearing in search results.

LocalPostTopicType

The topic type of the local post, which is used to select different templates to create and render a post.

Enums
LOCAL_POST_TOPIC_TYPE_UNSPECIFIED No post type is specified.
STANDARD Post contains basic information, like summary and images.
EVENT Post contains basic information and an event.
OFFER Post contains basic information, an event and offer related content (e.g. coupon code)
PRODUCT Post contains basic information and product related content (e.g. name, price).

LocalPostOffer

Specific fields for offer posts.

JSON representation
{
  "couponCode": string,
  "redeemOnlineUrl": string,
  "termsConditions": string
}
Fields
couponCode

string

Optional. Offer code that is usable in store or online.

redeemOnlineUrl

string

Optional. Online link to redeem offer.

termsConditions

string

Optional. Offer terms and conditions.

LocalPostProduct

Specific fields for product posts.

JSON representation
{
  "productName": string,
  "lowerPrice": {
    object(Money)
  },
  "upperPrice": {
    object(Money)
  }
}
Fields
productName

string

Name of the product.

lowerPrice

object(Money)

Lower price of the product if the product has a price range, or the price for the product.

upperPrice

object(Money)

Upper price of the product. In case price is not a range, lowerPrice is equal to upperPrice.

Methods

create

Creates a new local post associated with the specified location, and returns it.

delete

Deletes a local post.

get

Gets the specified local post.

list

Returns a list of local posts associated with a location.

patch

Updates the specified local post and returns the updated local post.

reportInsights

Returns insights for a set of local posts associated with a single listing.

Send feedback about...

Google My Business API
Google My Business API
Need help? Visit our support page.