google-apigoogle-merchant-center

merchantapi.googleapis Error in query: invalid table name 'ProductPerformanceView' in FROM clause


I send request to API

https://developers.google.com/merchant/api/guides/reports/quickstart?hl=pl

 curl -X POST \
  'https://merchantapi.googleapis.com/reports/v1beta/accounts/{merchantId}/reports:search' \
  -H 'Authorization: Bearer $token' \
  -H 'Content-Type: application/json' \
  -d '{
    "query" : "SELECT marketingMethod, offerId, impressions, clicks, clickThroughRate FROM ProductPerformanceView WHERE date BETWEEN '\''2024-09-01'\'' AND '\''2024-09-30'\''"
  }'

and get response :

 Warn: Response: {

        "error": {

          "code": 400,

          "message": "[query] Error in query: invalid table name 'ProductPerformanceView' in FROM clause",

          "status": "INVALID_ARGUMENT",

          "details": [

            {

              "@type": "type.googleapis.com/google.rpc.ErrorInfo",

              "reason": "invalid",

              "domain": "global"

            }

          ]

        }

      }

where is my error?


Solution

  • At the moment the docs from content api are more accurate: https://developers.google.com/shopping-content/guides/reports/fields The beta documentation for reports is not valid.