Google Shopping Component
The Google Content API for Shopping can be used to manage and automate Google Merchant Center account management.
Component key: google-content-shopping
Description
The Google Content API for Shopping can be used to manage and automate Google Merchant Center account management. Use the Google Content API to Upload Products, Manage Inventory, and Manage Orders and Returns.
Connections
OAuth2
All requests to the Google Content API for Shopping must be authorized by an authenticated user.
The details of the authorization process, or "flow," for OAuth 2.0 vary somewhat depending on what kind of application you're writing. The following general process applies to all application types:
- When you create your application, you register it using the Google API Console. Google then provides information you'll need later, such as a client ID and a client secret.
- From APIs & Services > Library, activate the Google Content API for Shopping
- To create API Credentials navigate to Enabled APIs & Services and select Content API for Shopping
- Select Create Credentials
- Ensure Content API for Shopping is set for Select an API*
- Choose User Data and select Next
- Fill out the OAuth consent screen with an app name (your company or product's name), support email, app logo, domain, etc.
- Select Add Or Remove scopes, search Content API for Shopping, and check the boxes for the following scopes
- For OAuth Client ID, under Application type select Web application.Under Authorized redirect URIs enter Prismatic's OAuth 2.0 callback URL:
https://oauth2.prismatic.io/callback
Click CREATE.- Take note of the Client ID and Client Secret that are generated, as you will enter them into Prismatic for Authentication.
- Client Id and Secret can also be obtained in the Credentials Page under the OAuth 2.0 Client IDs section by selecting the name of the OAuth client created.
Input | Default | Notes |
---|---|---|
Authorize URL string / Required Hidden Field authorizeUrl | https://accounts.google.com/o/oauth2/v2/auth?access_type=offline&prompt=consent | The Authorization URL for Google Content. |
Client ID string / Required clientId | The Google Content app's Client Identifier. | |
Client Secret password / Required clientSecret | The Google Content app's Client Secret. | |
Scopes string / Required scopes | https://www.googleapis.com/auth/content | Space delimited listing of scopes. https://developers.google.com/identity/protocols/oauth2/scopes#content |
Token URL string / Required Hidden Field tokenUrl | https://oauth2.googleapis.com/token | The Token URL for Google Content. |
Triggers
PubSub Notification
PubSub Notification Trigger Settings | key: myTrigger
The Push Notifications service lets you to receive notifications that an order has been created. This is called "push" since Google will push notifications to you about events, such as orders, that happen on the Google side.
-
The Content API's
pubsubnotificationsettings.update
receives the request and sends you back acloudTopicName
. -
To configure additional Topics
- In the Google Cloud console, select the navigation menu scroll to the Pub/Sub page (Navigation Menu > More Products > Analytics > Pub/Sub)
- In the Topics page, click Create Topic
- In the window that opens, enter
MyTopic
in the Topic ID field.- Leave the default values for the remaining options, and then click Create.
- You see the success message:
A new topic and a new subscription have been successfully created.
- You have just created a topic called
MyTopic
and an associated default subscriptionMyTopic-sub
.
- In the window that opens, enter
-
You create a subscription for the topic and register the URL push endpoint with Cloud Pub/Sub.
-
To Configure Subscription go to Pub/Sub > Subscriptions
-
In the Subscriptions page, click Create subscription.
-
Enter
MySub
in the Subscription ID field. -
For Select a Cloud Pub/Sub topic, select the
MyTopic
topic from the drop-down menu -
Leave the default values for the remaining options.
-
Click Create
- You see the success message:
Subscription successfully added.
- You see the success message:
-
Click the Topics page and click
MyTopic
.-
The
MySub
subscription is now attached to the topicMyTopic
. Pub/Sub delivers all messages sent toMyTopic
to theMySub
andMyTopic-sub
subscriptions.
-
-
-
Cloud Pub/Sub accepts your subscription and associates that
cloudTopicName
with your URL. When messages are published to thatcloudTopicName
(for example, your order notifications), they will be sent to your URL push endpoint.
Request
PUT https://shoppingcontent.googleapis.com/content/v2.1/merchantId/pubsubnotificationsettings
Actions
Batch Local Inventory
Updates local inventory for multiple products or regions in a single request. | key: batchLocalInventory
Input | Notes | Example |
---|---|---|
Connection connection / Required connectionInput | ||
Entries for Batch Request code / Required entries | Entries |
Batch Product
Retrieves, inserts, and deletes multiple products in a single request. | key: batchProduct
Input | Notes | Example |
---|---|---|
Connection connection / Required connectionInput | ||
Entries for Batch Request code / Required entries | Entries |
Batch Regional Inventory
Updates regional inventory for multiple products or regions in a single request. | key: batchRegionalInventory
Input | Notes | Example |
---|---|---|
Connection connection / Required connectionInput | ||
Entries for Batch Request code / Required entries | Entries |
Cancel Order
Cancels all line items in an order, making a full refund. | key: cancelOrder
Input | Notes |
---|---|
Connection connection / Required connectionInput | |
Merchant Id string / Required merchantId | The ID of the managing account. If this parameter is not the same as accountId, then this account must be a multi-client account and accountId must be the ID of a sub-account of this account. |
Operation Id string operationId | The ID of the operation. Unique across all operations for a given order. |
Order Id string / Required orderId | The ID of the order. |
Reason string reason | The reason for the cancellation. |
Reason Text string reasonText | The explanation of the reason. |
Create Account
Creates a Merchant Center sub-account. | key: createAccount
Input | Default | Notes | Example |
---|---|---|---|
Account Management string accountManagement | Controls which fields will be populated. Acceptable values are: 'merchant' and 'css'. The default value is 'merchant'. | ||
Ads Links code adsLinks | Linked Ads accounts that are active or pending approval. To create a new link request, add a new link with status active to the list. It will remain in a pending state until approved or rejected either in the Ads interface or through the Google Ads API. To delete an active link, or to cancel a link request, remove it from the list. | ||
Adult Content boolean / Required adultContent | false | Indicates whether the merchant sells adult content. | |
Automatic Improvements code automaticImprovements | The automatic improvements of the account can be used to automatically update items, improve images and shipping. Each section inside AutomaticImprovements is updated separately. | ||
Automatic Label Ids string Value List automaticLabelIds | 000xxx | Automatically created label IDs that are assigned to the account by CSS Center. | |
Business Information code businessInformation | The business information of the account. | ||
Connection connection / Required connectionInput | |||
Conversion Settings code conversionSettings | Settings for conversion tracking. | ||
Css Id string / Required cssId | ID of CSS the account belongs to | ||
Google My Business Link code googleMyBusinessLink | The Business Profile which is linked or in the process of being linked with the Merchant Center account. | ||
Kind string / Required kind | Identifies what kind of resource this is. Value: the fixed string 'content#account'. | ||
Label Ids string Value List labelIds | 000xxx | Manually created label IDs that are assigned to the account by CSS. | |
Merchant Id string / Required merchantId | The ID of the managing account. If this parameter is not the same as accountId, then this account must be a multi-client account and accountId must be the ID of a sub-account of this account. | ||
Name string / Required name | Display name for the account. | ||
Seller Id string / Required sellerId | Client-specific, locally-unique, internal ID for the child account. | ||
User code users | Users with access to the account. Every account (except for subaccounts) must have at least one admin user. | ||
Website Url string / Required websiteUrl | The merchant's website. | ||
Youtube Channel Links code youtubeChannelLinks | Linked YouTube channels that are active or pending approval. To create a new link request, add a new link with status active to the list. It will remain in a pending state until approved or rejected in the YT Creator Studio interface. To delete an active link, or to cancel a link request, remove it from the list. |
Create Order Return
Create return in your Merchant Center account. | key: createOrderReturn
Input | Notes | Example |
---|---|---|
Connection connection / Required connectionInput | ||
Line Items code lineItems | The list of line items to return. | |
Merchant Id string / Required merchantId | The ID of the managing account. If this parameter is not the same as accountId, then this account must be a multi-client account and accountId must be the ID of a sub-account of this account. | |
Operation Id string operationId | The ID of the operation. Unique across all operations for a given order. | |
Order Id string / Required orderId | The ID of the order. | |
Return Method Type string returnMethodType | The way of the package being returned. |
Create Product
Uploads a product to your Merchant Center account. If an item with the same channel, contentLanguage, offerId, and targetCountry already exists, this method updates that entry. | key: createProduct
Input | Default | Notes | Example |
---|---|---|---|
Additional Image Links string Value List additionalImageLinks | 000xxx | Additional URLs of images of the item. | |
Additional Size Type string additionalSizeType | Additional cut of the item. Used together with sizeType to represent combined size types for apparel items. | ||
Ads Grouping string adsGrouping | Used to group items in an arbitrary way. Only for CPA%, discouraged otherwise. | ||
Ads Labels string Value List adsLabels | 000xxx | Similar to adsGrouping, but only works on CPC. | |
Ads Redirect string adsRedirect | Allows advertisers to override the item URL when the product is shown within the context of Product Ads. | ||
Adult boolean adult | false | Should be set to true if the item is targeted towards adults. | |
Age Group string ageGroup | Target age group of the item. | ||
Availability string availability | Availability status of the item. | ||
Availability Date string availabilityDate | The day a pre-ordered product becomes available for delivery, in ISO 8601 format. | ||
Brand string brand | Brand of the item. | ||
Canonical Link string canonicalLink | URL for the canonical version of your item's landing page. | ||
Channel string / Required channel | The item's channel (online or local). | ||
Color string color | Color of the item. | ||
Condition string condition | Condition or state of the item. | ||
Connection connection / Required connectionInput | |||
Content Language string / Required contentLanguage | The two-letter ISO 639-1 language code for the item. | ||
Cost Of Goods Sold code costOfGoodsSold | Cost of goods sold. Used for gross profit reporting. | ||
Custom Attributes code customAttributes | A list of custom (merchant-provided) attributes. It can also be used for submitting 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, such as additional attributes used for Buy on Google (formerly known as Shopping Actions). | ||
Custom Label 0 string customLabel0 | Custom Label 0 for custom grouping of items in a Shopping campaign. | ||
Custom Label 1 string customLabel1 | Custom Label 1 for custom grouping of items in a Shopping campaign. | ||
Custom Label 2 string customLabel2 | Custom Label 2 for custom grouping of items in a Shopping campaign. | ||
Custom Label 3 string customLabel3 | Custom Label 3 for custom grouping of items in a Shopping campaign. | ||
Custom Label 4 string customLabel4 | Custom Label 4 for custom grouping of items in a Shopping campaign. | ||
Description string description | Description of the item. | ||
Display Ads Id string displayAdsId | An identifier for an item for dynamic remarketing campaigns. | ||
Display Ads Link string displayAdsLink | URL directly to your item's landing page for dynamic remarketing campaigns. | ||
Display Ads Similar Ids string Value List displayAdsSimilarIds | 000xxx | Advertiser-specified recommendations. | |
Display Ads Title string displayAdsTitle | Title of an item for dynamic remarketing campaigns. | ||
Display Ads Value string displayAdsValue | Offer margin for dynamic remarketing campaigns. | ||
Energy Efficiency Class string energyEfficiencyClass | The energy efficiency class as defined in EU directive 2010/30/EU. | ||
Excluded Destinations string Value List excludedDestinations | 000xxx | The list of destinations to exclude for this target (corresponds to cleared check boxes in Merchant Center). Products that are excluded from all destinations for more than 7 days are automatically deleted. | |
Expiration Date string expirationDate | Date on which the item should expire, as specified upon insertion, in ISO 8601 format. The actual expiration date in Google Shopping is exposed in productstatuses as googleExpirationDate and might be earlier if expirationDate is too far in the future. | ||
External Seller Id string / Required externalSellerId | Required for multi-seller accounts. Use this attribute if you're a marketplace uploading products for various sellers to your multi-seller account. | ||
Feed Id string feedId | The Content API Supplemental Feed ID. If present then product deletion applies to the data in a supplemental feed. If absent, entire product will be deleted. | ||
Feed Label string feedLabel | Feed label for the item. Either targetCountry or feedLabel is required. Must be less than or equal to 20 uppercase letters (A-Z), numbers (0-9), and dashes (-). | ||
Gender string gender | Target gender of the item. | ||
Google Product Category string googleProductCategory | Google's category of the item (see Google product taxonomy). When querying products, this field will contain the user provided value. There is currently no way to get back the auto assigned google product categories through the API. | ||
GTIN string gtin | Global Trade Item Number (GTIN) of the item. | ||
Identifier Exists boolean / Required identifierExists | false | Date range during which the item is on sale | |
Image Link string imageLink | URL of an image of the item. | ||
Included Destinations string Value List includedDestinations | 000xxx | The list of destinations to include for this target (corresponds to checked check boxes in Merchant Center). Default destinations are always included unless provided in excludedDestinations. | |
Installment code installment | Number and amount of installments to pay for an item. | ||
Is Bundle boolean isBundle | false | Whether the item is a merchant-defined bundle. A bundle is a custom grouping of different products sold by a merchant for a single price. | |
Item Group Id string itemGroupId | Shared identifier for all variants of the same product. | ||
Kind string kind | Identifies what kind of resource this is. Value: the fixed string 'content#account'. | ||
Lifestyle Image Links string Value List lifestyleImageLinks | 000xxx | Additional URLs of lifestyle images of the item. Used to explicitly identify images that showcase your item in a real-world context. | |
Link string link | URL directly linking to your item's page on your website. | ||
Link Template string linkTemplate | URL template for merchant hosted local storefront. | ||
Material string material | The material of which the item is made. | ||
Max Energy Efficiency Class string maxEnergyEfficiencyClass | The energy efficiency class as defined in EU directive 2010/30/EU. | ||
Max Handling Time string maxHandlingTime | Maximal product handling time (in business days). | ||
Merchant Id string / Required merchantId | The ID of the managing account. If this parameter is not the same as accountId, then this account must be a multi-client account and accountId must be the ID of a sub-account of this account. | ||
Min Energy Efficiency Class string minEnergyEfficiencyClass | The energy efficiency class as defined in EU directive 2010/30/EU. | ||
Min Handling Time string minHandlingTime | Minimal product handling time (in business days). | ||
Mobile Link string mobileLink | URL for the mobile-optimized version of your item's landing page. | ||
Mobile Link Template string mobileLinkTemplate | URL template for merchant hosted local storefront optimized for mobile devices. | ||
MPN string mpn | Manufacturer Part Number (MPN) of the item. | ||
Multipack string multipack | The number of identical products in a merchant-defined multipack. | ||
Offer Id string / Required offerId | Required. A unique identifier for the item. Leading and trailing whitespaces are stripped and multiple whitespaces are replaced by a single whitespace upon submission. Only valid unicode characters are accepted. See the products feed specification for details. Note: Content API methods that operate on products take the REST ID of the product, not this identifier. | ||
Pattern string pattern | The item's pattern (for example, polka dots). | ||
Pause string pause | Publication of this item should be temporarily paused. | ||
Pickup Method string pickupMethod | The pick up option for the item. | ||
Pickup Sla string pickupSla | Item store pickup timeline. | ||
Price code price | Price of the item. | ||
Product Details code productDetails | Technical specification or additional product details. | ||
Product Height code productHeight | The height of the product in the units provided. The value must be between 0 (exclusive) and 3000 (inclusive). | ||
Product Highlights string Value List productHighlights | 000xxx | Bullet points describing the most relevant highlights of a product. | |
Product Length code productLength | The length of the product in the units provided. The value must be between 0 (exclusive) and 3000 (inclusive). | ||
Product Types string Value List productTypes | 000xxx | Categories of the item (formatted as in product data specification). | |
Product Weight code productWeight | The weight of the product in the units provided. The value must be between 0 (exclusive) and 2000 (inclusive). | ||
Product Width code productWidth | The width of the product in the units provided. The value must be between 0 (exclusive) and 3000 (inclusive). | ||
Promotion Ids string Value List promotionIds | 000xxx | The unique ID of a promotion. | |
Sale Price code salePrice | Advertised sale price of the item. | ||
Sale Price Effective Date string salePriceEffectiveDate | Date range during which the item is on sale | ||
Sell On Google Quantity string sellOnGoogleQuantity | The quantity of the product that is available for selling on Google. Supported only for online products. | ||
Shipping code shipping | Array of shipping rules. | ||
Shipping Height code shippingHeight | Height of the item for shipping. | ||
Shipping Label string shippingLabel | The shipping label of the product, used to group product in account-level shipping rules. | ||
Shipping Length code shippingLength | Length of the item for shipping. | ||
Shipping Weight code shippingWeight | Weight of the item for shipping. | ||
Shipping Width code shippingWidth | Width of the item for shipping. | ||
Shopping Ads Excluded Countries string Value List shoppingAdsExcludedCountries | 000xxx | products.list of country codes (ISO 3166-1 alpha-2) to exclude the offer from Shopping Ads destination. Countries from this list are removed from countries configured in MC feed settings. | |
Sizes string Value List sizes | 000xxx | Size of the item. Only one value is allowed. For variants with different sizes, insert a separate product for each size with the same itemGroupId value | |
Size System string sizeSystem | System in which the size is specified. Recommended for apparel items. | ||
Size Type string sizeType | The cut of the item. Recommended for apparel items. | ||
Source string source | The source of the offer, that is, how the offer was created. | ||
Subscription Cost code subscriptionCost | Number of periods (months or years) and amount of payment per period for an item with an associated subscription contract. | ||
Target Country string / Required targetCountry | The CLDR territory code for the item's country of sale. | ||
Tax Category string taxCategory | The energy efficiency class as defined in EU directive 2010/30/EU. | ||
Taxes code taxes | Array with tax information. | ||
Title string title | Title of the item. | ||
Transit Time Label string transitTimeLabel | The transit time label of the product, used to group product in account-level transit time tables. | ||
Unit Pricing Base Measure code unitPricingBaseMeasure | The preference of the denominator of the unit price. | ||
Unit Pricing Measure code unitPricingMeasure | The measure and dimension of an item. |
Delete Account
Deletes a Merchant Center sub-account. | key: deleteAccount
Input | Notes |
---|---|
Account Id string / Required accountId | The ID of the account. |
Connection connection / Required connectionInput | |
Merchant Id string / Required merchantId | The ID of the managing account. If this parameter is not the same as accountId, then this account must be a multi-client account and accountId must be the ID of a sub-account of this account. |
Delete Product
Deletes a product from your Merchant Center account. | key: deleteProduct
Input | Notes |
---|---|
Connection connection / Required connectionInput | |
Feed Id string feedId | The Content API Supplemental Feed ID. If present then product deletion applies to the data in a supplemental feed. If absent, entire product will be deleted. |
Merchant Id string / Required merchantId | The ID of the managing account. If this parameter is not the same as accountId, then this account must be a multi-client account and accountId must be the ID of a sub-account of this account. |
Product Id string / Required productId | The REST ID of the product. |
Get Account
Retrieves a Merchant Center account. | key: getAccount
Input | Notes |
---|---|
Account Id string / Required accountId | The ID of the account. |
Connection connection / Required connectionInput | |
Merchant Id string / Required merchantId | The ID of the managing account. If this parameter is not the same as accountId, then this account must be a multi-client account and accountId must be the ID of a sub-account of this account. |
View string view | Controls which fields will be populated. Acceptable values are: 'merchant' and 'css'. The default value is 'merchant'. |
Get Order
Retrieves an order from your Merchant Center account. | key: getOrder
Input | Notes |
---|---|
Connection connection / Required connectionInput | |
Merchant Id string / Required merchantId | The ID of the managing account. If this parameter is not the same as accountId, then this account must be a multi-client account and accountId must be the ID of a sub-account of this account. |
Order Id string / Required orderId | The ID of the order. |
Get Order Return
Retrieves an order return from your Merchant Center account. | key: getOrderReturn
Input | Notes |
---|---|
Connection connection / Required connectionInput | |
Merchant Id string / Required merchantId | The ID of the managing account. If this parameter is not the same as accountId, then this account must be a multi-client account and accountId must be the ID of a sub-account of this account. |
Return Id string / Required returnId | Merchant order return ID generated by Google. |
Get Product
Retrieves a product from your Merchant Center account. | key: getProduct
Input | Notes |
---|---|
Connection connection / Required connectionInput | |
Merchant Id string / Required merchantId | The ID of the managing account. If this parameter is not the same as accountId, then this account must be a multi-client account and accountId must be the ID of a sub-account of this account. |
Product Id string / Required productId | The REST ID of the product. |
Get PubSub Notification Settings
Retrieves a Merchant Center account's pubsub notification settings. | key: getPubSubNotification
Input | Notes |
---|---|
Connection connection / Required connectionInput | |
Merchant Id string / Required merchantId | The ID of the managing account. If this parameter is not the same as accountId, then this account must be a multi-client account and accountId must be the ID of a sub-account of this account. |
List Accounts
Lists the sub-accounts in your Merchant Center account. | key: listAccounts
Input | Notes |
---|---|
Connection connection / Required connectionInput | |
Label string label | If view is set to 'css', only return accounts that are assigned label with given ID. |
Max Results string maxResults | The maximum number of accounts to return in the response, used for paging. |
Merchant Id string / Required merchantId | The ID of the managing account. If this parameter is not the same as accountId, then this account must be a multi-client account and accountId must be the ID of a sub-account of this account. |
Name string name | If set, only the accounts with the given name (case sensitive) will be returned. |
Page Token string pageToken | The token returned by the previous request. |
View string view | Controls which fields will be populated. Acceptable values are: 'merchant' and 'css'. The default value is 'merchant'. |
List Orders
Lists the orders in your Merchant Center account. | key: listOrders
Input | Default | Notes |
---|---|---|
Acknowledged boolean acknowledged | false | Obtains orders that match the acknowledgement status. When set to true, obtains orders that have been acknowledged. When false, obtains orders that have not been acknowledged. |
Connection connection / Required connectionInput | ||
Max Results string maxResults | The maximum number of accounts to return in the response, used for paging. | |
Merchant Id string / Required merchantId | The ID of the managing account. If this parameter is not the same as accountId, then this account must be a multi-client account and accountId must be the ID of a sub-account of this account. | |
Pause string orderBy | Order results by placement date in descending or ascending order. | |
Page Token string pageToken | The token returned by the previous request. | |
Placed Date End string placedDateEnd | Obtains orders placed before this date (inclusively), in ISO 8601 format. | |
Placed Date Start string placedDateStart | Obtains orders placed after this date (inclusively), in ISO 8601 format. | |
Statuses string Value List statuses | 000xxx | Obtains orders that match any of the specified statuses. Note that active is a shortcut for pendingShipment and partiallyShipped, and completed is a shortcut for shipped, partiallyDelivered, delivered, partiallyReturned, returned, and canceled. |
List Orders Returns
Lists order returns in your Merchant Center account. | key: listReturnsOrders
Input | Default | Notes |
---|---|---|
Acknowledged boolean acknowledged | false | Obtains orders that match the acknowledgement status. When set to true, obtains orders that have been acknowledged. When false, obtains orders that have not been acknowledged. |
Connection connection / Required connectionInput | ||
Created End Date string createdEndDate | Obtains order returns created before this date (inclusively), in ISO 8601 format. | |
Created Start Date string createdStartDate | Obtains order returns created after this date (inclusively), in ISO 8601 format. | |
Google Order Ids string Value List googleOrderIds | 000xxx | Obtains order returns with the specified order ids. If this parameter is provided, createdStartDate, createdEndDate, shipmentType, shipmentStatus, shipmentState and acknowledged parameters must be not set. Note: if googleOrderId and shipmentTrackingNumber parameters are provided, the obtained results will include all order returns that either match the specified order id or the specified tracking number. |
Max Results string maxResults | The maximum number of accounts to return in the response, used for paging. | |
Merchant Id string / Required merchantId | The ID of the managing account. If this parameter is not the same as accountId, then this account must be a multi-client account and accountId must be the ID of a sub-account of this account. | |
Pause string orderBy | Order results by placement date in descending or ascending order. | |
Page Token string pageToken | The token returned by the previous request. | |
Shipment States string Value List shipmentStates | 000xxx | Obtains order returns that match any shipment state provided in this parameter. When this parameter is not provided, order returns are obtained regardless of their shipment states. |
Shipment Status string Value List shipmentStatus | 000xxx | Obtains order returns that match any shipment status provided in this parameter. When this parameter is not provided, order returns are obtained regardless of their shipment statuses. |
Shipping Tracking Numbers string Value List shipmentTrackingNumbers | 000xxx | Obtains order returns with the specified tracking numbers. If this parameter is provided, createdStartDate, createdEndDate, shipmentType, shipmentStatus, shipmentState and acknowledged parameters must be not set. Note: if googleOrderId and shipmentTrackingNumber parameters are provided, the obtained results will include all order returns that either match the specified order id or the specified tracking number. |
Shipment Types string Value List shipmentTypes | 000xxx | Obtains order returns that match any shipment type provided in this parameter. When this parameter is not provided, order returns are obtained regardless of their shipment types. |
List Products
Lists the products in your Merchant Center account. | key: listProducts
Input | Notes |
---|---|
Connection connection / Required connectionInput | |
Max Results string maxResults | The maximum number of accounts to return in the response, used for paging. |
Merchant Id string / Required merchantId | The ID of the managing account. If this parameter is not the same as accountId, then this account must be a multi-client account and accountId must be the ID of a sub-account of this account. |
Page Token string pageToken | The token returned by the previous request. |
Process Order Return
Processes return in your Merchant Center account | key: processOrderReturn
Input | Default | Notes | Example |
---|---|---|---|
Connection connection / Required connectionInput | |||
Full Charge Return Shipping Cost boolean fullChargeReturnShippingCost | false | Option to charge the customer return shipping cost. | |
Merchant Id string / Required merchantId | The ID of the managing account. If this parameter is not the same as accountId, then this account must be a multi-client account and accountId must be the ID of a sub-account of this account. | ||
Operation Id string operationId | The ID of the operation. Unique across all operations for a given order. | ||
Refund Shipping Fee code refundShippingFee | Refunds for original shipping fee. | ||
Return Id string / Required returnId | Merchant order return ID generated by Google. | ||
Return Items code returnItems | The list of items to return. |
Raw Request
Send raw HTTP request to Google Content Shopping | key: rawRequest
Input | Default | Notes | Example |
---|---|---|---|
Connection connection / Required connection | |||
Data string data | The HTTP body payload to send to the URL. | {"exampleKey": "Example Data"} | |
Debug Request boolean debugRequest | false | Enabling this flag will log out the current request. | |
File Data string Key Value List fileData | File Data to be sent as a multipart form upload. | [{key: "example.txt", value: "My File Contents"}] | |
File Data File Names string Key Value List fileDataFileNames | File names to apply to the file data inputs. Keys must match the file data keys above. | ||
Form Data string Key Value List formData | The Form Data to be sent as a multipart form upload. | [{"key": "Example Key", "value": new Buffer("Hello World")}] | |
Header string Key Value List headers | A list of headers to send with the request. | User-Agent: curl/7.64.1 | |
Max Retry Count string maxRetries | 0 | The maximum number of retries to attempt. | |
Method string / Required method | The HTTP method to use. | ||
Query Parameter string Key Value List queryParams | A list of query parameters to send with the request. This is the portion at the end of the URL similar to ?key1=value1&key2=value2. | ||
Response Type string / Required responseType | json | The type of data you expect in the response. You can request json, text, or binary data. | |
Retry On All Errors boolean retryAllErrors | false | If true, retries on all erroneous responses regardless of type. | |
Retry Delay (ms) string retryDelayMS | 0 | The delay in milliseconds between retries. | |
Timeout string timeout | The maximum time that a client will await a response to its request | 2000 | |
URL string / Required url | Input the path only (/{merchantId}/accounts), The base URL is already included (https://shoppingcontent.googleapis.com/content/{version}). For example, to connect to https://shoppingcontent.googleapis.com/content/v2.1/{merchantId}/accounts, only /{merchantId}/accounts is entered in this field. | /{merchantId}/accounts | |
Use Exponential Backoff boolean useExponentialBackoff | false | Specifies whether to use a pre-defined exponential backoff strategy for retries. | |
API Version string version | v2.1 | The API version to use. This is used to construct the base URL for the request. |
Update Account
Updates a Merchant Center account. Any fields that are not provided are deleted from the resource. | key: updateAccount
Input | Default | Notes | Example |
---|---|---|---|
Account Id string / Required accountId | The ID of the account. | ||
Account Management string accountManagement | Controls which fields will be populated. Acceptable values are: 'merchant' and 'css'. The default value is 'merchant'. | ||
Ads Links code adsLinks | Linked Ads accounts that are active or pending approval. To create a new link request, add a new link with status active to the list. It will remain in a pending state until approved or rejected either in the Ads interface or through the Google Ads API. To delete an active link, or to cancel a link request, remove it from the list. | ||
Adult Content boolean / Required adultContent | false | Indicates whether the merchant sells adult content. | |
Automatic Improvements code automaticImprovements | The automatic improvements of the account can be used to automatically update items, improve images and shipping. Each section inside AutomaticImprovements is updated separately. | ||
Automatic Label Ids string Value List automaticLabelIds | 000xxx | Automatically created label IDs that are assigned to the account by CSS Center. | |
Business Information code businessInformation | The business information of the account. | ||
Connection connection / Required connectionInput | |||
Conversion Settings code conversionSettings | Settings for conversion tracking. | ||
Css Id string / Required cssId | ID of CSS the account belongs to | ||
Google My Business Link code googleMyBusinessLink | The Business Profile which is linked or in the process of being linked with the Merchant Center account. | ||
Kind string / Required kind | Identifies what kind of resource this is. Value: the fixed string 'content#account'. | ||
Label Ids string Value List labelIds | 000xxx | Manually created label IDs that are assigned to the account by CSS. | |
Merchant Id string / Required merchantId | The ID of the managing account. If this parameter is not the same as accountId, then this account must be a multi-client account and accountId must be the ID of a sub-account of this account. | ||
Name string / Required name | Display name for the account. | ||
Seller Id string / Required sellerId | Client-specific, locally-unique, internal ID for the child account. | ||
User code users | Users with access to the account. Every account (except for subaccounts) must have at least one admin user. | ||
Website Url string / Required websiteUrl | The merchant's website. | ||
Youtube Channel Links code youtubeChannelLinks | Linked YouTube channels that are active or pending approval. To create a new link request, add a new link with status active to the list. It will remain in a pending state until approved or rejected in the YT Creator Studio interface. To delete an active link, or to cancel a link request, remove it from the list. |
Update Product
Updates an existing product in your Merchant Center account. Only updates attributes provided in the request. | key: updateProduct
Input | Default | Notes | Example |
---|---|---|---|
Additional Image Links string Value List additionalImageLinks | 000xxx | Additional URLs of images of the item. | |
Additional Size Type string additionalSizeType | Additional cut of the item. Used together with sizeType to represent combined size types for apparel items. | ||
Ads Grouping string adsGrouping | Used to group items in an arbitrary way. Only for CPA%, discouraged otherwise. | ||
Ads Labels string Value List adsLabels | 000xxx | Similar to adsGrouping, but only works on CPC. | |
Ads Redirect string adsRedirect | Allows advertisers to override the item URL when the product is shown within the context of Product Ads. | ||
Adult boolean adult | false | Should be set to true if the item is targeted towards adults. | |
Age Group string ageGroup | Target age group of the item. | ||
Availability string availability | Availability status of the item. | ||
Availability Date string availabilityDate | The day a pre-ordered product becomes available for delivery, in ISO 8601 format. | ||
Brand string brand | Brand of the item. | ||
Canonical Link string canonicalLink | URL for the canonical version of your item's landing page. | ||
Channel string channel | The item's channel (online or local). | ||
Color string color | Color of the item. | ||
Condition string condition | Condition or state of the item. | ||
Connection connection / Required connectionInput | |||
Content Language string contentLanguage | The two-letter ISO 639-1 language code for the item. | ||
Cost Of Goods Sold code costOfGoodsSold | Cost of goods sold. Used for gross profit reporting. | ||
Custom Attributes code customAttributes | A list of custom (merchant-provided) attributes. It can also be used for submitting 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, such as additional attributes used for Buy on Google (formerly known as Shopping Actions). | ||
Custom Label 0 string customLabel0 | Custom Label 0 for custom grouping of items in a Shopping campaign. | ||
Custom Label 1 string customLabel1 | Custom Label 1 for custom grouping of items in a Shopping campaign. | ||
Custom Label 2 string customLabel2 | Custom Label 2 for custom grouping of items in a Shopping campaign. | ||
Custom Label 3 string customLabel3 | Custom Label 3 for custom grouping of items in a Shopping campaign. | ||
Custom Label 4 string customLabel4 | Custom Label 4 for custom grouping of items in a Shopping campaign. | ||
Description string description | Description of the item. | ||
Display Ads Id string displayAdsId | An identifier for an item for dynamic remarketing campaigns. | ||
Display Ads Link string displayAdsLink | URL directly to your item's landing page for dynamic remarketing campaigns. | ||
Display Ads Similar Ids string Value List displayAdsSimilarIds | 000xxx | Advertiser-specified recommendations. | |
Display Ads Title string displayAdsTitle | Title of an item for dynamic remarketing campaigns. | ||
Display Ads Value string displayAdsValue | Offer margin for dynamic remarketing campaigns. | ||
Energy Efficiency Class string energyEfficiencyClass | The energy efficiency class as defined in EU directive 2010/30/EU. | ||
Excluded Destinations string Value List excludedDestinations | 000xxx | The list of destinations to exclude for this target (corresponds to cleared check boxes in Merchant Center). Products that are excluded from all destinations for more than 7 days are automatically deleted. | |
Expiration Date string expirationDate | Date on which the item should expire, as specified upon insertion, in ISO 8601 format. The actual expiration date in Google Shopping is exposed in productstatuses as googleExpirationDate and might be earlier if expirationDate is too far in the future. | ||
External Seller Id string externalSellerId | Required for multi-seller accounts. Use this attribute if you're a marketplace uploading products for various sellers to your multi-seller account. | ||
Feed Label string feedLabel | Feed label for the item. Either targetCountry or feedLabel is required. Must be less than or equal to 20 uppercase letters (A-Z), numbers (0-9), and dashes (-). | ||
Gender string gender | Target gender of the item. | ||
Google Product Category string googleProductCategory | Google's category of the item (see Google product taxonomy). When querying products, this field will contain the user provided value. There is currently no way to get back the auto assigned google product categories through the API. | ||
GTIN string gtin | Global Trade Item Number (GTIN) of the item. | ||
Identifier Exists boolean / Required identifierExists | false | Date range during which the item is on sale | |
Image Link string imageLink | URL of an image of the item. | ||
Included Destinations string Value List includedDestinations | 000xxx | The list of destinations to include for this target (corresponds to checked check boxes in Merchant Center). Default destinations are always included unless provided in excludedDestinations. | |
Installment code installment | Number and amount of installments to pay for an item. | ||
Is Bundle boolean isBundle | false | Whether the item is a merchant-defined bundle. A bundle is a custom grouping of different products sold by a merchant for a single price. | |
Item Group Id string itemGroupId | Shared identifier for all variants of the same product. | ||
Kind string kind | Identifies what kind of resource this is. Value: the fixed string 'content#account'. | ||
Lifestyle Image Links string Value List lifestyleImageLinks | 000xxx | Additional URLs of lifestyle images of the item. Used to explicitly identify images that showcase your item in a real-world context. | |
Link string link | URL directly linking to your item's page on your website. | ||
Link Template string linkTemplate | URL template for merchant hosted local storefront. | ||
Material string material | The material of which the item is made. | ||
Max Energy Efficiency Class string maxEnergyEfficiencyClass | The energy efficiency class as defined in EU directive 2010/30/EU. | ||
Max Handling Time string maxHandlingTime | Maximal product handling time (in business days). | ||
Merchant Id string / Required merchantId | The ID of the managing account. If this parameter is not the same as accountId, then this account must be a multi-client account and accountId must be the ID of a sub-account of this account. | ||
Min Energy Efficiency Class string minEnergyEfficiencyClass | The energy efficiency class as defined in EU directive 2010/30/EU. | ||
Min Handling Time string minHandlingTime | Minimal product handling time (in business days). | ||
Mobile Link string mobileLink | URL for the mobile-optimized version of your item's landing page. | ||
Mobile Link Template string mobileLinkTemplate | URL template for merchant hosted local storefront optimized for mobile devices. | ||
MPN string mpn | Manufacturer Part Number (MPN) of the item. | ||
Multipack string multipack | The number of identical products in a merchant-defined multipack. | ||
Offer Id string offerId | Required. A unique identifier for the item. Leading and trailing whitespaces are stripped and multiple whitespaces are replaced by a single whitespace upon submission. Only valid unicode characters are accepted. See the products feed specification for details. Note: Content API methods that operate on products take the REST ID of the product, not this identifier. | ||
Pattern string pattern | The item's pattern (for example, polka dots). | ||
Pause string pause | Publication of this item should be temporarily paused. | ||
Pickup Method string pickupMethod | The pick up option for the item. | ||
Pickup Sla string pickupSla | Item store pickup timeline. | ||
Price code price | Price of the item. | ||
Product Details code productDetails | Technical specification or additional product details. | ||
Product Height code productHeight | The height of the product in the units provided. The value must be between 0 (exclusive) and 3000 (inclusive). | ||
Product Highlights string Value List productHighlights | 000xxx | Bullet points describing the most relevant highlights of a product. | |
Product Id string / Required productId | The REST ID of the product. | ||
Product Length code productLength | The length of the product in the units provided. The value must be between 0 (exclusive) and 3000 (inclusive). | ||
Product Types string Value List productTypes | 000xxx | Categories of the item (formatted as in product data specification). | |
Product Weight code productWeight | The weight of the product in the units provided. The value must be between 0 (exclusive) and 2000 (inclusive). | ||
Product Width code productWidth | The width of the product in the units provided. The value must be between 0 (exclusive) and 3000 (inclusive). | ||
Promotion Ids string Value List promotionIds | 000xxx | The unique ID of a promotion. | |
Sale Price code salePrice | Advertised sale price of the item. | ||
Sale Price Effective Date string salePriceEffectiveDate | Date range during which the item is on sale | ||
Sell On Google Quantity string sellOnGoogleQuantity | The quantity of the product that is available for selling on Google. Supported only for online products. | ||
Shipping code shipping | Array of shipping rules. | ||
Shipping Height code shippingHeight | Height of the item for shipping. | ||
Shipping Label string shippingLabel | The shipping label of the product, used to group product in account-level shipping rules. | ||
Shipping Length code shippingLength | Length of the item for shipping. | ||
Shipping Weight code shippingWeight | Weight of the item for shipping. | ||
Shipping Width code shippingWidth | Width of the item for shipping. | ||
Shopping Ads Excluded Countries string Value List shoppingAdsExcludedCountries | 000xxx | products.list of country codes (ISO 3166-1 alpha-2) to exclude the offer from Shopping Ads destination. Countries from this list are removed from countries configured in MC feed settings. | |
Sizes string Value List sizes | 000xxx | Size of the item. Only one value is allowed. For variants with different sizes, insert a separate product for each size with the same itemGroupId value | |
Size System string sizeSystem | System in which the size is specified. Recommended for apparel items. | ||
Size Type string sizeType | The cut of the item. Recommended for apparel items. | ||
Source string source | The source of the offer, that is, how the offer was created. | ||
Subscription Cost code subscriptionCost | Number of periods (months or years) and amount of payment per period for an item with an associated subscription contract. | ||
Target Country string targetCountry | The CLDR territory code for the item's country of sale. | ||
Tax Category string taxCategory | The energy efficiency class as defined in EU directive 2010/30/EU. | ||
Taxes code taxes | Array with tax information. | ||
Title string title | Title of the item. | ||
Transit Time Label string transitTimeLabel | The transit time label of the product, used to group product in account-level transit time tables. | ||
Unit Pricing Base Measure code unitPricingBaseMeasure | The preference of the denominator of the unit price. | ||
Unit Pricing Measure code unitPricingMeasure | The measure and dimension of an item. | ||
Update Mask string updateMask | The comma-separated list of product attributes to be updated. Example: 'title,salePrice'. Attributes specified in the update mask without a value specified in the body will be deleted from the product. You must specify the update mask to delete attributes. Only top-level product attributes can be updated. If not defined, product attributes with set values will be updated and other attributes will stay unchanged. Only defined if the method is update. |
Update Product Local Inventory
Updates the local inventory of a product in your Merchant Center account. | key: updateProductLocalInventory
Input | Notes | Example |
---|---|---|
Availability string availability | Availability status of the item. | |
Connection connection / Required connectionInput | ||
Custom Attributes code customAttributes | A list of custom (merchant-provided) attributes. It can also be used for submitting 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, such as additional attributes used for Buy on Google (formerly known as Shopping Actions). | |
Instore Product Location string instoreProductLocation | In-store product location. | |
Kind string / Required kind | Identifies what kind of resource this is. Value: the fixed string 'content#account'. | |
Merchant Id string / Required merchantId | The ID of the managing account. If this parameter is not the same as accountId, then this account must be a multi-client account and accountId must be the ID of a sub-account of this account. | |
Pickup Method string pickupMethod | The pick up option for the item. | |
Pickup Sla string pickupSla | Item store pickup timeline. | |
Price code price | Price of the item. | |
Product Id string / Required productId | The REST ID of the product. | |
Quantity string quantity | Quantity of the product. Must be nonnegative. | |
Sale Price code salePrice | Advertised sale price of the item. | |
Sale Price Effective Date string salePriceEffectiveDate | Date range during which the item is on sale | |
Store Code string / Required storeCode | Store code of this local inventory resource. |
Update Product Regional Inventory
Updates the regional inventory of a product in your Merchant Center account. If a regional inventory with the same region ID already exists, this method updates that entry. | key: updateProductRegionalInventory
Input | Notes | Example |
---|---|---|
Availability string availability | Availability status of the item. | |
Connection connection / Required connectionInput | ||
Custom Attributes code customAttributes | A list of custom (merchant-provided) attributes. It can also be used for submitting 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, such as additional attributes used for Buy on Google (formerly known as Shopping Actions). | |
Kind string / Required kind | Identifies what kind of resource this is. Value: the fixed string 'content#account'. | |
Merchant Id string / Required merchantId | The ID of the managing account. If this parameter is not the same as accountId, then this account must be a multi-client account and accountId must be the ID of a sub-account of this account. | |
Price code price | Price of the item. | |
Product Id string / Required productId | The REST ID of the product. | |
Region Id string / Required regionId | The ID uniquely identifying each region. | |
Sale Price code salePrice | Advertised sale price of the item. | |
Sale Price Effective Date string salePriceEffectiveDate | Date range during which the item is on sale |
Update PubSub Notification
Register a Merchant Center account for pubsub notifications. Note that cloud topic name shouldn't be provided as part of the request. | key: updatePubSubNotification
Input | Default | Notes |
---|---|---|
Cloud Topic Name string cloudTopicName | Cloud pub/sub topic to which notifications are sent (read-only). | |
Connection connection / Required connectionInput | ||
Kind string / Required kind | Identifies what kind of resource this is. Value: the fixed string 'content#account'. | |
Merchant Id string / Required merchantId | The ID of the managing account. If this parameter is not the same as accountId, then this account must be a multi-client account and accountId must be the ID of a sub-account of this account. | |
Registered Events string Value List registeredEvents | 000xxx | List of event types. |