> For the complete documentation index, see [llms.txt](https://apidocs.akinon.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://apidocs.akinon.com/commerce-openapis/admin/google-merchant-attribute-mapper/retrieve-an-attribute-mapper.md).

# Retrieve an attribute mapper

Returns a single Google Merchant attribute mapper by its identifier.

````json
{"openapi":"3.1.0","info":{"title":"Admin API","version":"1.0.0"},"tags":[{"name":"Google Merchant Attribute Mapper","description":"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.\n\nA mapper can be tied to a single feed adapter or left global (no adapter), and the pair `(output_key, feed_adapter)` must be unique.\n\n## Core Capabilities\n\n**1. Listing & Filtering**\n* Retrieve a paginated list of attribute mappers.\n* Filter by the feed adapter they belong to with `?feed_adapter=<id>`.\n* Order results with the `sort` parameter, as described under **Filtering & Ordering**.\n\n**2. Full CRUD**\n* Create a mapper that binds an `output_key` to a `rule_set`, optionally scoped to a feed adapter.\n* Retrieve a single mapper, either directly or through the `/{id}/detailed/` alias, which returns the same representation.\n* Fully or partially update a mapper.\n* Delete a mapper. `DELETE` is a **hard delete** — the record is removed.\n\n## Mapper Fields\n\n| Field | Type | Description |\n|-------|------|-------------|\n| `id` | integer | The unique identifier of the mapper. Assigned by the server; supplying it in a request body has no effect. |\n| `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. |\n| `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**. |\n| `feed_adapter` | integer | The identifier of the feed adapter this mapper is scoped to, or `null` for a global mapper. Optional. |\n\n## Rule Set\n\n`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:\n\n```json\n{\n  \"shared_kwargs\": { },\n  \"rule\":   { \"rule_type\": \"<rule>\", \"rule_kwargs\": { } },\n  \"action\": { \"action_type\": \"<action>\", \"action_kwargs\": { } }\n}\n```\n\n| Part | Accepted values |\n|------|-----------------|\n| `rule_type` | `query`, `always`, `in_dict`, `attributeexists`, `multiattributeexists` |\n| `action_type` | `stdout`, `attrgetter`, `outputdict`, `attrformatter`, `multiattrformatter` |\n\n> **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.\n\n## Filtering & Ordering\n\nThe 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.\n\n## Dynamic Settings & Environment Variables\n\nNo 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."}],"servers":[{"description":"Omnitron Remote Proxy (external access — recommended)","url":"https://{omnitron_url}/api/v1/remote/{channel_id}","variables":{"omnitron_url":{"default":"sandbox.akinon.com","description":"Omnitron server URL (e.g., {omnitron.akinon.com})"},"channel_id":{"default":"1","description":"The channel identifier the remote request is routed through"}}},{"description":"Commerce API Server (internal / direct access only)","url":"https://{commerce_url}/api/v1","variables":{"commerce_url":{"default":"sandbox.akinon.com","description":"Internal commerce server URL, reachable only from within the Omnitron network"}}}],"security":[{"tokenAuth":[]}],"components":{"securitySchemes":{"tokenAuth":{"type":"apiKey","in":"header","name":"Authorization","description":"Token credential sent in the Authorization header, in the form: `Token <your-token>`. Requires a staff (admin) account."}},"schemas":{"GoogleMerchantAttributeMapper":{"type":"object","description":"A Google Merchant attribute mapper — the rule set that computes one field of a Google Merchant Center feed from a source product.","properties":{"id":{"type":"integer","readOnly":true,"description":"The unique identifier of the mapper."},"output_key":{"type":"string","maxLength":255,"description":"The name of the feed field this mapper produces (e.g. `title`, `gtin`)."},"rule_set":{"$ref":"#/components/schemas/GoogleMerchantRuleSet"},"feed_adapter":{"type":["integer","null"],"description":"The identifier of the feed adapter this mapper is scoped to, or `null` for a global mapper."}}},"GoogleMerchantRuleSet":{"type":"array","description":"The ordered list of rules used to compute a feed field's value. It is evaluated top-down when the feed is built and the first matching rule's action produces the value. The contents are not validated when the mapper is written — a malformed rule is accepted here and skipped later, at feed-generation time.","items":{"type":"object","properties":{"shared_kwargs":{"type":"object","description":"Arguments merged into both the rule's and the action's keyword arguments."},"rule":{"type":"object","description":"The condition that decides whether this element applies to a product.","properties":{"rule_type":{"type":"string","description":"The kind of condition.","enum":["query","always","in_dict","attributeexists","multiattributeexists"]},"rule_kwargs":{"type":"object","description":"Arguments passed to the rule."}}},"action":{"type":"object","description":"How the output value is produced when the rule matches.","properties":{"action_type":{"type":"string","description":"The kind of action.","enum":["stdout","attrgetter","outputdict","attrformatter","multiattrformatter"]},"action_kwargs":{"type":"object","description":"Arguments passed to the action."}}}},"additionalProperties":true}},"Error":{"type":"object","description":"An error response.","properties":{"detail":{"type":"string","description":"A human-readable description of the error."}},"additionalProperties":true}},"responses":{"Unauthorized":{"description":"Authentication credentials were not provided or are invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"Forbidden":{"description":"The authenticated user does not have administrator privileges.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"GoogleMerchantAttributeMapperNotFound":{"description":"No attribute mapper exists with the given identifier.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"paths":{"/google_merchant_attribute_mapper/{id}/":{"get":{"tags":["Google Merchant Attribute Mapper"],"operationId":"retrieveGoogleMerchantAttributeMapper","summary":"Retrieve an attribute mapper","description":"Returns a single Google Merchant attribute mapper by its identifier.","responses":{"200":{"description":"The requested attribute mapper.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoogleMerchantAttributeMapper"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/GoogleMerchantAttributeMapperNotFound"}}}}}}
````


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://apidocs.akinon.com/commerce-openapis/admin/google-merchant-attribute-mapper/retrieve-an-attribute-mapper.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
