For the complete documentation index, see llms.txt. This page is also available as Markdown.

Google Merchant Attribute Mapper

Administrative endpoints for Google Merchant attribute mappers — the rules that decide how each field of a Google Merchant Center product feed is computed from a source product. Each record maps one output field (output_key, e.g. title, gtin, google_product_category) to an ordered set of rules that read from the product and produce that field's value when the feed is generated.

A mapper can be tied to a single feed adapter or left global (no adapter), and the pair (output_key, feed_adapter) must be unique.

Core Capabilities

1. Listing & Filtering

  • Retrieve a paginated list of attribute mappers.

  • Filter by the feed adapter they belong to with ?feed_adapter=<id>.

  • Order results with the sort parameter, as described under Filtering & Ordering.

2. Full CRUD

  • Create a mapper that binds an output_key to a rule_set, optionally scoped to a feed adapter.

  • Retrieve a single mapper, either directly or through the /{id}/detailed/ alias, which returns the same representation.

  • Fully or partially update a mapper.

  • Delete a mapper. DELETE is a hard delete — the record is removed.

Mapper Fields

Field
Type
Description

id

integer

The unique identifier of the mapper. Assigned by the server; supplying it in a request body has no effect.

output_key

string

The name of the feed field this mapper produces (e.g. title, gtin). Required on create and full update. Up to 255 characters and non-blank.

rule_set

array

The ordered list of rules used to compute the field's value at feed-generation time. Required on create and full update — send at least an empty array. See Rule Set.

feed_adapter

integer

The identifier of the feed adapter this mapper is scoped to, or null for a global mapper. Optional.

Rule Set

rule_set is a JSON array evaluated top-down when the feed is built: the first rule whose condition matches produces the output value. Each element pairs a rule (the condition) with an action (how the value is produced), plus optional shared arguments:

Part
Accepted values

rule_type

query, always, in_dict, attributeexists, multiattributeexists

action_type

stdout, attrgetter, outputdict, attrformatter, multiattrformatter

Note: The contents of rule_set are not validated when the mapper is written. A malformed rule is accepted here and is simply skipped later, at feed-generation time.

Filtering & Ordering

The list endpoint accepts a single filter, feed_adapter, which matches the adapter identifier exactly. Query parameters that are not listed are ignored rather than rejected. Results can be ordered with the sort parameter on the mapper's own fields (id, output_key, feed_adapter); prefix a field with a hyphen for descending order and separate several fields with commas.

Dynamic Settings & Environment Variables

No dynamic settings (dj_dynamic_settings) and no environment variables are read by these endpoints. Listing, filtering, creation, update, and deletion behave identically regardless of how the management panel or the deployment is configured.

Last updated

Was this helpful?