jpskill.com
🛠️ 開発・MCP コミュニティ 🔴 エンジニア向け 👤 エンジニア・AI開発者

🛠️ Google Merchant

google-merchant

Google Merchant Center(グーグルマーチャントセンター

⏱ MCPサーバー実装 1日 → 2時間

📺 まず動画で見る(YouTube)

▶ 【衝撃】最強のAIエージェント「Claude Code」の最新機能・使い方・プログラミングをAIで効率化する超実践術を解説! ↗

※ jpskill.com 編集部が参考用に選んだ動画です。動画の内容と Skill の挙動は厳密には一致しないことがあります。

📜 元の英語説明(参考)

Google Merchant Center API integration with managed OAuth. Manage products, inventories, data sources, promotions, and reports for Google Shopping. Use this skill when users want to manage their Merchant Center product catalog, check product status, configure data sources, or analyze shopping performance. For other third party apps, use the api-gateway skill (https://clawhub.ai/byungkyu/api-gateway). Requires network access and valid Maton API key.

🇯🇵 日本人クリエイター向け解説

一言でいうと

Google Merchant Center(グーグルマーチャントセンター

※ jpskill.com 編集部が日本のビジネス現場向けに補足した解説です。Skill本体の挙動とは独立した参考情報です。

⚡ おすすめ: コマンド1行でインストール(60秒)

下記のコマンドをコピーしてターミナル(Mac/Linux)または PowerShell(Windows)に貼り付けてください。 ダウンロード → 解凍 → 配置まで全自動。

🍎 Mac / 🐧 Linux
mkdir -p ~/.claude/skills && cd ~/.claude/skills && curl -L -o google-merchant.zip https://jpskill.com/download/4870.zip && unzip -o google-merchant.zip && rm google-merchant.zip
🪟 Windows (PowerShell)
$d = "$env:USERPROFILE\.claude\skills"; ni -Force -ItemType Directory $d | Out-Null; iwr https://jpskill.com/download/4870.zip -OutFile "$d\google-merchant.zip"; Expand-Archive "$d\google-merchant.zip" -DestinationPath $d -Force; ri "$d\google-merchant.zip"

完了後、Claude Code を再起動 → 普通に「動画プロンプト作って」のように話しかけるだけで自動発動します。

💾 手動でダウンロードしたい(コマンドが難しい人向け)
  1. 1. 下の青いボタンを押して google-merchant.zip をダウンロード
  2. 2. ZIPファイルをダブルクリックで解凍 → google-merchant フォルダができる
  3. 3. そのフォルダを C:\Users\あなたの名前\.claude\skills\(Win)または ~/.claude/skills/(Mac)へ移動
  4. 4. Claude Code を再起動

⚠️ ダウンロード・利用は自己責任でお願いします。当サイトは内容・動作・安全性について責任を負いません。

🎯 このSkillでできること

下記の説明文を読むと、このSkillがあなたに何をしてくれるかが分かります。Claudeにこの分野の依頼をすると、自動で発動します。

📦 インストール方法 (3ステップ)

  1. 1. 上の「ダウンロード」ボタンを押して .skill ファイルを取得
  2. 2. ファイル名の拡張子を .skill から .zip に変えて展開(macは自動展開可)
  3. 3. 展開してできたフォルダを、ホームフォルダの .claude/skills/ に置く
    • · macOS / Linux: ~/.claude/skills/
    • · Windows: %USERPROFILE%\.claude\skills\

Claude Code を再起動すれば完了。「このSkillを使って…」と話しかけなくても、関連する依頼で自動的に呼び出されます。

詳しい使い方ガイドを見る →
最終更新
2026-05-17
取得日時
2026-05-18
同梱ファイル
2

💬 こう話しかけるだけ — サンプルプロンプト

  • Google Merchant を使って、最小構成のサンプルコードを示して
  • Google Merchant の主な使い方と注意点を教えて
  • Google Merchant を既存プロジェクトに組み込む方法を教えて

これをClaude Code に貼るだけで、このSkillが自動発動します。

📖 Skill本文(日本語訳)

※ 原文(英語/中国語)を Gemini で日本語化したものです。Claude 自身は原文を読みます。誤訳がある場合は原文をご確認ください。

Google Merchant Center

マネージド OAuth 認証で Google Merchant Center API にアクセスします。Google ショッピングのプロダクト、在庫、プロモーション、データソース、レポートを管理できます。

クイックスタート

# List products in your Merchant Center account
python <<'EOF'
import urllib.request, os, json
req = urllib.request.Request('https://gateway.maton.ai/google-merchant/products/v1/accounts/{accountId}/products')
req.add_header('Authorization', f'Bearer {os.environ["MATON_API_KEY"]}')
print(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))
EOF

ベース URL

https://gateway.maton.ai/google-merchant/{sub-api}/{version}/accounts/{accountId}/{resource}

Merchant API はモジュール式のサブ API 構造を使用しています。以下を置き換えてください。

  • {sub-api} をサービスに置き換えます: products, accounts, datasources, reports, promotions, inventories, notifications, conversions
  • {version}v1 に置き換えます
  • {accountId} を Merchant Center アカウント ID に置き換えます

ゲートウェイは merchantapi.googleapis.com へのリクエストをプロキシし、OAuth トークンを自動的に挿入します。

重要: v1 API を使用するには、一度限りの開発者登録が必要です。開発者登録セクションを参照してください。

認証

すべてのリクエストには、Authorization ヘッダーに Maton API キーが必要です。

Authorization: Bearer $MATON_API_KEY

環境変数: API キーを MATON_API_KEY として設定してください。

export MATON_API_KEY="YOUR_API_KEY"

API キーの取得

  1. maton.ai にサインインするか、アカウントを作成します。
  2. maton.ai/settings にアクセスします。
  3. API キーをコピーします。

Merchant Center アカウント ID の検索

Merchant Center アカウント ID は数値の識別子です。見つけるには:

  1. Google Merchant Center にログインします。
  2. URL を確認してください。アカウント ID が含まれています: https://merchants.google.com/mc/overview?a=ACCOUNT_ID

開発者登録

重要: v1 API を使用する前に、アカウントを API に関連付けるための一度限りの開発者登録を完了する必要があります。

ステップ 1: アカウント ID の取得

オプション A: まず API 経由で取得を試す

v1beta エンドポイントを使用してアカウントのリストを試してください。これが機能すれば、アカウント ID を自動的に取得できます。

python <<'EOF'
import urllib.request, os, json
req = urllib.request.Request('https://gateway.maton.ai/google-merchant/accounts/v1beta/accounts')
req.add_header('Authorization', f'Bearer {os.environ["MATON_API_KEY"]}')
try:
    result = json.load(urllib.request.urlopen(req))
    for account in result.get('accounts', []):
        print(f"Account ID: {account['accountId']}, Name: {account['accountName']}")
except Exception as e:
    print(f"v1beta not available - use Option B to get your account ID manually")
EOF

オプション B: Merchant Center UI から (オプション A が失敗した場合)

v1beta エンドポイントが利用できない場合、またはエラーを返す場合:

  1. Google Merchant Center にログインします。
  2. アカウント ID は URL にあります: https://merchants.google.com/mc/overview?a=YOUR_ACCOUNT_ID

たとえば、URL が https://merchants.google.com/mc/overview?a=123456789 の場合、アカウント ID は 123456789 です。

ステップ 2: API アクセスの登録

アカウント ID とメールアドレスを使用して registerGcp エンドポイントを呼び出します。

python <<'EOF'
import urllib.request, os, json

account_id = 'YOUR_ACCOUNT_ID'  # From Step 1
developer_email = 'your-email@example.com'  # Your Google account email

data = json.dumps({'developerEmail': developer_email}).encode()
req = urllib.request.Request(
    f'https://gateway.maton.ai/google-merchant/accounts/v1/accounts/{account_id}/developerRegistration:registerGcp',
    data=data,
    method='POST'
)
req.add_header('Authorization', f'Bearer {os.environ["MATON_API_KEY"]}')
req.add_header('Content-Type', 'application/json')

result = json.load(urllib.request.urlopen(req))
print(json.dumps(result, indent=2))
EOF

レスポンス:

{
  "name": "accounts/123456789/developerRegistration",
  "gcpIds": ["216141799266"]
}

ステップ 3: 登録の確認

登録後、v1 エンドポイントが機能するようになります。

python <<'EOF'
import urllib.request, os, json
account_id = 'YOUR_ACCOUNT_ID'
req = urllib.request.Request(f'https://gateway.maton.ai/google-merchant/accounts/v1/accounts/{account_id}')
req.add_header('Authorization', f'Bearer {os.environ["MATON_API_KEY"]}')
print(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))
EOF

注: 登録は Merchant Center アカウントごとに一度だけ行えば十分です。登録後、そのアカウントのすべての v1 エンドポイントが機能するようになります。

接続管理

Google Merchant OAuth 接続は https://ctrl.maton.ai で管理できます。

接続のリスト表示

python <<'EOF'
import urllib.request, os, json
req = urllib.request.Request('https://ctrl.maton.ai/connections?app=google-merchant&status=ACTIVE')
req.add_header('Authorization', f'Bearer {os.environ["MATON_API_KEY"]}')
print(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))
EOF

