Overview
Cloud Retail service enables customers to build end-to-end personalized recommendation systems without requiring a high level of expertise in machine learning, recommendation system, or Google Cloud.
Retail API is an analytics API from googleapis.com. Requests are authenticated with OAuth. It is served over HTTPS. Its OpenAPI description documents 42 endpoints.
At a glance
- Authentication
- OAuth
- HTTPS
- Yes
- CORS
- Unknown
- Category
- Analytics
- Base URL
https://retail.googleapis.com/- Version
- v2alpha
- Endpoints
- 42
- OpenAPI
- Specification ↗
- Spec updated
- 2023-04-21
Make a first request
Replace the placeholders; the documentation says exactly where credentials go.
curl -X GET "https://retail.googleapis.com/v2alpha/CATALOG:completeQuery" \
-H "Accept: application/json" \
-H "Authorization: Bearer YOUR_TOKEN"const response = await fetch("https://retail.googleapis.com/v2alpha/CATALOG:completeQuery", {
method: "GET",
headers: {
"Accept": "application/json",
"Authorization": "Bearer YOUR_TOKEN",
},
});
const data = await response.json();
console.log(data);import requests
response = requests.request(
"GET",
"https://retail.googleapis.com/v2alpha/CATALOG:completeQuery",
headers={
"Accept": "application/json",
"Authorization": "Bearer YOUR_TOKEN",
},
timeout=30,
)
print(response.json())Endpoints
| Method | Path | What it does |
|---|---|---|
| POST | /v2alpha/{attributesConfig}:addCatalogAttribute | Adds the specified CatalogAttribute to the AttributesConfig. If the CatalogAttribute to add already exists, an ALREADY_EXISTS error is returned. |
| POST | /v2alpha/{attributesConfig}:batchRemoveCatalogAttributes | Removes all specified CatalogAttributes from the AttributesConfig. |
| POST | /v2alpha/{attributesConfig}:removeCatalogAttribute | Removes the specified CatalogAttribute from the AttributesConfig. If the CatalogAttribute to remove does not exist, a NOT_FOUND error is returned. |
| POST | /v2alpha/{attributesConfig}:replaceCatalogAttribute | Replaces the specified CatalogAttribute in the AttributesConfig by updating the catalog attribute with the same CatalogAttribute.key. If the CatalogAttribute to |
| GET | /v2alpha/{catalog}:completeQuery | Completes the specified prefix with keyword suggestions. This feature is only available for users who have Retail Search enabled. Enable Retail Search on Cloud |
| GET | /v2alpha/{catalog}:getDefaultBranch | Get which branch is currently default branch set by CatalogService.SetDefaultBranch method under a specified parent catalog. |
| POST | /v2alpha/{catalog}:setDefaultBranch | Set a specified branch id as default branch. API methods such as SearchService.Search, ProductService.GetProduct, ProductService.ListProducts will treat request |
| GET | /v2alpha/{name} | Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service. |
| POST | /v2alpha/{name} | Creates a MerchantCenterAccountLink. MerchantCenterAccountLink cannot be set to a different oneof field, if so an INVALID_ARGUMENT is returned. |
| PATCH | /v2alpha/{name} | Updates a ServingConfig. |
| DELETE | /v2alpha/{name} | Deletes a ServingConfig. Returns a NotFound error if the ServingConfig does not exist. |
| GET | /v2alpha/{name}/operations | Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`. |
| POST | /v2alpha/{name}:pause | Pauses the training of an existing model. |
| POST | /v2alpha/{name}:resume | Resumes the training of an existing model. |
| POST | /v2alpha/{name}:setInventory | Updates inventory information for a Product while respecting the last update timestamps of each inventory field. This process is asynchronous and does not requi |
| POST | /v2alpha/{name}:tune | Tunes an existing model. |
| GET | /v2alpha/{parent}/catalogs | Lists all the Catalogs associated with the project. |
| POST | /v2alpha/{parent}/completionData:import | Bulk import of processed completion dataset. Request processing is asynchronous. Partial updating is not supported. The operation is successfully finished only |
| GET | /v2alpha/{parent}/controls | Lists all Controls by their parent Catalog. |
| POST | /v2alpha/{parent}/controls | Creates a Control. If the Control to create already exists, an ALREADY_EXISTS error is returned. |
| GET | /v2alpha/{parent}/merchantCenterAccountLinks | Lists all MerchantCenterAccountLinks under the specified parent Catalog. |
| GET | /v2alpha/{parent}/models | Lists all the models linked to this event store. |
| POST | /v2alpha/{parent}/models | Creates a new model. |
| GET | /v2alpha/{parent}/products | Gets a list of Products. |
| POST | /v2alpha/{parent}/products | Creates a Product. |
| POST | /v2alpha/{parent}/products:import | Bulk import of multiple Products. Request processing may be synchronous. Non-existing items are created. Note that it is possible for a subset of the Products t |
| POST | /v2alpha/{parent}/products:purge | Permanently deletes all selected Products under a branch. This process is asynchronous. If the request is valid, the removal will be enqueued and processed offl |
| GET | /v2alpha/{parent}/servingConfigs | Lists all ServingConfigs linked to this catalog. |
| POST | /v2alpha/{parent}/servingConfigs | Creates a ServingConfig. A maximum of 100 ServingConfigs are allowed in a Catalog, otherwise a FAILED_PRECONDITION error is returned. |
| GET | /v2alpha/{parent}/userEvents:collect | Writes a single user event from the browser. This uses a GET request to due to browser restriction of POST-ing to a 3rd party domain. This method is used only b |
| POST | /v2alpha/{parent}/userEvents:import | Bulk import of User events. Request processing might be synchronous. Events that already exist are skipped. Use this method for backfilling historical user even |
| POST | /v2alpha/{parent}/userEvents:purge | Deletes permanently all user events specified by the filter provided. Depending on the number of events specified by the filter, this operation could take hours |
| POST | /v2alpha/{parent}/userEvents:rejoin | Starts a user-event rejoin operation with latest product catalog. Events are not annotated with detailed product information for products that are missing from |
| POST | /v2alpha/{parent}/userEvents:write | Writes a single user event. |
| POST | /v2alpha/{placement}:predict | Makes a recommendation prediction. |
| POST | /v2alpha/{placement}:search | Performs a search. This feature is only available for users who have Retail Search enabled. Enable Retail Search on Cloud Console before using this feature. |
| POST | /v2alpha/{product}:addFulfillmentPlaces | It is recommended to use the ProductService.AddLocalInventories method instead of ProductService.AddFulfillmentPlaces. ProductService.AddLocalInventories achiev |
| POST | /v2alpha/{product}:addLocalInventories | Updates local inventory information for a Product at a list of places, while respecting the last update timestamps of each inventory field. This process is asyn |
| POST | /v2alpha/{product}:removeFulfillmentPlaces | It is recommended to use the ProductService.RemoveLocalInventories method instead of ProductService.RemoveFulfillmentPlaces. ProductService.RemoveLocalInventori |
| POST | /v2alpha/{product}:removeLocalInventories | Remove local inventory information for a Product at a list of places at a removal timestamp. This process is asynchronous. If the request is valid, the removal |
| POST | /v2alpha/{servingConfig}:addControl | Enables a Control on the specified ServingConfig. The control is added in the last position of the list of controls it belongs to (e.g. if it's a facet spec con |
| POST | /v2alpha/{servingConfig}:removeControl | Disables a Control on the specified ServingConfig. The control is removed from the ServingConfig. Returns a NOT_FOUND error if the Control is not enabled for th |
Questions
Does the Retail API API need an API key?
Yes. The Retail API API uses OAuth authentication; the documentation explains how to get credentials.
Does the Retail API API support HTTPS?
Yes, the Retail API API is served over HTTPS.
How many endpoints does the Retail API API have?
Its OpenAPI description lists 42 endpoints in version v2alpha. All of them are shown on this page.
What are alternatives to the Retail API API?
Other Analytics APIs include Google Play Integrity API, versionhistory.googleapis.com API, Doc Converter, Perspective Comment Analyzer API, Safe Browsing API.
Similar analytics APIs
Compare alternatives →Google Play Integrity API
AnalyticsThe Play Integrity API helps you check that you're interacting with your genuine app on a genuine Android device powered by Google Play services. The Play Integrity API has replaced SafetyNet Attestation and Android Device Verification.
versionhistory.googleapis.com API
AnalyticsVersion History API - Prod
Doc Converter
AnalyticsThis api converts file formats of OpenXml and OpenOffice documents formats to vector files (e.g., svg)
Perspective Comment Analyzer API
AnalyticsThe Perspective Comment Analyzer API provides information about the potential impact of a comment on a conversation (e.g. it can provide a score for the "toxicity" of a comment). Users can leverage the "SuggestCommentScore" method to submit corrections to improve Perspective over time. Users can set the "doNotStore" flag to ensure that all submitted comments are automatically deleted after scores are returned.
Safe Browsing API
AnalyticsEnables client applications to check web resources (most commonly URLs) against Google-generated lists of unsafe web resources. The Safe Browsing APIs are for non-commercial use only. If you need to use APIs to detect malicious URLs for commercial purposes – meaning “for sale or revenue-generating purposes” – please refer to the Web Risk API.
Web Fonts Developer API
AnalyticsThe Google Web Fonts Developer API lets you retrieve information about web fonts served by Google.
Listed from APIs.guru (CC0).