This Recommendations AI documentation references the Recommendations console. We recommend switching to the Retail console and using the Retail documentation, which documents Recommendations AI, the Retail console, and Retail Search.

If you are using the v1beta version of Recommendations AI, migrate to the Retail API version.

Method: projects.locations.catalogs.attributesConfig.addCatalogAttribute

Adds the specified CatalogAttribute to the AttributesConfig.

If the CatalogAttribute to add already exists, an ALREADY_EXISTS error is returned.

HTTP request

POST https://retail.googleapis.com/v2beta/{attributesConfig=projects/*/locations/*/catalogs/*/attributesConfig}:addCatalogAttribute

The URL uses gRPC Transcoding syntax.

Path parameters

Parameters
attributesConfig

string

Required. Full AttributesConfig resource name. Format: projects/{project_number}/locations/{locationId}/catalogs/{catalogId}/attributesConfig

Request body

The request body contains data with the following structure:

JSON representation
{
  "catalogAttribute": {
    object (CatalogAttribute)
  }
}
Fields
catalogAttribute

object (CatalogAttribute)

Required. The CatalogAttribute to add.

Response body

If successful, the response body contains an instance of AttributesConfig.

Authorization Scopes

Requires the following OAuth scope:

  • https://www.googleapis.com/auth/cloud-platform

For more information, see the Authentication Overview.

IAM Permissions

Requires the following IAM permission on the attributesConfig resource:

  • retail.attributesConfigs.addCatalogAttribute

For more information, see the IAM documentation.