接続の作成

python <<'EOF'
import urllib.request, os, json
data = json.dumps({'app': 'google-merchant'}).encode()
req = urllib.request.Request('https://ctrl.maton.ai/connections', data=data, method='POST')
req.add_header('Authorization', f'Bearer {os.environ["MATON_API_KEY"]}')
req.add_header('Content-Type', 'application/json')
print(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))
EOF

接続の取得

python <<'EOF'
import urllib.request, os, json
req = urllib.request.Request('https://ctrl.maton.ai/connections/{connection_id}')
req.add_header('Authorization', f'Bearer {os.environ["MATON_API_KEY"]}')
print(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))
EOF

レスポンス:

{
  "connection": {
    "connection_id": "00726960-095e-47e2-92e6-6e9cdf3e40a1",
    "status": "ACTIVE",
    "creation_time": "2026-02-07T06:41:22.751289Z",
    "last_updated_time": "2026-02-07T06:42:29.411979Z"
📜 原文 SKILL.md(Claudeが読む英語/中国語)を展開

Google Merchant Center

Access the Google Merchant Center API with managed OAuth authentication. Manage products, inventories, promotions, data sources, and reports for Google Shopping.

Quick Start

# List products in your Merchant Center account
python <<'EOF'
import urllib.request, os, json
req = urllib.request.Request('https://gateway.maton.ai/google-merchant/products/v1/accounts/{accountId}/products')
req.add_header('Authorization', f'Bearer {os.environ["MATON_API_KEY"]}')
print(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))
EOF

Base URL

https://gateway.maton.ai/google-merchant/{sub-api}/{version}/accounts/{accountId}/{resource}

The Merchant API uses a modular sub-API structure. Replace:

  • {sub-api} with the service: products, accounts, datasources, reports, promotions, inventories, notifications, conversions
  • {version} with v1
  • {accountId} with your Merchant Center account ID

The gateway proxies requests to merchantapi.googleapis.com and automatically injects your OAuth token.

Important: The v1 API requires one-time developer registration. See Developer Registration section.

Authentication

All requests require the Maton API key in the Authorization header:

Authorization: Bearer $MATON_API_KEY

Environment Variable: Set your API key as MATON_API_KEY:

export MATON_API_KEY="YOUR_API_KEY"

Getting Your API Key

  1. Sign in or create an account at maton.ai
  2. Go to maton.ai/settings
  3. Copy your API key

Finding Your Merchant Center Account ID

Your Merchant Center account ID is a numeric identifier. To find it:

  1. Log in to Google Merchant Center
  2. Look at the URL - it contains your account ID: https://merchants.google.com/mc/overview?a=ACCOUNT_ID

Developer Registration

Important: Before using the v1 API, you must complete a one-time developer registration to associate your account with the API.

Step 1: Get Your Account ID

Option A: Try fetching via API first

Try listing accounts using the v1beta endpoint. If this works, you can get your account ID automatically:

python <<'EOF'
import urllib.request, os, json
req = urllib.request.Request('https://gateway.maton.ai/google-merchant/accounts/v1beta/accounts')
req.add_header('Authorization', f'Bearer {os.environ["MATON_API_KEY"]}')
try:
    result = json.load(urllib.request.urlopen(req))
    for account in result.get('accounts', []):
        print(f"Account ID: {account['accountId']}, Name: {account['accountName']}")
except Exception as e:
    print(f"v1beta not available - use Option B to get your account ID manually")
EOF

Option B: From Merchant Center UI (if Option A fails)

If the v1beta endpoint is unavailable or returns an error:

  1. Log in to Google Merchant Center
  2. Your account ID is in the URL: https://merchants.google.com/mc/overview?a=YOUR_ACCOUNT_ID

For example, if your URL is https://merchants.google.com/mc/overview?a=123456789, your account ID is 123456789.

Step 2: Register for API Access

Call the registerGcp endpoint with your account ID and email:

python <<'EOF'
import urllib.request, os, json

account_id = 'YOUR_ACCOUNT_ID'  # From Step 1
developer_email = 'your-email@example.com'  # Your Google account email

data = json.dumps({'developerEmail': developer_email}).encode()
req = urllib.request.Request(
    f'https://gateway.maton.ai/google-merchant/accounts/v1/accounts/{account_id}/developerRegistration:registerGcp',
    data=data,
    method='POST'
)
req.add_header('Authorization', f'Bearer {os.environ["MATON_API_KEY"]}')
req.add_header('Content-Type', 'application/json')

result = json.load(urllib.request.urlopen(req))
print(json.dumps(result, indent=2))
EOF

Response:

{
  "name": "accounts/123456789/developerRegistration",
  "gcpIds": ["216141799266"]
}

Step 3: Verify Registration

After registration, v1 endpoints will work:

python <<'EOF'
import urllib.request, os, json
account_id = 'YOUR_ACCOUNT_ID'
req = urllib.request.Request(f'https://gateway.maton.ai/google-merchant/accounts/v1/accounts/{account_id}')
req.add_header('Authorization', f'Bearer {os.environ["MATON_API_KEY"]}')
print(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))
EOF

