Page Summary
-
Use the Merchant Promotions API to create and manage promotions, showcasing special offers for products sold on Google.
-
Migrate promotion management from the Content API for Shopping to the Merchant Promotions API for enhanced features and functionalities.
-
Leverage the
accounts.promotionsresource to manage promotions, replacing previous Content API endpoints with new structured URLs. -
Refer to the comparison table to understand key changes in resource names and attributes when transitioning from the Content API.
-
The Merchant Promotions API currently supports insert, get, and list methods for promotions, with delete functionality to be determined.
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
.
Overview of changes from Content API for Shopping to Merchant API
A significant difference is that Content API for Shopping automatically
creates the data source upon the first promotion insertion, which doesn't
occur with Merchant API. To insert a promotion using Merchant API, you first
need to create a promotions data source
.
For information about the fields in the promotionDataSource
object in accounts.dataSources
resource, see PromotionDataSource
.
Requests
To make requests, use the following URL.
POST https://merchantapi.googleapis.com/promotions/v1/ {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/ {MERCHANT_ID}
/promotions
in Merchant API becomes:
https://merchantapi.googleapis.com/promotions/v1/ {parent=accounts/*}
/promotions
Identifiers
In the Content API for Shopping:
{MERCHANT_ID}
/promotions/ {PROMOTION_ID}
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:
https://shoppingcontent.googleapis.com/content/v2.1/ {MERCHANT_ID}
/promotions
https://merchantapi.googleapis.com/promotions/v1/ {parent=accounts/*}
/promotions
{MERCHANT_ID}
/promotions/ {PROMOTION_ID}
{NAME}
-
insert -
get -
list -
customBatch -
delete
-
insert -
get -
list -
delete
Field Changes
The table shows what changes for Promotions in the Merchant Promotions API.
To see an example for reference, see Local Inventory .
also use it to submit any attribute of the feed
specification in its generic form.
For example:
{
"name": "size type", "value": "regular"
}
exposed by the API.
long_tile, promotion_effective_timeperiod,
and others, are part of the attribute message.
to is renamed.
to is renamed.
to is renamed.
to is renamed.
to is renamed.
to is renamed.
price:
{
object (Price)
}
price:
{
object (Price)
}
In the Content API for Shopping, Price
was a decimal number in the form of a string.
The Priceamount is now recorded in micros,where 1 million micros is equivalent to your currency's
standard unit.
The amountfield name has changed from value to
amountMicros.
The currencyfield name has changed to
currencyCode. The format remains as
ISO 4217
. (Wikipedia)
{
"destinationStatuses": [
{
"destination": string,
"status": enum (State)
}
],
"promotionIssue": [
{
"code": string,
"detail": string
}
],
"creationDate": string,
"lastUpdateDate": string
}
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,
]
}
]
}

