Skip to main content

catalogs_attributes_config

Creates, updates, deletes, gets or lists a catalogs_attributes_config resource.

Overview

Namecatalogs_attributes_config
TypeResource
Idgoogle.retail.catalogs_attributes_config

Fields

NameDatatypeDescription
namestringRequired. Immutable. The fully qualified resource name of the attribute config. Format: projects/*/locations/*/catalogs/*/attributesConfig
attributeConfigLevelstringOutput only. The AttributeConfigLevel used for this catalog.
catalogAttributesobjectEnable attribute(s) config at catalog level. For example, indexable, dynamic_facetable, or searchable for each attribute. The key is catalog attribute's name. For example: color, brands, attributes.custom_attribute, such as attributes.xyz. The maximum number of catalog attributes allowed in a request is 1000.

Methods

NameAccessible byRequired ParamsDescription
projects_locations_catalogs_get_attributes_configSELECTcatalogsId, locationsId, projectsIdGets an AttributesConfig.
projects_locations_catalogs_update_attributes_configUPDATEcatalogsId, locationsId, projectsIdUpdates the AttributesConfig. The catalog attributes in the request will be updated in the catalog, or inserted if they do not exist. Existing catalog attributes not included in the request will remain unchanged. Attributes that are assigned to products, but do not exist at the catalog level, are always included in the response. The product attribute is assigned default values for missing catalog attribute fields, e.g., searchable and dynamic facetable options.

SELECT examples

Gets an AttributesConfig.

SELECT
name,
attributeConfigLevel,
catalogAttributes
FROM google.retail.catalogs_attributes_config
WHERE catalogsId = '{{ catalogsId }}'
AND locationsId = '{{ locationsId }}'
AND projectsId = '{{ projectsId }}';

UPDATE example

Updates a catalogs_attributes_config resource.

/*+ update */
UPDATE google.retail.catalogs_attributes_config
SET
name = '{{ name }}',
catalogAttributes = '{{ catalogAttributes }}'
WHERE
catalogsId = '{{ catalogsId }}'
AND locationsId = '{{ locationsId }}'
AND projectsId = '{{ projectsId }}';