Note: Registration only needs to be done once per Merchant Center account. After registration, all v1 endpoints will work for that account.

Connection Management

Manage your Google Merchant OAuth connections at https://ctrl.maton.ai.

List Connections

python <<'EOF'
import urllib.request, os, json
req = urllib.request.Request('https://ctrl.maton.ai/connections?app=google-merchant&status=ACTIVE')
req.add_header('Authorization', f'Bearer {os.environ["MATON_API_KEY"]}')
print(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))
EOF

Create Connection

python <<'EOF'
import urllib.request, os, json
data = json.dumps({'app': 'google-merchant'}).encode()
req = urllib.request.Request('https://ctrl.maton.ai/connections', data=data, method='POST')
req.add_header('Authorization', f'Bearer {os.environ["MATON_API_KEY"]}')
req.add_header('Content-Type', 'application/json')
print(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))
EOF

Get Connection

python <<'EOF'
import urllib.request, os, json
req = urllib.request.Request('https://ctrl.maton.ai/connections/{connection_id}')
req.add_header('Authorization', f'Bearer {os.environ["MATON_API_KEY"]}')
print(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))
EOF

Response:

{
  "connection": {
    "connection_id": "00726960-095e-47e2-92e6-6e9cdf3e40a1",
    "status": "ACTIVE",
    "creation_time": "2026-02-07T06:41:22.751289Z",
    "last_updated_time": "2026-02-07T06:42:29.411979Z",
    "url": "https://connect.maton.ai/?session_token=...",
    "app": "google-merchant",
    "metadata": {}
  }
}

