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

Create an attribute mapper

Creates a Google Merchant attribute mapper.

output_key and rule_set are both required; feed_adapter is optional and may be omitted or null for a global mapper. The identifier is assigned by the server; an id sent in the request body is ignored.

The pair (output_key, feed_adapter) must be unique. A mapper that repeats a pair already stored is rejected with 406 Not Acceptable.

post
/google_merchant_attribute_mapper/
Authorizations
AuthorizationstringRequired

Token credential sent in the Authorization header, in the form: Token <your-token>. Requires a staff (admin) account.

Body

The body of a Google Merchant attribute mapper create or full update request.

output_keystring · max: 255Required

The name of the feed field this mapper produces. Non-blank.

feed_adapterinteger · nullableOptional

The identifier of the feed adapter to scope the mapper to. Optional; omit or send null for a global mapper. Must reference an existing feed adapter when given.

Responses
201

The created attribute mapper.

application/json

A Google Merchant attribute mapper — the rule set that computes one field of a Google Merchant Center feed from a source product.

idintegerRead-onlyOptional

The unique identifier of the mapper.

output_keystring · max: 255Optional

The name of the feed field this mapper produces (e.g. title, gtin).

feed_adapterinteger · nullableOptional

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

post/google_merchant_attribute_mapper/
POST /api/v1/remote/1/google_merchant_attribute_mapper/ HTTP/1.1
Host: sandbox.akinon.com
Authorization: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 208

{
  "output_key": "gtin",
  "feed_adapter": 3,
  "rule_set": [
    {
      "rule": {
        "rule_type": "attributeexists",
        "rule_kwargs": {
          "attribute": "barcode"
        }
      },
      "action": {
        "action_type": "attrgetter",
        "action_kwargs": {
          "attribute": "barcode"
        }
      }
    }
  ]
}
{
  "id": 12,
  "output_key": "gtin",
  "feed_adapter": 3,
  "rule_set": [
    {
      "rule": {
        "rule_type": "attributeexists",
        "rule_kwargs": {
          "attribute": "barcode"
        }
      },
      "action": {
        "action_type": "attrgetter",
        "action_kwargs": {
          "attribute": "barcode"
        }
      }
    }
  ]
}

Last updated

Was this helpful?