title: Google Analytics API - bad request for Ecommerce activity
body: <p>I am running the following for our GA reporting v4 API - it works fine without the Ecommerce portion but once I add "ecommerce", it gave me an error.</p>
  
  <pre><code>def get_client_report(analytics):
      return analytics.userActivity().search(
      body=
  
      {
          "viewId": VIEW_ID,
          "user": {
              "type": "CLIENT_ID",
              "userId": "REDACTED"
          },
  
          "activityTypes": [
          "ECOMMERCE"
          ],
  
          "dateRange": {
              "startDate": "2020-04-02",
              "endDate": "2020-04-02"
          },
  
          "ecommerce": {
              "transaction": {
                    "transactionId" : "REDACTED"
              }
          }
      }
    ).execute()
  </code></pre>
  
  <p>and I get the following error:</p>
  
  <p>https://analyticsreporting.googleapis.com/v4/userActivity:search?alt=json returned "Invalid JSON payload received. Unknown name "ecommerce": Cannot find field.". Details: "[{'@type': 'type.googleapis.com/google.rpc.BadRequest', 'fieldViolations': [{'description': 'Invalid JSON payload received. Unknown name "ecommerce": Cannot find field.'}]}]"></p>
  
  <p>Can you help me what is wrong here? Thank you!</p>