Open the returned url in a browser to complete OAuth authorization.

Delete Connection

python <<'EOF'
import urllib.request, os, json
req = urllib.request.Request('https://ctrl.maton.ai/connections/{connection_id}', method='DELETE')
req.add_header('Authorization', f'Bearer {os.environ["MATON_API_KEY"]}')
print(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))
EOF

Specifying Connection

If you have multiple Google Merchant connections, specify which one to use with the Maton-Connection header:

python <<'EOF'
import urllib.request, os, json
req = urllib.request.Request('https://gateway.maton.ai/google-merchant/products/v1/accounts/123456/products')
req.add_header('Authorization', f'Bearer {os.environ["MATON_API_KEY"]}')
req.add_header('Maton-Connection', '00726960-095e-47e2-92e6-6e9cdf3e40a1')
print(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))
EOF

If omitted, the gateway uses the default (oldest) active connection.

API Reference

Sub-API Structure

The Merchant API is organized into sub-APIs:

Sub-API Purpose Version
products Product catalog management v1
accounts Account settings and users v1
datasources Data source configuration v1
reports Analytics and reporting v1
promotions Promotional offers (requires enrollment) v1
inventories Local and regional inventory v1
notifications Webhook subscriptions v1
conversions Conversion tracking v1

Accounts

