[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M77W608BY27ESHVVH1AE9SJS":3,"skill-same:01M77W608BY27ESHVVH1AE9SJS":65},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":15,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":33,"commitSha":34,"skillDirectory":35,"forksCount":36,"repositoryHtmlUrl":37,"repositoryHomepageUrl":6,"ownerHtmlUrl":38,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":39,"install":40,"resources":53},"01M77W608BY27ESHVVH1AE9SJS","google-merchant",null,"Google Merchant Center API integration with managed OAuth. Manage products, inventories, data sources, promotions, and reports for Google Shopping.\nUse this skill when users want to manage their Merchant Center product catalog, check product status, configure data sources, or analyze shopping performance.\nFor other third party apps, use the api-gateway skill (https:\u002F\u002Fclawhub.ai\u002Fbyungkyu\u002Fapi-gateway).\nRequires network access and valid Maton API key.","Jinhong270\u002FAI-Agent","Jinhong270","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F193703602?v=4","01M77SB4J7ATDYATSD7AW4B8XP","01M77SB4JWRQWNGTTR291BHMQP",3,"MIT","https:\u002F\u002Fgithub.com\u002FJinhong270\u002FAI-Agent\u002Fblob\u002Fmain\u002FXiao-Q\u002Fskills\u002Fgoogle-merchant\u002FLICENSE.txt","https:\u002F\u002Fgithub.com\u002FJinhong270\u002FAI-Agent\u002Fblob\u002Fmain\u002FXiao-Q\u002Fskills\u002Fgoogle-merchant\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: google-merchant\ndescription: |\n  Google Merchant Center API integration with managed OAuth. Manage products, inventories, data sources, promotions, and reports for Google Shopping.\n  Use this skill when users want to manage their Merchant Center product catalog, check product status, configure data sources, or analyze shopping performance.\n  For other third party apps, use the api-gateway skill (https:\u002F\u002Fclawhub.ai\u002Fbyungkyu\u002Fapi-gateway).\n  Requires network access and valid Maton API key.\nmetadata:\n  author: maton\n  version: \"1.0\"\n  clawdbot:\n    emoji: 🧠\n    requires:\n      env:\n        - MATON_API_KEY\n---\n\n# Google Merchant Center\n\nAccess the Google Merchant Center API with managed OAuth authentication. Manage products, inventories, promotions, data sources, and reports for Google Shopping.\n\n## Quick Start\n\n```bash\n# List products in your Merchant Center account\npython \u003C\u003C'EOF'\nimport urllib.request, os, json\nreq = urllib.request.Request('https:\u002F\u002Fgateway.maton.ai\u002Fgoogle-merchant\u002Fproducts\u002Fv1\u002Faccounts\u002F{accountId}\u002Fproducts')\nreq.add_header('Authorization', f'Bearer {os.environ[\"MATON_API_KEY\"]}')\nprint(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))\nEOF\n```\n\n## Base URL\n\n```\nhttps:\u002F\u002Fgateway.maton.ai\u002Fgoogle-merchant\u002F{sub-api}\u002F{version}\u002Faccounts\u002F{accountId}\u002F{resource}\n```\n\nThe Merchant API uses a modular sub-API structure. Replace:\n- `{sub-api}` with the service: `products`, `accounts`, `datasources`, `reports`, `promotions`, `inventories`, `notifications`, `conversions`\n- `{version}` with `v1`\n- `{accountId}` with your Merchant Center account ID\n\nThe gateway proxies requests to `merchantapi.googleapis.com` and automatically injects your OAuth token.\n\n**Important:** The v1 API requires one-time developer registration. See [Developer Registration](#developer-registration) section.\n\n## Authentication\n\nAll requests require the Maton API key in the Authorization header:\n\n```\nAuthorization: Bearer $MATON_API_KEY\n```\n\n**Environment Variable:** Set your API key as `MATON_API_KEY`:\n\n```bash\nexport MATON_API_KEY=\"YOUR_API_KEY\"\n```\n\n### Getting Your API Key\n\n1. Sign in or create an account at [maton.ai](https:\u002F\u002Fmaton.ai)\n2. Go to [maton.ai\u002Fsettings](https:\u002F\u002Fmaton.ai\u002Fsettings)\n3. Copy your API key\n\n### Finding Your Merchant Center Account ID\n\nYour Merchant Center account ID is a numeric identifier. To find it:\n\n1. Log in to [Google Merchant Center](https:\u002F\u002Fmerchants.google.com\u002F)\n2. Look at the URL - it contains your account ID: `https:\u002F\u002Fmerchants.google.com\u002Fmc\u002Foverview?a=ACCOUNT_ID`\n\n## Developer Registration\n\n**Important:** Before using the v1 API, you must complete a one-time developer registration to associate your account with the API.\n\n### Step 1: Get Your Account ID\n\n**Option A: Try fetching via API first**\n\nTry listing accounts using the v1beta endpoint. If this works, you can get your account ID automatically:\n\n```bash\npython \u003C\u003C'EOF'\nimport urllib.request, os, json\nreq = urllib.request.Request('https:\u002F\u002Fgateway.maton.ai\u002Fgoogle-merchant\u002Faccounts\u002Fv1beta\u002Faccounts')\nreq.add_header('Authorization', f'Bearer {os.environ[\"MATON_API_KEY\"]}')\ntry:\n    result = json.load(urllib.request.urlopen(req))\n    for account in result.get('accounts', []):\n        print(f\"Account ID: {account['accountId']}, Name: {account['accountName']}\")\nexcept Exception as e:\n    print(f\"v1beta not available - use Option B to get your account ID manually\")\nEOF\n```\n\n**Option B: From Merchant Center UI (if Option A fails)**\n\nIf the v1beta endpoint is unavailable or returns an error:\n\n1. Log in to [Google Merchant Center](https:\u002F\u002Fmerchants.google.com\u002F)\n2. Your account ID is in the URL: `https:\u002F\u002Fmerchants.google.com\u002Fmc\u002Foverview?a=YOUR_ACCOUNT_ID`\n\nFor example, if your URL is `https:\u002F\u002Fmerchants.google.com\u002Fmc\u002Foverview?a=123456789`, your account ID is `123456789`.\n\n### Step 2: Register for API Access\n\nCall the `registerGcp` endpoint with your account ID and email:\n\n```bash\npython \u003C\u003C'EOF'\nimport urllib.request, os, json\n\naccount_id = 'YOUR_ACCOUNT_ID'  # From Step 1\ndeveloper_email = 'your-email@example.com'  # Your Google account email\n\ndata = json.dumps({'developerEmail': developer_email}).encode()\nreq = urllib.request.Request(\n    f'https:\u002F\u002Fgateway.maton.ai\u002Fgoogle-merchant\u002Faccounts\u002Fv1\u002Faccounts\u002F{account_id}\u002FdeveloperRegistration:registerGcp',\n    data=data,\n    method='POST'\n)\nreq.add_header('Authorization', f'Bearer {os.environ[\"MATON_API_KEY\"]}')\nreq.add_header('Content-Type', 'application\u002Fjson')\n\nresult = json.load(urllib.request.urlopen(req))\nprint(json.dumps(result, indent=2))\nEOF\n```\n\n**Response:**\n```json\n{\n  \"name\": \"accounts\u002F123456789\u002FdeveloperRegistration\",\n  \"gcpIds\": [\"216141799266\"]\n}\n```\n\n### Step 3: Verify Registration\n\nAfter registration, v1 endpoints will work:\n\n```bash\npython \u003C\u003C'EOF'\nimport urllib.request, os, json\naccount_id = 'YOUR_ACCOUNT_ID'\nreq = urllib.request.Request(f'https:\u002F\u002Fgateway.maton.ai\u002Fgoogle-merchant\u002Faccounts\u002Fv1\u002Faccounts\u002F{account_id}')\nreq.add_header('Authorization', f'Bearer {os.environ[\"MATON_API_KEY\"]}')\nprint(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))\nEOF\n```\n\n**Note:** Registration only needs to be done once per Merchant Center account. After registration, all v1 endpoints will work for that account.\n\n## Connection Management\n\nManage your Google Merchant OAuth connections at `https:\u002F\u002Fctrl.maton.ai`.\n\n### List Connections\n\n```bash\npython \u003C\u003C'EOF'\nimport urllib.request, os, json\nreq = urllib.request.Request('https:\u002F\u002Fctrl.maton.ai\u002Fconnections?app=google-merchant&status=ACTIVE')\nreq.add_header('Authorization', f'Bearer {os.environ[\"MATON_API_KEY\"]}')\nprint(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))\nEOF\n```\n\n### Create Connection\n\n```bash\npython \u003C\u003C'EOF'\nimport urllib.request, os, json\ndata = json.dumps({'app': 'google-merchant'}).encode()\nreq = urllib.request.Request('https:\u002F\u002Fctrl.maton.ai\u002Fconnections', data=data, method='POST')\nreq.add_header('Authorization', f'Bearer {os.environ[\"MATON_API_KEY\"]}')\nreq.add_header('Content-Type', 'application\u002Fjson')\nprint(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))\nEOF\n```\n\n### Get Connection\n\n```bash\npython \u003C\u003C'EOF'\nimport urllib.request, os, json\nreq = urllib.request.Request('https:\u002F\u002Fctrl.maton.ai\u002Fconnections\u002F{connection_id}')\nreq.add_header('Authorization', f'Bearer {os.environ[\"MATON_API_KEY\"]}')\nprint(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))\nEOF\n```\n\n**Response:**\n```json\n{\n  \"connection\": {\n    \"connection_id\": \"00726960-095e-47e2-92e6-6e9cdf3e40a1\",\n    \"status\": \"ACTIVE\",\n    \"creation_time\": \"2026-02-07T06:41:22.751289Z\",\n    \"last_updated_time\": \"2026-02-07T06:42:29.411979Z\",\n    \"url\": \"https:\u002F\u002Fconnect.maton.ai\u002F?session_token=...\",\n    \"app\": \"google-merchant\",\n    \"metadata\": {}\n  }\n}\n```\n\nOpen the returned `url` in a browser to complete OAuth authorization.\n\n### Delete Connection\n\n```bash\npython \u003C\u003C'EOF'\nimport urllib.request, os, json\nreq = urllib.request.Request('https:\u002F\u002Fctrl.maton.ai\u002Fconnections\u002F{connection_id}', method='DELETE')\nreq.add_header('Authorization', f'Bearer {os.environ[\"MATON_API_KEY\"]}')\nprint(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))\nEOF\n```\n\n### Specifying Connection\n\nIf you have multiple Google Merchant connections, specify which one to use with the `Maton-Connection` header:\n\n```bash\npython \u003C\u003C'EOF'\nimport urllib.request, os, json\nreq = urllib.request.Request('https:\u002F\u002Fgateway.maton.ai\u002Fgoogle-merchant\u002Fproducts\u002Fv1\u002Faccounts\u002F123456\u002Fproducts')\nreq.add_header('Authorization', f'Bearer {os.environ[\"MATON_API_KEY\"]}')\nreq.add_header('Maton-Connection', '00726960-095e-47e2-92e6-6e9cdf3e40a1')\nprint(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))\nEOF\n```\n\nIf omitted, the gateway uses the default (oldest) active connection.\n\n## API Reference\n\n### Sub-API Structure\n\nThe Merchant API is organized into sub-APIs:\n\n| Sub-API | Purpose | Version |\n|---------|---------|---------|\n| `products` | Product catalog management | v1 |\n| `accounts` | Account settings and users | v1 |\n| `datasources` | Data source configuration | v1 |\n| `reports` | Analytics and reporting | v1 |\n| `promotions` | Promotional offers (requires enrollment) | v1 |\n| `inventories` | Local and regional inventory | v1 |\n| `notifications` | Webhook subscriptions | v1 |\n| `conversions` | Conversion tracking | v1 |\n\n### Accounts\n\n#### List Accounts\n\n```bash\nGET \u002Fgoogle-merchant\u002Faccounts\u002Fv1\u002Faccounts\n```\n\nReturns all Merchant Center accounts accessible with your OAuth credentials. Use this to find your account ID.\n\n#### Get Account\n\n```bash\nGET \u002Fgoogle-merchant\u002Faccounts\u002Fv1\u002Faccounts\u002F{accountId}\n```\n\n#### List Sub-accounts\n\n```bash\nGET \u002Fgoogle-merchant\u002Faccounts\u002Fv1\u002Faccounts\u002F{accountId}:listSubaccounts\n```\n\n**Note:** This endpoint only works for multi-client accounts (MCAs). Standard merchant accounts will receive a 403 error.\n\n#### Get Business Info\n\n```bash\nGET \u002Fgoogle-merchant\u002Faccounts\u002Fv1\u002Faccounts\u002F{accountId}\u002FbusinessInfo\n```\n\n#### Update Business Info\n\n```bash\nPATCH \u002Fgoogle-merchant\u002Faccounts\u002Fv1\u002Faccounts\u002F{accountId}\u002FbusinessInfo?updateMask=customerService\nContent-Type: application\u002Fjson\n\n{\n  \"customerService\": {\n    \"email\": \"support@example.com\"\n  }\n}\n```\n\n#### Get Homepage\n\n```bash\nGET \u002Fgoogle-merchant\u002Faccounts\u002Fv1\u002Faccounts\u002F{accountId}\u002Fhomepage\n```\n\n#### Get Shipping Settings\n\n```bash\nGET \u002Fgoogle-merchant\u002Faccounts\u002Fv1\u002Faccounts\u002F{accountId}\u002FshippingSettings\n```\n\n#### Insert Shipping Settings\n\n```bash\nPOST \u002Fgoogle-merchant\u002Faccounts\u002Fv1\u002Faccounts\u002F{accountId}\u002FshippingSettings:insert\nContent-Type: application\u002Fjson\n\n{\n  \"services\": [\n    {\n      \"serviceName\": \"Standard Shipping\",\n      \"deliveryCountries\": [\"US\"],\n      \"currencyCode\": \"USD\",\n      \"deliveryTime\": {\n        \"minTransitDays\": 3,\n        \"maxTransitDays\": 7,\n        \"minHandlingDays\": 0,\n        \"maxHandlingDays\": 1\n      },\n      \"rateGroups\": [\n        {\n          \"singleValue\": {\n            \"flatRate\": {\n              \"amountMicros\": \"0\",\n              \"currencyCode\": \"USD\"\n            }\n          }\n        }\n      ],\n      \"active\": true\n    }\n  ]\n}\n```\n\n#### List Users\n\n```bash\nGET \u002Fgoogle-merchant\u002Faccounts\u002Fv1\u002Faccounts\u002F{accountId}\u002Fusers\n```\n\n#### Get User\n\n```bash\nGET \u002Fgoogle-merchant\u002Faccounts\u002Fv1\u002Faccounts\u002F{accountId}\u002Fusers\u002F{email}\n```\n\n#### List Programs\n\n```bash\nGET \u002Fgoogle-merchant\u002Faccounts\u002Fv1\u002Faccounts\u002F{accountId}\u002Fprograms\n```\n\n#### List Regions\n\n```bash\nGET \u002Fgoogle-merchant\u002Faccounts\u002Fv1\u002Faccounts\u002F{accountId}\u002Fregions\n```\n\n#### List Account Issues\n\n```bash\nGET \u002Fgoogle-merchant\u002Faccounts\u002Fv1\u002Faccounts\u002F{accountId}\u002Fissues\n```\n\n#### List Online Return Policies\n\n```bash\nGET \u002Fgoogle-merchant\u002Faccounts\u002Fv1\u002Faccounts\u002F{accountId}\u002FonlineReturnPolicies\n```\n\n### Products\n\n#### List Products\n\n```bash\nGET \u002Fgoogle-merchant\u002Fproducts\u002Fv1\u002Faccounts\u002F{accountId}\u002Fproducts\n```\n\nQuery parameters:\n- `pageSize` (integer): Maximum results per page\n- `pageToken` (string): Pagination token\n\n#### Get Product\n\n```bash\nGET \u002Fgoogle-merchant\u002Fproducts\u002Fv1\u002Faccounts\u002F{accountId}\u002Fproducts\u002F{productId}\n```\n\nProduct ID format: `contentLanguage~feedLabel~offerId` (e.g., `en~US~sku123`)\n\n#### Insert Product Input\n\n```bash\nPOST \u002Fgoogle-merchant\u002Fproducts\u002Fv1\u002Faccounts\u002F{accountId}\u002FproductInputs:insert?dataSource=accounts\u002F{accountId}\u002FdataSources\u002F{dataSourceId}\nContent-Type: application\u002Fjson\n\n{\n  \"offerId\": \"sku123\",\n  \"contentLanguage\": \"en\",\n  \"feedLabel\": \"US\",\n  \"productAttributes\": {\n    \"title\": \"Product Title\",\n    \"description\": \"Product description\",\n    \"link\": \"https:\u002F\u002Fexample.com\u002Fproduct\",\n    \"imageLink\": \"https:\u002F\u002Fexample.com\u002Fimage.jpg\",\n    \"availability\": \"in_stock\",\n    \"price\": {\n      \"amountMicros\": \"19990000\",\n      \"currencyCode\": \"USD\"\n    },\n    \"condition\": \"new\"\n  }\n}\n```\n\n**Note:** Products can only be inserted into data sources with `input: \"API\"` type. Create an API data source first if needed.\n\n#### Delete Product Input\n\n```bash\nDELETE \u002Fgoogle-merchant\u002Fproducts\u002Fv1\u002Faccounts\u002F{accountId}\u002FproductInputs\u002F{productId}?dataSource=accounts\u002F{accountId}\u002FdataSources\u002F{dataSourceId}\n```\n\n### Inventories\n\n#### List Local Inventories\n\n```bash\nGET \u002Fgoogle-merchant\u002Finventories\u002Fv1\u002Faccounts\u002F{accountId}\u002Fproducts\u002F{productId}\u002FlocalInventories\n```\n\n**Note:** Local inventories are only available for products with `LOCAL` channel. Use a product ID like `local~en~US~sku123`.\n\n#### Insert Local Inventory\n\n```bash\nPOST \u002Fgoogle-merchant\u002Finventories\u002Fv1\u002Faccounts\u002F{accountId}\u002Fproducts\u002F{productId}\u002FlocalInventories:insert\nContent-Type: application\u002Fjson\n\n{\n  \"storeCode\": \"store123\"\n}\n```\n\n**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](https:\u002F\u002Fdevelopers.google.com\u002Fmerchant\u002Fapi\u002Freference\u002Frest) for the complete field list.\n\n#### List Regional Inventories\n\n```bash\nGET \u002Fgoogle-merchant\u002Finventories\u002Fv1\u002Faccounts\u002F{accountId}\u002Fproducts\u002F{productId}\u002FregionalInventories\n```\n\n### Data Sources\n\n#### List Data Sources\n\n```bash\nGET \u002Fgoogle-merchant\u002Fdatasources\u002Fv1\u002Faccounts\u002F{accountId}\u002FdataSources\n```\n\n#### Get Data Source\n\n```bash\nGET \u002Fgoogle-merchant\u002Fdatasources\u002Fv1\u002Faccounts\u002F{accountId}\u002FdataSources\u002F{dataSourceId}\n```\n\n#### Create Data Source\n\n```bash\nPOST \u002Fgoogle-merchant\u002Fdatasources\u002Fv1\u002Faccounts\u002F{accountId}\u002FdataSources\nContent-Type: application\u002Fjson\n\n{\n  \"displayName\": \"API Data Source\",\n  \"primaryProductDataSource\": {\n    \"feedLabel\": \"US\",\n    \"contentLanguage\": \"en\"\n  }\n}\n```\n\n**Response:**\n```json\n{\n  \"name\": \"accounts\u002F123456\u002FdataSources\u002F789\",\n  \"dataSourceId\": \"789\",\n  \"displayName\": \"API Data Source\",\n  \"primaryProductDataSource\": {\n    \"feedLabel\": \"US\",\n    \"contentLanguage\": \"en\"\n  },\n  \"input\": \"API\"\n}\n```\n\n#### Update Data Source\n\n```bash\nPATCH \u002Fgoogle-merchant\u002Fdatasources\u002Fv1\u002Faccounts\u002F{accountId}\u002FdataSources\u002F{dataSourceId}?updateMask=displayName\nContent-Type: application\u002Fjson\n\n{\n  \"displayName\": \"Updated Name\"\n}\n```\n\n#### Delete Data Source\n\n```bash\nDELETE \u002Fgoogle-merchant\u002Fdatasources\u002Fv1\u002Faccounts\u002F{accountId}\u002FdataSources\u002F{dataSourceId}\n```\n\n#### Fetch Data Source (trigger immediate refresh)\n\n```bash\nPOST \u002Fgoogle-merchant\u002Fdatasources\u002Fv1\u002Faccounts\u002F{accountId}\u002FdataSources\u002F{dataSourceId}:fetch\n```\n\n**Note:** Fetch only works for data sources with `FILE` input type. API and UI data sources cannot be fetched.\n\n### Reports\n\n#### Search Reports\n\n```bash\nPOST \u002Fgoogle-merchant\u002Freports\u002Fv1\u002Faccounts\u002F{accountId}\u002Freports:search\nContent-Type: application\u002Fjson\n\n{\n  \"query\": \"SELECT offer_id, title, clicks, impressions FROM product_performance_view WHERE date BETWEEN '2026-01-01' AND '2026-01-31'\"\n}\n```\n\n**Example: Query product_view (requires `id` field):**\n```json\n{\n  \"query\": \"SELECT id, offer_id, title, item_issues FROM product_view LIMIT 10\"\n}\n```\n\n**Note:** The `product_view` table requires the `id` field in the SELECT clause.\n\nAvailable report tables:\n- `product_performance_view` - Clicks, impressions, CTR by product\n- `product_view` - Current inventory with attributes and issues (requires `id` in SELECT)\n- `price_competitiveness_product_view` - Pricing vs competitors (requires Market Insights)\n- `price_insights_product_view` - Suggested pricing\n- `best_sellers_product_cluster_view` - Best sellers by category (requires Market Insights)\n- `competitive_visibility_competitor_view` - Competitor visibility\n\n### Promotions\n\n**Note:** Promotions require your Merchant Center account to be enrolled in the Promotions program. You'll receive a 403 error if not enrolled.\n\n#### List Promotions\n\n```bash\nGET \u002Fgoogle-merchant\u002Fpromotions\u002Fv1\u002Faccounts\u002F{accountId}\u002Fpromotions\n```\n\n#### Get Promotion\n\n```bash\nGET \u002Fgoogle-merchant\u002Fpromotions\u002Fv1\u002Faccounts\u002F{accountId}\u002Fpromotions\u002F{promotionId}\n```\n\n#### Insert Promotion\n\n```bash\nPOST \u002Fgoogle-merchant\u002Fpromotions\u002Fv1\u002Faccounts\u002F{accountId}\u002Fpromotions:insert\nContent-Type: application\u002Fjson\n\n{\n  \"promotionId\": \"promo123\",\n  \"contentLanguage\": \"en\",\n  \"targetCountry\": \"US\",\n  \"redemptionChannel\": [\"ONLINE\"],\n  \"attributes\": {\n    \"longTitle\": \"20% off all products\",\n    \"promotionEffectiveDates\": \"2026-02-01T00:00:00Z\u002F2026-02-28T23:59:59Z\"\n  }\n}\n```\n\n### Notifications\n\n#### List Notification Subscriptions\n\n```bash\nGET \u002Fgoogle-merchant\u002Fnotifications\u002Fv1\u002Faccounts\u002F{accountId}\u002Fnotificationsubscriptions\n```\n\n#### Create Notification Subscription\n\n```bash\nPOST \u002Fgoogle-merchant\u002Fnotifications\u002Fv1\u002Faccounts\u002F{accountId}\u002Fnotificationsubscriptions\nContent-Type: application\u002Fjson\n\n{\n  \"registeredEvent\": \"PRODUCT_STATUS_CHANGE\",\n  \"callBackUri\": \"https:\u002F\u002Fexample.com\u002Fwebhook\",\n  \"allManagedAccounts\": true\n}\n```\n\n**Note:** You must specify either `allManagedAccounts: true` OR `targetAccount: \"accounts\u002F{accountId}\"` to indicate which accounts the subscription applies to.\n\n**Alternative with targetAccount:**\n```json\n{\n  \"registeredEvent\": \"PRODUCT_STATUS_CHANGE\",\n  \"callBackUri\": \"https:\u002F\u002Fexample.com\u002Fwebhook\",\n  \"targetAccount\": \"accounts\u002F123456789\"\n}\n```\n\n#### Delete Notification Subscription\n\n```bash\nDELETE \u002Fgoogle-merchant\u002Fnotifications\u002Fv1\u002Faccounts\u002F{accountId}\u002Fnotificationsubscriptions\u002F{subscriptionId}\n```\n\n### Conversion Sources\n\n#### List Conversion Sources\n\n```bash\nGET \u002Fgoogle-merchant\u002Fconversions\u002Fv1\u002Faccounts\u002F{accountId}\u002FconversionSources\n```\n\n#### Create Conversion Source\n\n```bash\nPOST \u002Fgoogle-merchant\u002Fconversions\u002Fv1\u002Faccounts\u002F{accountId}\u002FconversionSources\nContent-Type: application\u002Fjson\n\n{\n  \"merchantCenterDestination\": {\n    \"displayName\": \"My Conversion Source\",\n    \"destination\": \"SHOPPING_ADS\",\n    \"currencyCode\": \"USD\",\n    \"attributionSettings\": {\n      \"attributionLookbackWindowDays\": 30,\n      \"attributionModel\": \"CROSS_CHANNEL_LAST_CLICK\"\n    }\n  }\n}\n```\n\n#### Delete Conversion Source\n\n```bash\nDELETE \u002Fgoogle-merchant\u002Fconversions\u002Fv1\u002Faccounts\u002F{accountId}\u002FconversionSources\u002F{conversionSourceId}\n```\n\n## Pagination\n\nThe API uses token-based pagination:\n\n```bash\nGET \u002Fgoogle-merchant\u002Fproducts\u002Fv1\u002Faccounts\u002F{accountId}\u002Fproducts?pageSize=50\n```\n\nResponse includes `nextPageToken` when more results exist:\n\n```json\n{\n  \"products\": [...],\n  \"nextPageToken\": \"CAE...\"\n}\n```\n\nUse the token for the next page:\n\n```bash\nGET \u002Fgoogle-merchant\u002Fproducts\u002Fv1\u002Faccounts\u002F{accountId}\u002Fproducts?pageSize=50&pageToken=CAE...\n```\n\n## Code Examples\n\n### JavaScript\n\n```javascript\nconst accountId = '123456789';\nconst response = await fetch(\n  `https:\u002F\u002Fgateway.maton.ai\u002Fgoogle-merchant\u002Fproducts\u002Fv1\u002Faccounts\u002F${accountId}\u002Fproducts`,\n  {\n    headers: {\n      'Authorization': `Bearer ${process.env.MATON_API_KEY}`\n    }\n  }\n);\nconst data = await response.json();\n```\n\n### Python\n\n```python\nimport os\nimport requests\n\naccount_id = '123456789'\nresponse = requests.get(\n    f'https:\u002F\u002Fgateway.maton.ai\u002Fgoogle-merchant\u002Fproducts\u002Fv1\u002Faccounts\u002F{account_id}\u002Fproducts',\n    headers={'Authorization': f'Bearer {os.environ[\"MATON_API_KEY\"]}'}\n)\ndata = response.json()\n```\n\n## Notes\n\n- **Developer registration required** - You must complete [Developer Registration](#developer-registration) once per Merchant Center account before using v1 endpoints\n- Product IDs use the format `contentLanguage~feedLabel~offerId` (e.g., `en~US~sku123`)\n- Products can only be inserted\u002Fupdated\u002Fdeleted in data sources with `input: \"API\"` type\n- After inserting\u002Fupdating a product, it may take several minutes before the processed product appears\n- Monetary values use micros (divide by 1,000,000 for actual value)\n- Local inventories only work for products with `LOCAL` channel (not `ONLINE`)\n- The Promotions API requires your account to be enrolled in the Promotions program\n- List Sub-accounts only works for multi-client accounts (MCAs)\n- IMPORTANT: When using curl commands, use `curl -g` when URLs contain brackets to disable glob parsing\n- IMPORTANT: When piping curl output to `jq` or other commands, environment variables like `$MATON_API_KEY` may not expand correctly in some shell environments\n\n## Error Handling\n\n| Status | Meaning |\n|--------|---------|\n| 400 | Invalid request or missing Google Merchant connection |\n| 401 | Invalid\u002Fmissing Maton API key, or GCP project not registered (see [Developer Registration](#developer-registration)) |\n| 403 | Permission denied - account not enrolled in required program or feature not available |\n| 404 | Resource not found |\n| 429 | Rate limited |\n| 4xx\u002F5xx | Passthrough error from Google Merchant API |\n\n### Common Errors\n\n**\"GCP project is not registered\"**: You need to complete developer registration. See [Developer Registration](#developer-registration) section.\n\n**\"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.\n\n**\"Promotion program not enabled\"**: Your Merchant Center account is not enrolled in the Promotions program. Enable it in Merchant Center settings.\n\n**\"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).\n\n**\"Mismatched channel\"**: You're trying to access local inventories for an ONLINE product. Local inventories only work with LOCAL channel products.\n\n### Troubleshooting: API Key Issues\n\n1. Check that the `MATON_API_KEY` environment variable is set:\n\n```bash\necho $MATON_API_KEY\n```\n\n2. Verify the API key is valid by listing connections:\n\n```bash\npython \u003C\u003C'EOF'\nimport urllib.request, os, json\nreq = urllib.request.Request('https:\u002F\u002Fctrl.maton.ai\u002Fconnections')\nreq.add_header('Authorization', f'Bearer {os.environ[\"MATON_API_KEY\"]}')\nprint(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))\nEOF\n```\n\n### Troubleshooting: Invalid App Name\n\nEnsure your URL path starts with `google-merchant`. For example:\n\n- Correct: `https:\u002F\u002Fgateway.maton.ai\u002Fgoogle-merchant\u002Fproducts\u002Fv1\u002Faccounts\u002F{accountId}\u002Fproducts`\n- Incorrect: `https:\u002F\u002Fgateway.maton.ai\u002Fproducts\u002Fv1\u002Faccounts\u002F{accountId}\u002Fproducts`\n\n### Troubleshooting: 401 GCP Project Not Registered\n\nIf you see an error like \"GCP project is not registered with the merchant account\":\n\n1. **Complete developer registration** - See [Developer Registration](#developer-registration) section\n2. Get your account ID from Merchant Center UI (in the URL after `?a=`)\n3. Call the `registerGcp` endpoint with your account ID and email\n4. After successful registration, retry your original request\n\n## Resources\n\n- [Merchant API Overview](https:\u002F\u002Fdevelopers.google.com\u002Fmerchant\u002Fapi\u002Foverview)\n- [Merchant API Reference](https:\u002F\u002Fdevelopers.google.com\u002Fmerchant\u002Fapi\u002Freference\u002Frest)\n- [Products Guide](https:\u002F\u002Fdevelopers.google.com\u002Fmerchant\u002Fapi\u002Fguides\u002Fproducts\u002Foverview)\n- [Data Sources Guide](https:\u002F\u002Fdevelopers.google.com\u002Fmerchant\u002Fapi\u002Fguides\u002Fdatasources)\n- [Reports Guide](https:\u002F\u002Fdevelopers.google.com\u002Fmerchant\u002Fapi\u002Fguides\u002Freports)\n- [Product Data Specification](https:\u002F\u002Fsupport.google.com\u002Fmerchants\u002Fanswer\u002F7052112)\n- [Maton Community](https:\u002F\u002Fdiscord.com\u002Finvite\u002FdBfFAcefs2)\n- [Maton Support](mailto:support@maton.ai)\n","# Google Merchant Center\n\nAccess the Google Merchant Center API with managed OAuth authentication. Manage products, inventories, promotions, data sources, and reports for Google Shopping.\n\n## Quick Start\n\n```bash\n# List products in your Merchant Center account\npython \u003C\u003C'EOF'\nimport urllib.request, os, json\nreq = urllib.request.Request('https:\u002F\u002Fgateway.maton.ai\u002Fgoogle-merchant\u002Fproducts\u002Fv1\u002Faccounts\u002F{accountId}\u002Fproducts')\nreq.add_header('Authorization', f'Bearer {os.environ[\"MATON_API_KEY\"]}')\nprint(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))\nEOF\n```\n\n## Base URL\n\n```\nhttps:\u002F\u002Fgateway.maton.ai\u002Fgoogle-merchant\u002F{sub-api}\u002F{version}\u002Faccounts\u002F{accountId}\u002F{resource}\n```\n\nThe Merchant API uses a modular sub-API structure. Replace:\n- `{sub-api}` with the service: `products`, `accounts`, `datasources`, `reports`, `promotions`, `inventories`, `notifications`, `conversions`\n- `{version}` with `v1`\n- `{accountId}` with your Merchant Center account ID\n\nThe gateway proxies requests to `merchantapi.googleapis.com` and automatically injects your OAuth token.\n\n**Important:** The v1 API requires one-time developer registration. See [Developer Registration](#developer-registration) section.\n\n## Authentication\n\nAll requests require the Maton API key in the Authorization header:\n\n```\nAuthorization: Bearer $MATON_API_KEY\n```\n\n**Environment Variable:** Set your API key as `MATON_API_KEY`:\n\n```bash\nexport MATON_API_KEY=\"YOUR_API_KEY\"\n```\n\n### Getting Your API Key\n\n1. Sign in or create an account at [maton.ai](https:\u002F\u002Fmaton.ai)\n2. Go to [maton.ai\u002Fsettings](https:\u002F\u002Fmaton.ai\u002Fsettings)\n3. Copy your API key\n\n### Finding Your Merchant Center Account ID\n\nYour Merchant Center account ID is a numeric identifier. To find it:\n\n1. Log in to [Google Merchant Center](https:\u002F\u002Fmerchants.google.com\u002F)\n2. Look at the URL - it contains your account ID: `https:\u002F\u002Fmerchants.google.com\u002Fmc\u002Foverview?a=ACCOUNT_ID`\n\n## Developer Registration\n\n**Important:** Before using the v1 API, you must complete a one-time developer registration to associate your account with the API.\n\n### Step 1: Get Your Account ID\n\n**Option A: Try fetching via API first**\n\nTry listing accounts using the v1beta endpoint. If this works, you can get your account ID automatically:\n\n```bash\npython \u003C\u003C'EOF'\nimport urllib.request, os, json\nreq = urllib.request.Request('https:\u002F\u002Fgateway.maton.ai\u002Fgoogle-merchant\u002Faccounts\u002Fv1beta\u002Faccounts')\nreq.add_header('Authorization', f'Bearer {os.environ[\"MATON_API_KEY\"]}')\ntry:\n    result = json.load(urllib.request.urlopen(req))\n    for account in result.get('accounts', []):\n        print(f\"Account ID: {account['accountId']}, Name: {account['accountName']}\")\nexcept Exception as e:\n    print(f\"v1beta not available - use Option B to get your account ID manually\")\nEOF\n```\n\n**Option B: From Merchant Center UI (if Option A fails)**\n\nIf the v1beta endpoint is unavailable or returns an error:\n\n1. Log in to [Google Merchant Center](https:\u002F\u002Fmerchants.google.com\u002F)\n2. Your account ID is in the URL: `https:\u002F\u002Fmerchants.google.com\u002Fmc\u002Foverview?a=YOUR_ACCOUNT_ID`\n\nFor example, if your URL is `https:\u002F\u002Fmerchants.google.com\u002Fmc\u002Foverview?a=123456789`, your account ID is `123456789`.\n\n### Step 2: Register for API Access\n\nCall the `registerGcp` endpoint with your account ID and email:\n\n```bash\npython \u003C\u003C'EOF'\nimport urllib.request, os, json\n\naccount_id = 'YOUR_ACCOUNT_ID'  # From Step 1\ndeveloper_email = 'your-email@example.com'  # Your Google account email\n\ndata = json.dumps({'developerEmail': developer_email}).encode()\nreq = urllib.request.Request(\n    f'https:\u002F\u002Fgateway.maton.ai\u002Fgoogle-merchant\u002Faccounts\u002Fv1\u002Faccounts\u002F{account_id}\u002FdeveloperRegistration:registerGcp',\n    data=data,\n    method='POST'\n)\nreq.add_header('Authorization', f'Bearer {os.environ[\"MATON_API_KEY\"]}')\nreq.add_header('Content-Type', 'application\u002Fjson')\n\nresult = json.load(urllib.request.urlopen(req))\nprint(json.dumps(result, indent=2))\nEOF\n```\n\n**Response:**\n```json\n{\n  \"name\": \"accounts\u002F123456789\u002FdeveloperRegistration\",\n  \"gcpIds\": [\"216141799266\"]\n}\n```\n\n### Step 3: Verify Registration\n\nAfter registration, v1 endpoints will work:\n\n```bash\npython \u003C\u003C'EOF'\nimport urllib.request, os, json\naccount_id = 'YOUR_ACCOUNT_ID'\nreq = urllib.request.Request(f'https:\u002F\u002Fgateway.maton.ai\u002Fgoogle-merchant\u002Faccounts\u002Fv1\u002Faccounts\u002F{account_id}')\nreq.add_header('Authorization', f'Bearer {os.environ[\"MATON_API_KEY\"]}')\nprint(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))\nEOF\n```\n\n**Note:** Registration only needs to be done once per Merchant Center account. After registration, all v1 endpoints will work for that account.\n\n## Connection Management\n\nManage your Google Merchant OAuth connections at `https:\u002F\u002Fctrl.maton.ai`.\n\n### List Connections\n\n```bash\npython \u003C\u003C'EOF'\nimport urllib.request, os, json\nreq = urllib.request.Request('https:\u002F\u002Fctrl.maton.ai\u002Fconnections?app=google-merchant&status=ACTIVE')\nreq.add_header('Authorization', f'Bearer {os.environ[\"MATON_API_KEY\"]}')\nprint(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))\nEOF\n```\n\n### Create Connection\n\n```bash\npython \u003C\u003C'EOF'\nimport urllib.request, os, json\ndata = json.dumps({'app': 'google-merchant'}).encode()\nreq = urllib.request.Request('https:\u002F\u002Fctrl.maton.ai\u002Fconnections', data=data, method='POST')\nreq.add_header('Authorization', f'Bearer {os.environ[\"MATON_API_KEY\"]}')\nreq.add_header('Content-Type', 'application\u002Fjson')\nprint(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))\nEOF\n```\n\n### Get Connection\n\n```bash\npython \u003C\u003C'EOF'\nimport urllib.request, os, json\nreq = urllib.request.Request('https:\u002F\u002Fctrl.maton.ai\u002Fconnections\u002F{connection_id}')\nreq.add_header('Authorization', f'Bearer {os.environ[\"MATON_API_KEY\"]}')\nprint(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))\nEOF\n```\n\n**Response:**\n```json\n{\n  \"connection\": {\n    \"connection_id\": \"00726960-095e-47e2-92e6-6e9cdf3e40a1\",\n    \"status\": \"ACTIVE\",\n    \"creation_time\": \"2026-02-07T06:41:22.751289Z\",\n    \"last_updated_time\": \"2026-02-07T06:42:29.411979Z\",\n    \"url\": \"https:\u002F\u002Fconnect.maton.ai\u002F?session_token=...\",\n    \"app\": \"google-merchant\",\n    \"metadata\": {}\n  }\n}\n```\n\nOpen the returned `url` in a browser to complete OAuth authorization.\n\n### Delete Connection\n\n```bash\npython \u003C\u003C'EOF'\nimport urllib.request, os, json\nreq = urllib.request.Request('https:\u002F\u002Fctrl.maton.ai\u002Fconnections\u002F{connection_id}', method='DELETE')\nreq.add_header('Authorization', f'Bearer {os.environ[\"MATON_API_KEY\"]}')\nprint(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))\nEOF\n```\n\n### Specifying Connection\n\nIf you have multiple Google Merchant connections, specify which one to use with the `Maton-Connection` header:\n\n```bash\npython \u003C\u003C'EOF'\nimport urllib.request, os, json\nreq = urllib.request.Request('https:\u002F\u002Fgateway.maton.ai\u002Fgoogle-merchant\u002Fproducts\u002Fv1\u002Faccounts\u002F123456\u002Fproducts')\nreq.add_header('Authorization', f'Bearer {os.environ[\"MATON_API_KEY\"]}')\nreq.add_header('Maton-Connection', '00726960-095e-47e2-92e6-6e9cdf3e40a1')\nprint(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))\nEOF\n```\n\nIf omitted, the gateway uses the default (oldest) active connection.\n\n## API Reference\n\n### Sub-API Structure\n\nThe Merchant API is organized into sub-APIs:\n\n| Sub-API | Purpose | Version |\n|---------|---------|---------|\n| `products` | Product catalog management | v1 |\n| `accounts` | Account settings and users | v1 |\n| `datasources` | Data source configuration | v1 |\n| `reports` | Analytics and reporting | v1 |\n| `promotions` | Promotional offers (requires enrollment) | v1 |\n| `inventories` | Local and regional inventory | v1 |\n| `notifications` | Webhook subscriptions | v1 |\n| `conversions` | Conversion tracking | v1 |\n\n### Accounts\n\n#### List Accounts\n\n```bash\nGET \u002Fgoogle-merchant\u002Faccounts\u002Fv1\u002Faccounts\n```\n\nReturns all Merchant Center accounts accessible with your OAuth credentials. Use this to find your account ID.\n\n#### Get Account\n\n```bash\nGET \u002Fgoogle-merchant\u002Faccounts\u002Fv1\u002Faccounts\u002F{accountId}\n```\n\n#### List Sub-accounts\n\n```bash\nGET \u002Fgoogle-merchant\u002Faccounts\u002Fv1\u002Faccounts\u002F{accountId}:listSubaccounts\n```\n\n**Note:** This endpoint only works for multi-client accounts (MCAs). Standard merchant accounts will receive a 403 error.\n\n#### Get Business Info\n\n```bash\nGET \u002Fgoogle-merchant\u002Faccounts\u002Fv1\u002Faccounts\u002F{accountId}\u002FbusinessInfo\n```\n\n#### Update Business Info\n\n```bash\nPATCH \u002Fgoogle-merchant\u002Faccounts\u002Fv1\u002Faccounts\u002F{accountId}\u002FbusinessInfo?updateMask=customerService\nContent-Type: application\u002Fjson\n\n{\n  \"customerService\": {\n    \"email\": \"support@example.com\"\n  }\n}\n```\n\n#### Get Homepage\n\n```bash\nGET \u002Fgoogle-merchant\u002Faccounts\u002Fv1\u002Faccounts\u002F{accountId}\u002Fhomepage\n```\n\n#### Get Shipping Settings\n\n```bash\nGET \u002Fgoogle-merchant\u002Faccounts\u002Fv1\u002Faccounts\u002F{accountId}\u002FshippingSettings\n```\n\n#### Insert Shipping Settings\n\n```bash\nPOST \u002Fgoogle-merchant\u002Faccounts\u002Fv1\u002Faccounts\u002F{accountId}\u002FshippingSettings:insert\nContent-Type: application\u002Fjson\n\n{\n  \"services\": [\n    {\n      \"serviceName\": \"Standard Shipping\",\n      \"deliveryCountries\": [\"US\"],\n      \"currencyCode\": \"USD\",\n      \"deliveryTime\": {\n        \"minTransitDays\": 3,\n        \"maxTransitDays\": 7,\n        \"minHandlingDays\": 0,\n        \"maxHandlingDays\": 1\n      },\n      \"rateGroups\": [\n        {\n          \"singleValue\": {\n            \"flatRate\": {\n              \"amountMicros\": \"0\",\n              \"currencyCode\": \"USD\"\n            }\n          }\n        }\n      ],\n      \"active\": true\n    }\n  ]\n}\n```\n\n#### List Users\n\n```bash\nGET \u002Fgoogle-merchant\u002Faccounts\u002Fv1\u002Faccounts\u002F{accountId}\u002Fusers\n```\n\n#### Get User\n\n```bash\nGET \u002Fgoogle-merchant\u002Faccounts\u002Fv1\u002Faccounts\u002F{accountId}\u002Fusers\u002F{email}\n```\n\n#### List Programs\n\n```bash\nGET \u002Fgoogle-merchant\u002Faccounts\u002Fv1\u002Faccounts\u002F{accountId}\u002Fprograms\n```\n\n#### List Regions\n\n```bash\nGET \u002Fgoogle-merchant\u002Faccounts\u002Fv1\u002Faccounts\u002F{accountId}\u002Fregions\n```\n\n#### List Account Issues\n\n```bash\nGET \u002Fgoogle-merchant\u002Faccounts\u002Fv1\u002Faccounts\u002F{accountId}\u002Fissues\n```\n\n#### List Online Return Policies\n\n```bash\nGET \u002Fgoogle-merchant\u002Faccounts\u002Fv1\u002Faccounts\u002F{accountId}\u002FonlineReturnPolicies\n```\n\n### Products\n\n#### List Products\n\n```bash\nGET \u002Fgoogle-merchant\u002Fproducts\u002Fv1\u002Faccounts\u002F{accountId}\u002Fproducts\n```\n\nQuery parameters:\n- `pageSize` (integer): Maximum results per page\n- `pageToken` (string): Pagination token\n\n#### Get Product\n\n```bash\nGET \u002Fgoogle-merchant\u002Fproducts\u002Fv1\u002Faccounts\u002F{accountId}\u002Fproducts\u002F{productId}\n```\n\nProduct ID format: `contentLanguage~feedLabel~offerId` (e.g., `en~US~sku123`)\n\n#### Insert Product Input\n\n```bash\nPOST \u002Fgoogle-merchant\u002Fproducts\u002Fv1\u002Faccounts\u002F{accountId}\u002FproductInputs:insert?dataSource=accounts\u002F{accountId}\u002FdataSources\u002F{dataSourceId}\nContent-Type: application\u002Fjson\n\n{\n  \"offerId\": \"sku123\",\n  \"contentLanguage\": \"en\",\n  \"feedLabel\": \"US\",\n  \"productAttributes\": {\n    \"title\": \"Product Title\",\n    \"description\": \"Product description\",\n    \"link\": \"https:\u002F\u002Fexample.com\u002Fproduct\",\n    \"imageLink\": \"https:\u002F\u002Fexample.com\u002Fimage.jpg\",\n    \"availability\": \"in_stock\",\n    \"price\": {\n      \"amountMicros\": \"19990000\",\n      \"currencyCode\": \"USD\"\n    },\n    \"condition\": \"new\"\n  }\n}\n```\n\n**Note:** Products can only be inserted into data sources with `input: \"API\"` type. Create an API data source first if needed.\n\n#### Delete Product Input\n\n```bash\nDELETE \u002Fgoogle-merchant\u002Fproducts\u002Fv1\u002Faccounts\u002F{accountId}\u002FproductInputs\u002F{productId}?dataSource=accounts\u002F{accountId}\u002FdataSources\u002F{dataSourceId}\n```\n\n### Inventories\n\n#### List Local Inventories\n\n```bash\nGET \u002Fgoogle-merchant\u002Finventories\u002Fv1\u002Faccounts\u002F{accountId}\u002Fproducts\u002F{productId}\u002FlocalInventories\n```\n\n**Note:** Local inventories are only available for products with `LOCAL` channel. Use a product ID like `local~en~US~sku123`.\n\n#### Insert Local Inventory\n\n```bash\nPOST \u002Fgoogle-merchant\u002Finventories\u002Fv1\u002Faccounts\u002F{accountId}\u002Fproducts\u002F{productId}\u002FlocalInventories:insert\nContent-Type: application\u002Fjson\n\n{\n  \"storeCode\": \"store123\"\n}\n```\n\n**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](https:\u002F\u002Fdevelopers.google.com\u002Fmerchant\u002Fapi\u002Freference\u002Frest) for the complete field list.\n\n#### List Regional Inventories\n\n```bash\nGET \u002Fgoogle-merchant\u002Finventories\u002Fv1\u002Faccounts\u002F{accountId}\u002Fproducts\u002F{productId}\u002FregionalInventories\n```\n\n### Data Sources\n\n#### List Data Sources\n\n```bash\nGET \u002Fgoogle-merchant\u002Fdatasources\u002Fv1\u002Faccounts\u002F{accountId}\u002FdataSources\n```\n\n#### Get Data Source\n\n```bash\nGET \u002Fgoogle-merchant\u002Fdatasources\u002Fv1\u002Faccounts\u002F{accountId}\u002FdataSources\u002F{dataSourceId}\n```\n\n#### Create Data Source\n\n```bash\nPOST \u002Fgoogle-merchant\u002Fdatasources\u002Fv1\u002Faccounts\u002F{accountId}\u002FdataSources\nContent-Type: application\u002Fjson\n\n{\n  \"displayName\": \"API Data Source\",\n  \"primaryProductDataSource\": {\n    \"feedLabel\": \"US\",\n    \"contentLanguage\": \"en\"\n  }\n}\n```\n\n**Response:**\n```json\n{\n  \"name\": \"accounts\u002F123456\u002FdataSources\u002F789\",\n  \"dataSourceId\": \"789\",\n  \"displayName\": \"API Data Source\",\n  \"primaryProductDataSource\": {\n    \"feedLabel\": \"US\",\n    \"contentLanguage\": \"en\"\n  },\n  \"input\": \"API\"\n}\n```\n\n#### Update Data Source\n\n```bash\nPATCH \u002Fgoogle-merchant\u002Fdatasources\u002Fv1\u002Faccounts\u002F{accountId}\u002FdataSources\u002F{dataSourceId}?updateMask=displayName\nContent-Type: application\u002Fjson\n\n{\n  \"displayName\": \"Updated Name\"\n}\n```\n\n#### Delete Data Source\n\n```bash\nDELETE \u002Fgoogle-merchant\u002Fdatasources\u002Fv1\u002Faccounts\u002F{accountId}\u002FdataSources\u002F{dataSourceId}\n```\n\n#### Fetch Data Source (trigger immediate refresh)\n\n```bash\nPOST \u002Fgoogle-merchant\u002Fdatasources\u002Fv1\u002Faccounts\u002F{accountId}\u002FdataSources\u002F{dataSourceId}:fetch\n```\n\n**Note:** Fetch only works for data sources with `FILE` input type. API and UI data sources cannot be fetched.\n\n### Reports\n\n#### Search Reports\n\n```bash\nPOST \u002Fgoogle-merchant\u002Freports\u002Fv1\u002Faccounts\u002F{accountId}\u002Freports:search\nContent-Type: application\u002Fjson\n\n{\n  \"query\": \"SELECT offer_id, title, clicks, impressions FROM product_performance_view WHERE date BETWEEN '2026-01-01' AND '2026-01-31'\"\n}\n```\n\n**Example: Query product_view (requires `id` field):**\n```json\n{\n  \"query\": \"SELECT id, offer_id, title, item_issues FROM product_view LIMIT 10\"\n}\n```\n\n**Note:** The `product_view` table requires the `id` field in the SELECT clause.\n\nAvailable report tables:\n- `product_performance_view` - Clicks, impressions, CTR by product\n- `product_view` - Current inventory with attributes and issues (requires `id` in SELECT)\n- `price_competitiveness_product_view` - Pricing vs competitors (requires Market Insights)\n- `price_insights_product_view` - Suggested pricing\n- `best_sellers_product_cluster_view` - Best sellers by category (requires Market Insights)\n- `competitive_visibility_competitor_view` - Competitor visibility\n\n### Promotions\n\n**Note:** Promotions require your Merchant Center account to be enrolled in the Promotions program. You'll receive a 403 error if not enrolled.\n\n#### List Promotions\n\n```bash\nGET \u002Fgoogle-merchant\u002Fpromotions\u002Fv1\u002Faccounts\u002F{accountId}\u002Fpromotions\n```\n\n#### Get Promotion\n\n```bash\nGET \u002Fgoogle-merchant\u002Fpromotions\u002Fv1\u002Faccounts\u002F{accountId}\u002Fpromotions\u002F{promotionId}\n```\n\n#### Insert Promotion\n\n```bash\nPOST \u002Fgoogle-merchant\u002Fpromotions\u002Fv1\u002Faccounts\u002F{accountId}\u002Fpromotions:insert\nContent-Type: application\u002Fjson\n\n{\n  \"promotionId\": \"promo123\",\n  \"contentLanguage\": \"en\",\n  \"targetCountry\": \"US\",\n  \"redemptionChannel\": [\"ONLINE\"],\n  \"attributes\": {\n    \"longTitle\": \"20% off all products\",\n    \"promotionEffectiveDates\": \"2026-02-01T00:00:00Z\u002F2026-02-28T23:59:59Z\"\n  }\n}\n```\n\n### Notifications\n\n#### List Notification Subscriptions\n\n```bash\nGET \u002Fgoogle-merchant\u002Fnotifications\u002Fv1\u002Faccounts\u002F{accountId}\u002Fnotificationsubscriptions\n```\n\n#### Create Notification Subscription\n\n```bash\nPOST \u002Fgoogle-merchant\u002Fnotifications\u002Fv1\u002Faccounts\u002F{accountId}\u002Fnotificationsubscriptions\nContent-Type: application\u002Fjson\n\n{\n  \"registeredEvent\": \"PRODUCT_STATUS_CHANGE\",\n  \"callBackUri\": \"https:\u002F\u002Fexample.com\u002Fwebhook\",\n  \"allManagedAccounts\": true\n}\n```\n\n**Note:** You must specify either `allManagedAccounts: true` OR `targetAccount: \"accounts\u002F{accountId}\"` to indicate which accounts the subscription applies to.\n\n**Alternative with targetAccount:**\n```json\n{\n  \"registeredEvent\": \"PRODUCT_STATUS_CHANGE\",\n  \"callBackUri\": \"https:\u002F\u002Fexample.com\u002Fwebhook\",\n  \"targetAccount\": \"accounts\u002F123456789\"\n}\n```\n\n#### Delete Notification Subscription\n\n```bash\nDELETE \u002Fgoogle-merchant\u002Fnotifications\u002Fv1\u002Faccounts\u002F{accountId}\u002Fnotificationsubscriptions\u002F{subscriptionId}\n```\n\n### Conversion Sources\n\n#### List Conversion Sources\n\n```bash\nGET \u002Fgoogle-merchant\u002Fconversions\u002Fv1\u002Faccounts\u002F{accountId}\u002FconversionSources\n```\n\n#### Create Conversion Source\n\n```bash\nPOST \u002Fgoogle-merchant\u002Fconversions\u002Fv1\u002Faccounts\u002F{accountId}\u002FconversionSources\nContent-Type: application\u002Fjson\n\n{\n  \"merchantCenterDestination\": {\n    \"displayName\": \"My Conversion Source\",\n    \"destination\": \"SHOPPING_ADS\",\n    \"currencyCode\": \"USD\",\n    \"attributionSettings\": {\n      \"attributionLookbackWindowDays\": 30,\n      \"attributionModel\": \"CROSS_CHANNEL_LAST_CLICK\"\n    }\n  }\n}\n```\n\n#### Delete Conversion Source\n\n```bash\nDELETE \u002Fgoogle-merchant\u002Fconversions\u002Fv1\u002Faccounts\u002F{accountId}\u002FconversionSources\u002F{conversionSourceId}\n```\n\n## Pagination\n\nThe API uses token-based pagination:\n\n```bash\nGET \u002Fgoogle-merchant\u002Fproducts\u002Fv1\u002Faccounts\u002F{accountId}\u002Fproducts?pageSize=50\n```\n\nResponse includes `nextPageToken` when more results exist:\n\n```json\n{\n  \"products\": [...],\n  \"nextPageToken\": \"CAE...\"\n}\n```\n\nUse the token for the next page:\n\n```bash\nGET \u002Fgoogle-merchant\u002Fproducts\u002Fv1\u002Faccounts\u002F{accountId}\u002Fproducts?pageSize=50&pageToken=CAE...\n```\n\n## Code Examples\n\n### JavaScript\n\n```javascript\nconst accountId = '123456789';\nconst response = await fetch(\n  `https:\u002F\u002Fgateway.maton.ai\u002Fgoogle-merchant\u002Fproducts\u002Fv1\u002Faccounts\u002F${accountId}\u002Fproducts`,\n  {\n    headers: {\n      'Authorization': `Bearer ${process.env.MATON_API_KEY}`\n    }\n  }\n);\nconst data = await response.json();\n```\n\n### Python\n\n```python\nimport os\nimport requests\n\naccount_id = '123456789'\nresponse = requests.get(\n    f'https:\u002F\u002Fgateway.maton.ai\u002Fgoogle-merchant\u002Fproducts\u002Fv1\u002Faccounts\u002F{account_id}\u002Fproducts',\n    headers={'Authorization': f'Bearer {os.environ[\"MATON_API_KEY\"]}'}\n)\ndata = response.json()\n```\n\n## Notes\n\n- **Developer registration required** - You must complete [Developer Registration](#developer-registration) once per Merchant Center account before using v1 endpoints\n- Product IDs use the format `contentLanguage~feedLabel~offerId` (e.g., `en~US~sku123`)\n- Products can only be inserted\u002Fupdated\u002Fdeleted in data sources with `input: \"API\"` type\n- After inserting\u002Fupdating a product, it may take several minutes before the processed product appears\n- Monetary values use micros (divide by 1,000,000 for actual value)\n- Local inventories only work for products with `LOCAL` channel (not `ONLINE`)\n- The Promotions API requires your account to be enrolled in the Promotions program\n- List Sub-accounts only works for multi-client accounts (MCAs)\n- IMPORTANT: When using curl commands, use `curl -g` when URLs contain brackets to disable glob parsing\n- IMPORTANT: When piping curl output to `jq` or other commands, environment variables like `$MATON_API_KEY` may not expand correctly in some shell environments\n\n## Error Handling\n\n| Status | Meaning |\n|--------|---------|\n| 400 | Invalid request or missing Google Merchant connection |\n| 401 | Invalid\u002Fmissing Maton API key, or GCP project not registered (see [Developer Registration](#developer-registration)) |\n| 403 | Permission denied - account not enrolled in required program or feature not available |\n| 404 | Resource not found |\n| 429 | Rate limited |\n| 4xx\u002F5xx | Passthrough error from Google Merchant API |\n\n### Common Errors\n\n**\"GCP project is not registered\"**: You need to complete developer registration. See [Developer Registration](#developer-registration) section.\n\n**\"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.\n\n**\"Promotion program not enabled\"**: Your Merchant Center account is not enrolled in the Promotions program. Enable it in Merchant Center settings.\n\n**\"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).\n\n**\"Mismatched channel\"**: You're trying to access local inventories for an ONLINE product. Local inventories only work with LOCAL channel products.\n\n### Troubleshooting: API Key Issues\n\n1. Check that the `MATON_API_KEY` environment variable is set:\n\n```bash\necho $MATON_API_KEY\n```\n\n2. Verify the API key is valid by listing connections:\n\n```bash\npython \u003C\u003C'EOF'\nimport urllib.request, os, json\nreq = urllib.request.Request('https:\u002F\u002Fctrl.maton.ai\u002Fconnections')\nreq.add_header('Authorization', f'Bearer {os.environ[\"MATON_API_KEY\"]}')\nprint(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))\nEOF\n```\n\n### Troubleshooting: Invalid App Name\n\nEnsure your URL path starts with `google-merchant`. For example:\n\n- Correct: `https:\u002F\u002Fgateway.maton.ai\u002Fgoogle-merchant\u002Fproducts\u002Fv1\u002Faccounts\u002F{accountId}\u002Fproducts`\n- Incorrect: `https:\u002F\u002Fgateway.maton.ai\u002Fproducts\u002Fv1\u002Faccounts\u002F{accountId}\u002Fproducts`\n\n### Troubleshooting: 401 GCP Project Not Registered\n\nIf you see an error like \"GCP project is not registered with the merchant account\":\n\n1. **Complete developer registration** - See [Developer Registration](#developer-registration) section\n2. Get your account ID from Merchant Center UI (in the URL after `?a=`)\n3. Call the `registerGcp` endpoint with your account ID and email\n4. After successful registration, retry your original request\n\n## Resources\n\n- [Merchant API Overview](https:\u002F\u002Fdevelopers.google.com\u002Fmerchant\u002Fapi\u002Foverview)\n- [Merchant API Reference](https:\u002F\u002Fdevelopers.google.com\u002Fmerchant\u002Fapi\u002Freference\u002Frest)\n- [Products Guide](https:\u002F\u002Fdevelopers.google.com\u002Fmerchant\u002Fapi\u002Fguides\u002Fproducts\u002Foverview)\n- [Data Sources Guide](https:\u002F\u002Fdevelopers.google.com\u002Fmerchant\u002Fapi\u002Fguides\u002Fdatasources)\n- [Reports Guide](https:\u002F\u002Fdevelopers.google.com\u002Fmerchant\u002Fapi\u002Fguides\u002Freports)\n- [Product Data Specification](https:\u002F\u002Fsupport.google.com\u002Fmerchants\u002Fanswer\u002F7052112)\n- [Maton Community](https:\u002F\u002Fdiscord.com\u002Finvite\u002FdBfFAcefs2)\n- [Maton Support](mailto:support@maton.ai)\n",{"name":5,"metadata":24,"description":32},{"author":25,"version":26,"clawdbot":27},"maton","1.0",{"emoji":28,"requires":29},"🧠",{"env":30},[31],"MATON_API_KEY","Google Merchant Center API integration with managed OAuth. Manage products, inventories, data sources, promotions, and reports for Google Shopping.\nUse this skill when users want to manage their Merchant Center product catalog, check product status, configure data sources, or analyze shopping performance.\nFor other third party apps, use the api-gateway skill (https:\u002F\u002Fclawhub.ai\u002Fbyungkyu\u002Fapi-gateway).\nRequires network access and valid Maton API key.\n","main","cb3f39689b7b3a95edb2753c8f3e97a313b885fc","Xiao-Q\u002Fskills\u002Fgoogle-merchant",0,"https:\u002F\u002Fgithub.com\u002FJinhong270\u002FAI-Agent","https:\u002F\u002Fgithub.com\u002FJinhong270","2026-09-30 23:42:56",{"source":8,"skillName":5,"commands":41,"prompt":51,"zipAvailable":52},[42,45,48],{"tool":43,"command":44},"npx","npx skills add Jinhong270\u002FAI-Agent --skill google-merchant",{"tool":46,"command":47},"bunx","bunx skills add Jinhong270\u002FAI-Agent --skill google-merchant",{"tool":49,"command":50},"pnpm","pnpm dlx skills add Jinhong270\u002FAI-Agent --skill google-merchant","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FJinhong270\u002FAI-Agent\u002Fblob\u002Fmain\u002FXiao-Q\u002Fskills\u002Fgoogle-merchant\u002FSKILL.md",true,[54,60],{"path":55,"resourceType":56,"resourceTypeDesc":57,"sizeBytes":58,"sourceHtmlUrl":59},"_meta.json","REFERENCE","参考文档",134,"https:\u002F\u002Fgithub.com\u002FJinhong270\u002FAI-Agent\u002Fblob\u002Fmain\u002FXiao-Q\u002Fskills\u002Fgoogle-merchant\u002F_meta.json",{"path":61,"resourceType":62,"resourceTypeDesc":63,"sizeBytes":64,"sourceHtmlUrl":15},"LICENSE.txt","LICENSE","许可证",1072,[66,73,81,88,95,102],{"skillNo":67,"name":68,"nameZh":6,"description":69,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":70,"categories":71,"keywords":72,"publishedAt":19},"01M77Z0W1XHJVFS4M183VZTF3Z","xlsx","Open, create, read, analyze, edit, repair, or validate spreadsheet files (.xlsx, .xlsm, .xltx, .csv, .tsv) with zero format loss, with first-class support for Chinese \u002F CJK content. Use whenever the user asks to create, build, modify, fill, analyze, read, repair, validate, or format any spreadsheet, workbook, report, dashboard, budget, financial model, pivot table, or tabular data file. Handles Chinese text, encodings (UTF-8 \u002F GB18030 \u002F GBK), full-width characters, CJK fonts in rendering, and Chinese number\u002Fdate conventions (¥, 万\u002F亿, 年\u002F月\u002F日). Covers: creating new workbooks from scratch, reading and analyzing existing files, editing existing workbooks while preserving pivot tables \u002F VBA macros \u002F charts \u002F sparklines \u002F conditional formatting \u002F named ranges, formula recalculation and validation, visual review of results, and applying professional formatting. Triggers on 'spreadsheet', 'Excel', 'workbook', '表格', '工作簿', '.xlsx', '.xlsm', '.csv', 'pivot table', '透视表', 'macro', '宏', 'chart', '图表', 'financial model', '财务模型', 'formula', '公式', or any request to produce tabular data.","https:\u002F\u002Fgithub.com\u002FJinhong270\u002FAI-Agent\u002Fblob\u002Fmain\u002FXiao-Q\u002Fskills\u002Fxlsx007-skill\u002FSKILL.md",[],[],{"skillNo":74,"name":75,"nameZh":6,"description":76,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":77,"sourceHtmlUrl":78,"categories":79,"keywords":80,"publishedAt":19},"01M77Z0EVYYQEYGJME2K56STBZ","xlsx-formula-master","你描述需求(人话)，它给你 Excel \u002F WPS 公式 + 解释 + 不踩坑的边界条件。\n专攻 VLOOKUP \u002F XLOOKUP \u002F INDEX-MATCH \u002F SUMIFS \u002F 数组公式 \u002F 动态数组 \u002F Power Query 等高频但易错场景。\n自动适配你的 Excel 版本（2019 \u002F 365 \u002F WPS）——版本不同公式可能不能用。\n触发：用户说 \"Excel 公式\"、\"VLOOKUP\"、\"怎么算\"、\"WPS 公式\"、\"求和怎么写\"、\"匹配数据\"、\"数据透视\"。","https:\u002F\u002Fgithub.com\u002FJinhong270\u002FAI-Agent\u002Fblob\u002Fmain\u002FXiao-Q\u002Fskills\u002Fxlsx-formula-master\u002FLICENSE.md","https:\u002F\u002Fgithub.com\u002FJinhong270\u002FAI-Agent\u002Fblob\u002Fmain\u002FXiao-Q\u002Fskills\u002Fxlsx-formula-master\u002FSKILL.md",[],[],{"skillNo":82,"name":83,"nameZh":6,"description":84,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":85,"categories":86,"keywords":87,"publishedAt":19},"01M77Z05X53XF8VVQFFFZE2Z4Z","self-improving-agent","Self-improving agent system that analyzes conversation quality, identifies improvement opportunities, and continuously optimizes response strategies.","https:\u002F\u002Fgithub.com\u002FJinhong270\u002FAI-Agent\u002Fblob\u002Fmain\u002FXiao-Q\u002Fskills\u002Fxiucheng-self-improving-agent\u002FSKILL.md",[],[],{"skillNo":89,"name":90,"nameZh":6,"description":91,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":92,"categories":93,"keywords":94,"publishedAt":19},"01M77YZ7KXV2B7GDCBKE07QRWE","xiaohongshu-content-tools","小红书运营数据工具｜当提到小红书关键词搜索,小红书笔记详情及评论,小红书博主作品时使用，可实现爆款挖掘\u002F竞品分析\u002FKOL筛选\u002F趋势洞察，用数据驱动小红书流量增长，告别盲目创作","https:\u002F\u002Fgithub.com\u002FJinhong270\u002FAI-Agent\u002Fblob\u002Fmain\u002FXiao-Q\u002Fskills\u002Fxiaohongshu-content-tools\u002FSKILL.md",[],[],{"skillNo":96,"name":97,"nameZh":6,"description":98,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":99,"categories":100,"keywords":101,"publishedAt":19},"01M77YYQVPA4EWZPQ8J88BYVYA","xfg-ddd-skills","DDD 六边形架构设计与部署技能包。提供 Domain\u002FCase\u002FInfrastructure 层设计模式与代码模板，以及 Docker 环境部署脚本。当用户询问 DDD 架构、设计模式或需要部署项目时调用。","https:\u002F\u002Fgithub.com\u002FJinhong270\u002FAI-Agent\u002Fblob\u002Fmain\u002FXiao-Q\u002Fskills\u002Fxfg-ddd-skills\u002FSKILL.md",[],[],{"skillNo":103,"name":104,"nameZh":6,"description":105,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":106,"sourceHtmlUrl":107,"categories":108,"keywords":109,"publishedAt":19},"01M77YXP7QKKD0HX26W2V63Q9M","wordpress","WordPress.com API integration with managed OAuth. Manage posts, pages, sites, and content.\nUse this skill when users want to create, read, update, or delete WordPress.com posts, pages, or manage site content.\nFor other third party apps, use the api-gateway skill (https:\u002F\u002Fclawhub.ai\u002Fbyungkyu\u002Fapi-gateway).\nRequires network access and valid Maton API key.","https:\u002F\u002Fgithub.com\u002FJinhong270\u002FAI-Agent\u002Fblob\u002Fmain\u002FXiao-Q\u002Fskills\u002Fwordpress-api\u002FLICENSE.txt","https:\u002F\u002Fgithub.com\u002FJinhong270\u002FAI-Agent\u002Fblob\u002Fmain\u002FXiao-Q\u002Fskills\u002Fwordpress-api\u002FSKILL.md",[],[]]