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

The following fields are returned by SELECT queries:

Successful response

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

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
projects_locations_catalogs_get_attributes_configselectprojectsId, locationsId, catalogsIdGets an AttributesConfig.
projects_locations_catalogs_update_attributes_configupdateprojectsId, locationsId, catalogsIdupdateMaskUpdates 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.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
catalogsIdstring
locationsIdstring
projectsIdstring
updateMaskstring (google-fieldmask)

SELECT examples

Gets an AttributesConfig.

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

UPDATE examples

Updates 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.

UPDATE google.retail.catalogs_attributes_config
SET
data__name = '{{ name }}',
data__catalogAttributes = '{{ catalogAttributes }}'
WHERE
projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND catalogsId = '{{ catalogsId }}' --required
AND updateMask = '{{ updateMask}}'
RETURNING
name,
attributeConfigLevel,
catalogAttributes;