List Accounts

GET /google-merchant/accounts/v1/accounts

Returns all Merchant Center accounts accessible with your OAuth credentials. Use this to find your account ID.

Get Account

GET /google-merchant/accounts/v1/accounts/{accountId}

List Sub-accounts

GET /google-merchant/accounts/v1/accounts/{accountId}:listSubaccounts

Note: This endpoint only works for multi-client accounts (MCAs). Standard merchant accounts will receive a 403 error.

Get Business Info

GET /google-merchant/accounts/v1/accounts/{accountId}/businessInfo

Update Business Info

PATCH /google-merchant/accounts/v1/accounts/{accountId}/businessInfo?updateMask=customerService
Content-Type: application/json

{
  "customerService": {
    "email": "support@example.com"
  }
}

Get Homepage

GET /google-merchant/accounts/v1/accounts/{accountId}/homepage

Get Shipping Settings

GET /google-merchant/accounts/v1/accounts/{accountId}/shippingSettings

Insert Shipping Settings

POST /google-merchant/accounts/v1/accounts/{accountId}/shippingSettings:insert
Content-Type: application/json

{
  "services": [
    {
      "serviceName": "Standard Shipping",
      "deliveryCountries": ["US"],
      "currencyCode": "USD",
      "deliveryTime": {
        "minTransitDays": 3,
        "maxTransitDays": 7,
        "minHandlingDays": 0,
        "maxHandlingDays": 1
      },
      "rateGroups": [
        {
          "singleValue": {
            "flatRate": {
              "amountMicros": "0",
              "currencyCode": "USD"
            }
          }
        }
      ],
      "active": true
    }
  ]
}

List Users

GET /google-merchant/accounts/v1/accounts/{accountId}/users

Get User

GET /google-merchant/accounts/v1/accounts/{accountId}/users/{email}

List Programs

GET /google-merchant/accounts/v1/accounts/{accountId}/programs

List Regions

GET /google-merchant/accounts/v1/accounts/{accountId}/regions

List Account Issues

GET /google-merchant/accounts/v1/accounts/{accountId}/issues

List Online Return Policies

GET /google-merchant/accounts/v1/accounts/{accountId}/onlineReturnPolicies

Products

List Products

GET /google-merchant/products/v1/accounts/{accountId}/products

Query parameters:

  • pageSize (integer): Maximum results per page
  • pageToken (string): Pagination token

Get Product

GET /google-merchant/products/v1/accounts/{accountId}/products/{productId}

Product ID format: contentLanguage~feedLabel~offerId (e.g., en~US~sku123)

Insert Product Input

POST /google-merchant/products/v1/accounts/{accountId}/productInputs:insert?dataSource=accounts/{accountId}/dataSources/{dataSourceId}
Content-Type: application/json

{
  "offerId": "sku123",
  "contentLanguage": "en",
  "feedLabel": "US",
  "productAttributes": {
    "title": "Product Title",
    "description": "Product description",
    "link": "https://example.com/product",
    "imageLink": "https://example.com/image.jpg",
    "availability": "in_stock",
    "price": {
      "amountMicros": "19990000",
      "currencyCode": "USD"
    },
    "condition": "new"
  }
}

Note: Products can only be inserted into data sources with input: "API" type. Create an API data source first if needed.

Delete Product Input

DELETE /google-merchant/products/v1/accounts/{accountId}/productInputs/{productId}?dataSource=accounts/{accountId}/dataSources/{dataSourceId}

Inventories

List Local Inventories

GET /google-merchant/inventories/v1/accounts/{accountId}/products/{productId}/localInventories

Note: Local inventories are only available for products with LOCAL channel. Use a product ID like local~en~US~sku123.

Insert Local Inventory

POST /google-merchant/inventories/v1/accounts/{accountId}/products/{productId}/localInventories:insert
Content-Type: application/json

{
  "storeCode": "store123"
}

Note: The storeCode must be a valid store code configured in your Merchant Center account. Additional inventory attributes may be available - refer to the Google Merchant API Reference for the complete field list.

List Regional Inventories

GET /google-merchant/inventories/v1/accounts/{accountId}/products/{productId}/regionalInventories

Data Sources

List Data Sources

