# REST Resource: accounts.locations.localPosts

- [Resource: LocalPost](https://developers.google.com/my-business/reference/rest/v4/accounts.locations.localPosts#LocalPost)
  - [JSON representation](https://developers.google.com/my-business/reference/rest/v4/accounts.locations.localPosts#LocalPost.SCHEMA_REPRESENTATION)
- [CallToAction](https://developers.google.com/my-business/reference/rest/v4/accounts.locations.localPosts#CallToAction)
  - [JSON representation](https://developers.google.com/my-business/reference/rest/v4/accounts.locations.localPosts#CallToAction.SCHEMA_REPRESENTATION)
- [ActionType](https://developers.google.com/my-business/reference/rest/v4/accounts.locations.localPosts#ActionType)
- [LocalPostEvent](https://developers.google.com/my-business/reference/rest/v4/accounts.locations.localPosts#LocalPostEvent)
  - [JSON representation](https://developers.google.com/my-business/reference/rest/v4/accounts.locations.localPosts#LocalPostEvent.SCHEMA_REPRESENTATION)
- [TimeInterval](https://developers.google.com/my-business/reference/rest/v4/accounts.locations.localPosts#TimeInterval)
  - [JSON representation](https://developers.google.com/my-business/reference/rest/v4/accounts.locations.localPosts#TimeInterval.SCHEMA_REPRESENTATION)
- [TimeOfDay](https://developers.google.com/my-business/reference/rest/v4/accounts.locations.localPosts#TimeOfDay)
  - [JSON representation](https://developers.google.com/my-business/reference/rest/v4/accounts.locations.localPosts#TimeOfDay.SCHEMA_REPRESENTATION)
- [LocalPostState](https://developers.google.com/my-business/reference/rest/v4/accounts.locations.localPosts#LocalPostState)
- [LocalPostTopicType](https://developers.google.com/my-business/reference/rest/v4/accounts.locations.localPosts#LocalPostTopicType)
- [AlertType](https://developers.google.com/my-business/reference/rest/v4/accounts.locations.localPosts#AlertType)
- [LocalPostOffer](https://developers.google.com/my-business/reference/rest/v4/accounts.locations.localPosts#LocalPostOffer)
  - [JSON representation](https://developers.google.com/my-business/reference/rest/v4/accounts.locations.localPosts#LocalPostOffer.SCHEMA_REPRESENTATION)
- [Methods](https://developers.google.com/my-business/reference/rest/v4/accounts.locations.localPosts#METHODS_SUMMARY)

## Resource: LocalPost

Represents a [local post](https://support.google.com/business/answer/7662907) for a location.

| JSON representation ||
|---|---|
| ``` { "name": string, "languageCode": string, "summary": string, "callToAction": { object (`https://developers.google.com/my-business/reference/rest/v4/accounts.locations.localPosts#CallToAction`) }, "createTime": string, "updateTime": string, "event": { object (`https://developers.google.com/my-business/reference/rest/v4/accounts.locations.localPosts#LocalPostEvent`) }, "state": enum (`https://developers.google.com/my-business/reference/rest/v4/accounts.locations.localPosts#LocalPostState`), "media": [ { object (`https://developers.google.com/my-business/reference/rest/v4/accounts.locations.media#MediaItem`) } ], "searchUrl": string, "topicType": enum (`https://developers.google.com/my-business/reference/rest/v4/accounts.locations.localPosts#LocalPostTopicType`), "alertType": enum (`https://developers.google.com/my-business/reference/rest/v4/accounts.locations.localPosts#AlertType`), "offer": { object (`https://developers.google.com/my-business/reference/rest/v4/accounts.locations.localPosts#LocalPostOffer`) } } ``` |

| Fields ||
|---|---|
| `name` | `string` Output only. Google identifier for this local post in the form: `accounts/{accountId}/locations/{locationId}/localPosts/{localPostId}` |
| `languageCode` | `string` The language of the local post. |
| `summary` | `string` Description/body of the local post. |
| `callToAction` | ``object (`https://developers.google.com/my-business/reference/rest/v4/accounts.locations.localPosts#CallToAction`)`` The URL that users are sent to when clicking through the promotion. Ignored for topic type `OFFER`. |
| `createTime` | ``string (`https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.Timestamp` format)`` Output only. Time of the creation of the post. A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: `"2014-10-02T15:01:23Z"` and `"2014-10-02T15:01:23.045123456Z"`. |
| `updateTime` | ``string (`https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.Timestamp` format)`` Output only. Time of the last modification of the post made by the user. A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: `"2014-10-02T15:01:23Z"` and `"2014-10-02T15:01:23.045123456Z"`. |
| `event` | ``object (`https://developers.google.com/my-business/reference/rest/v4/accounts.locations.localPosts#LocalPostEvent`)`` Event information. Required for topic types `EVENT` and `OFFER`. |
| `state` | ``enum (`https://developers.google.com/my-business/reference/rest/v4/accounts.locations.localPosts#LocalPostState`)`` Output only. The state of the post, indicating what part of its lifecycle it is in. |
| `media[]` | ``object (`https://developers.google.com/my-business/reference/rest/v4/accounts.locations.media#MediaItem`)`` The media associated with the post. sourceUrl is the only supported data field for a LocalPost MediaItem. |
| `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 (`https://developers.google.com/my-business/reference/rest/v4/accounts.locations.localPosts#LocalPostTopicType`)`` Required. The topic type of the post: standard, event, offer, or alert. |
| `alertType` | ``enum (`https://developers.google.com/my-business/reference/rest/v4/accounts.locations.localPosts#AlertType`)`` The type of alert the post is created for. This field is only applicable for posts of topicType Alert, and behaves as a sub-type of Alerts. |
| `offer` | ``object (`https://developers.google.com/my-business/reference/rest/v4/accounts.locations.localPosts#LocalPostOffer`)`` Additional data for offer posts. This should only be set when the topicType is OFFER. |

## CallToAction

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

| JSON representation ||
|---|---|
| ``` { "actionType": enum (`https://developers.google.com/my-business/reference/rest/v4/accounts.locations.localPosts#ActionType`), "url": string } ``` |

| Fields ||
|---|---|
| `actionType` | ``enum (`https://developers.google.com/my-business/reference/rest/v4/accounts.locations.localPosts#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. > [!WARNING] > This item is deprecated! |
| `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 (`https://developers.google.com/my-business/reference/rest/v4/accounts.locations.localPosts#TimeInterval`) } } ``` |

| Fields ||
|---|---|
| `title` | `string` Name of the event. |
| `schedule` | ``object (`https://developers.google.com/my-business/reference/rest/v4/accounts.locations.localPosts#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 (`https://developers.google.com/my-business/reference/rest/v4/Date`) }, "startTime": { object (`https://developers.google.com/my-business/reference/rest/v4/accounts.locations.localPosts#TimeOfDay`) }, "endDate": { object (`https://developers.google.com/my-business/reference/rest/v4/Date`) }, "endTime": { object (`https://developers.google.com/my-business/reference/rest/v4/accounts.locations.localPosts#TimeOfDay`) } } ``` |

| Fields ||
|---|---|
| `startDate` | ``object (`https://developers.google.com/my-business/reference/rest/v4/Date`)`` The start date of this period. |
| `startTime` | ``object (`https://developers.google.com/my-business/reference/rest/v4/accounts.locations.localPosts#TimeOfDay`)`` The start time of this period. |
| `endDate` | ``object (`https://developers.google.com/my-business/reference/rest/v4/Date`)`` The end date of this period. |
| `endTime` | ``object (`https://developers.google.com/my-business/reference/rest/v4/accounts.locations.localPosts#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 `https://developers.google.com/my-business/reference/rest/v4/Date` and `google.protobuf.Timestamp`.

| JSON representation ||
|---|---|
| ``` { "hours": integer, "minutes": integer, "seconds": integer, "nanos": integer } ``` |

| Fields ||
|---|---|
| `hours` | `integer` 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` | `integer` Minutes of hour of day. Must be from 0 to 59. |
| `seconds` | `integer` 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` | `integer` 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) |
| `ALERT` | High-priority, and timely announcements related to an ongoing event. These types of posts are not always available for authoring. |

## AlertType

The type of event for which the alert post was created.

| Enums ||
|---|---|
| `ALERT_TYPE_UNSPECIFIED` | No alert is specified. |
| `COVID_19` | Alerts related to the 2019 Coronavirus Disease pandemic. Covid posts only support a summary field and a call to action field. When these alerts are no longer relevant, new Alert post creation for type COVID-19 will be disabled. However, merchant will still be able to manage their existing COVID-19 posts. |

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

| ## Methods ||
|---|---|
| ### `https://developers.google.com/my-business/reference/rest/v4/accounts.locations.localPosts/create` | Creates a new local post associated with the specified location, and returns it. |
| ### `https://developers.google.com/my-business/reference/rest/v4/accounts.locations.localPosts/delete` | Deletes a local post. |
| ### `https://developers.google.com/my-business/reference/rest/v4/accounts.locations.localPosts/get` | Gets the specified local post. |
| ### `https://developers.google.com/my-business/reference/rest/v4/accounts.locations.localPosts/list` | Returns a list of local posts associated with a location. |
| ### `https://developers.google.com/my-business/reference/rest/v4/accounts.locations.localPosts/patch` | Updates the specified local post and returns the updated local post. |
| ### `https://developers.google.com/my-business/reference/rest/v4/accounts.locations.localPosts/reportInsights` | Returns insights for a set of local posts associated with a single listing. |