You can use the Merchant Promotions API to create and manage promotions on
Google. The
accounts.promotions
resource lets you showcase special offers for the products you sell on Google.
For more information, see Overview of Merchant Promotions
API.
Requests
To make requests, use the following URL.
POST https://merchantapi.googleapis.com/promotions/v1beta/{account_name}/promotions
Migrate from Content API for Shopping
The following compares the Content API for Shopping to the Merchant Promotions API for promotions-related requests.
URL
In the Content API for Shopping:
https://shoppingcontent.googleapis.com/content/v2.1/{merchantId}/promotions
in Merchant API becomes:
https://merchantapi.googleapis.com/promotions/v1beta/{parent=accounts/*}/promotions
Identifiers
In the Content API for Shopping:
{merchantId}/promotions/{promotionId}
in Merchant API becomes:
{name}
Methods
The Merchant API supports the following methods for promotions:
- Insert promotions
- Get promotions
- List promotions
Here's a comparison of promotion methods availability in the Content API for Shopping and the Merchant API:
Method | Content API for Shopping | Merchant API |
---|---|---|
insert | Yes | Yes |
get | Yes | Yes |
list | Yes | Yes |
customBatch | No | No |
delete | No | (To be determined) |
Resource Name
The table shows what changes for Promotions in the Merchant Promotions API.
To see an example for reference, see Local Inventory.
Content API for Shopping | Merchant API | Description |
---|---|---|
(not supported) | custom_attributes |
A list of custom (merchant-provided) attributes. You can
also use it to submit any attribute of the feed specification in its generic form. For example: { "name": "size type", "value": "regular" }This is useful for submitting attributes not explicitly exposed by the API. |
Not supported | data_source | Creating a promotion requires an existing data source. |
Not supported | attributes |
Promotion specific attributes, for example,
long_tile, promotion_effective_timeperiod, and others, are part of the attribute message. |
item_id | item_id_inclusion |
The list of item IDs that a promotion applies
to is renamed. |
store_id | store_id_inclusion |
The list of store IDs that a promotion applies
to is renamed. |
prduct_type | product_type_inclusion |
The list of product types that a promotion applies
to is renamed. |
item_group_id | item_group_id_inclusion |
The list of item group IDs that a promotion applies
to is renamed. |
brand | brand_inclusion |
The list of brands that a promotion applies
to is renamed. |
store_code | store_codes_inclusion |
The list of store codes that a promotion applies
to is renamed. |
price: { object (Price) } |
price: { object (Price) } |
The definition of Price has changed.
In the Content API for Shopping, Price
The Price amount is now recorded in micros,
The amount field name has changed from value to
The currency field name has changed to
|
order_limit | (not supported) | The order_limit attribute is not supported. |
shippingServiceNames[] | (not supported) | shippingServiceNames[] is not supported. |
money_budget | (not supported) | money_budget is not supported. |
promotion_destination_ids | promotion_destinations | promotionDestinationIds is renamed. |
Promotion Status
{ "destinationStatuses": [ { "destination": string, "status": enum (State) } ], "promotionIssue": [ { "code": string, "detail": string } ], "creationDate": string, "lastUpdateDate": string } |
Promotion Status has changed.
More granular-level details are available in the issues. promotionStatus = { destinationStatuses = [ { reportingContext = Enum status = Enum }, ], itemLevelIssues = [ { code = String severity = Enum resolution = String reportingContext = Enum description = String detail = String documentation = String applicableCountries = [ String, ] } ] } |