GET /google-merchant/datasources/v1/accounts/{accountId}/dataSources

Get Data Source

GET /google-merchant/datasources/v1/accounts/{accountId}/dataSources/{dataSourceId}

Create Data Source

POST /google-merchant/datasources/v1/accounts/{accountId}/dataSources
Content-Type: application/json

{
  "displayName": "API Data Source",
  "primaryProductDataSource": {
    "feedLabel": "US",
    "contentLanguage": "en"
  }
}

Response:

{
  "name": "accounts/123456/dataSources/789",
  "dataSourceId": "789",
  "displayName": "API Data Source",
  "primaryProductDataSource": {
    "feedLabel": "US",
    "contentLanguage": "en"
  },
  "input": "API"
}

Update Data Source

PATCH /google-merchant/datasources/v1/accounts/{accountId}/dataSources/{dataSourceId}?updateMask=displayName
Content-Type: application/json

{
  "displayName": "Updated Name"
}

Delete Data Source

DELETE /google-merchant/datasources/v1/accounts/{accountId}/dataSources/{dataSourceId}

Fetch Data Source (trigger immediate refresh)

POST /google-merchant/datasources/v1/accounts/{accountId}/dataSources/{dataSourceId}:fetch

Note: Fetch only works for data sources with FILE input type. API and UI data sources cannot be fetched.

Reports

Search Reports

POST /google-merchant/reports/v1/accounts/{accountId}/reports:search
Content-Type: application/json

{
  "query": "SELECT offer_id, title, clicks, impressions FROM product_performance_view WHERE date BETWEEN '2026-01-01' AND '2026-01-31'"
}

Example: Query product_view (requires id field):

{
  "query": "SELECT id, offer_id, title, item_issues FROM product_view LIMIT 10"
}

Note: The product_view table requires the id field in the SELECT clause.

Available report tables:

  • product_performance_view - Clicks, impressions, CTR by product
  • product_view - Current inventory with attributes and issues (requires id in SELECT)
  • price_competitiveness_product_view - Pricing vs competitors (requires Market Insights)
  • price_insights_product_view - Suggested pricing
  • best_sellers_product_cluster_view - Best sellers by category (requires Market Insights)
  • competitive_visibility_competitor_view - Competitor visibility

Promotions

Note: Promotions require your Merchant Center account to be enrolled in the Promotions program. You'll receive a 403 error if not enrolled.

List Promotions

GET /google-merchant/promotions/v1/accounts/{accountId}/promotions

Get Promotion

GET /google-merchant/promotions/v1/accounts/{accountId}/promotions/{promotionId}

Insert Promotion

POST /google-merchant/promotions/v1/accounts/{accountId}/promotions:insert
Content-Type: application/json

{
  "promotionId": "promo123",
  "contentLanguage": "en",
  "targetCountry": "US",
  "redemptionChannel": ["ONLINE"],
  "attributes": {
    "longTitle": "20% off all products",
    "promotionEffectiveDates": "2026-02-01T00:00:00Z/2026-02-28T23:59:59Z"
  }
}

Notifications

List Notification Subscriptions

GET /google-merchant/notifications/v1/accounts/{accountId}/notificationsubscriptions

Create Notification Subscription

POST /google-merchant/notifications/v1/accounts/{accountId}/notificationsubscriptions
Content-Type: application/json

{
  "registeredEvent": "PRODUCT_STATUS_CHANGE",
  "callBackUri": "https://example.com/webhook",
  "allManagedAccounts": true
}

Note: You must specify either allManagedAccounts: true OR targetAccount: "accounts/{accountId}" to indicate which accounts the subscription applies to.

Alternative with targetAccount:

{
  "registeredEvent": "PRODUCT_STATUS_CHANGE",
  "callBackUri": "https://example.com/webhook",
  "targetAccount": "accounts/123456789"
}

Delete Notification Subscription

DELETE /google-merchant/notifications/v1/accounts/{accountId}/notificationsubscriptions/{subscriptionId}

Conversion Sources

List Conversion Sources

GET /google-merchant/conversions/v1/accounts/{accountId}/conversionSources

Create Conversion Source

POST /google-merchant/conversions/v1/accounts/{accountId}/conversionSources
Content-Type: application/json

{
  "merchantCenterDestination": {
    "displayName": "My Conversion Source",
    "destination": "SHOPPING_ADS",
    "currencyCode": "USD",
    "attributionSettings": {
      "attributionLookbackWindowDays": 30,
      "attributionModel": "CROSS_CHANNEL_LAST_CLICK"
    }
  }
}

Delete Conversion Source

DELETE /google-merchant/conversions/v1/accounts/{accountId}/conversionSources/{conversionSourceId}

Pagination

The API uses token-based pagination:

GET /google-merchant/products/v1/accounts/{accountId}/products?pageSize=50

Response includes nextPageToken when more results exist:

{
  "products": [...],
  "nextPageToken": "CAE..."
}

Use the token for the next page:

GET /google-merchant/products/v1/accounts/{accountId}/products?pageSize=50&pageToken=CAE...

Code Examples

JavaScript

const accountId = '123456789';
const response = await fetch(
  `https://gateway.maton.ai/google-merchant/products/v1/accounts/${accountId}/products`,
  {
    headers: {
      'Authorization': `Bearer ${process.env.MATON_API_KEY}`
    }
  }
);
const data = await response.json();

Python

import os
import requests

account_id = '123456789'
response = requests.get(
    f'https://gateway.maton.ai/google-merchant/products/v1/accounts/{account_id}/products',
    headers={'Authorization': f'Bearer {os.environ["MATON_API_KEY"]}'}
)
data = response.json()

Notes

  • Developer registration required - You must complete Developer Registration once per Merchant Center account before using v1 endpoints
  • Product IDs use the format contentLanguage~feedLabel~offerId (e.g., en~US~sku123)
  • Products can only be inserted/updated/deleted in data sources with input: "API" type
  • After inserting/updating a product, it may take several minutes before the processed product appears
  • Monetary values use micros (divide by 1,000,000 for actual value)
  • Local inventories only work for products with LOCAL channel (not ONLINE)
  • The Promotions API requires your account to be enrolled in the Promotions program
  • List Sub-accounts only works for multi-client accounts (MCAs)
  • IMPORTANT: When using curl commands, use curl -g when URLs contain brackets to disable glob parsing
  • IMPORTANT: When piping curl output to jq or other commands, environment variables like $MATON_API_KEY may not expand correctly in some shell environments

Error Handling

Status Meaning
400 Invalid request or missing Google Merchant connection
401 Invalid/missing Maton API key, or GCP project not registered (see Developer Registration)
403 Permission denied - account not enrolled in required program or feature not available
404 Resource not found
429 Rate limited
4xx/5xx Passthrough error from Google Merchant API

Common Errors

"GCP project is not registered": You need to complete developer registration. See Developer Registration section.

"The caller does not have access to the accounts": The specified account ID is not accessible with your OAuth credentials. Verify you have access to the Merchant Center account.

"Promotion program not enabled": Your Merchant Center account is not enrolled in the Promotions program. Enable it in Merchant Center settings.

"This method can only be accessed by multi-client accounts": You're calling an endpoint (like listSubaccounts) that only works for multi-client accounts (MCAs).

"Mismatched channel": You're trying to access local inventories for an ONLINE product. Local inventories only work with LOCAL channel products.

Troubleshooting: API Key Issues

  1. Check that the MATON_API_KEY environment variable is set:
echo $MATON_API_KEY
  1. Verify the API key is valid by listing connections:
python <<'EOF'
import urllib.request, os, json
req = urllib.request.Request('https://ctrl.maton.ai/connections')
req.add_header('Authorization', f'Bearer {os.environ["MATON_API_KEY"]}')
print(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))
EOF

Troubleshooting: Invalid App Name

Ensure your URL path starts with google-merchant. For example:

  • Correct: https://gateway.maton.ai/google-merchant/products/v1/accounts/{accountId}/products
  • Incorrect: https://gateway.maton.ai/products/v1/accounts/{accountId}/products

Troubleshooting: 401 GCP Project Not Registered

If you see an error like "GCP project is not registered with the merchant account":

  1. Complete developer registration - See Developer Registration section
  2. Get your account ID from Merchant Center UI (in the URL after ?a=)
  3. Call the registerGcp endpoint with your account ID and email
  4. After successful registration, retry your original request

Resources

同梱ファイル

※ ZIPに含まれるファイル一覧。`SKILL.md` 本体に加え、参考資料・サンプル・スクリプトが入っている場合があります。