title: Error When Trying to Sort Google Sheets Worksheet in Python
body: <p>I am trying to sort a worksheet (i.e. <code>single tab</code>) within a large Google Sheets workbook using Python. However, I am getting an error when executing the request:</p>
  
  <blockquote>
    <p>"Invalid JSON payload received. Unknown name "sort_range": Cannot find field."</p>
  </blockquote>
  
  <p>The Python snippet:</p>
  
  <pre><code>SORT_AMEX_PLAT = {
        "sortRange": {
            "sheetId": AMEX_PLAT_SHEET_ID,
            "startRowIndex": 1,
            "endRowIndex": 20000,
            "startColumnIndex": 0,
            "endColumnIndex": 30,
            "sortSpecs": [
                {
                  "dimensionIndex": 0,
                  "sortOrder": "ASCENDING"
                }
            ]
          }
      }
  
      sortRequest = sheet.values().batchUpdate(spreadsheetId=SPREADSHEET_ID, body=SORT_AMEX_PLAT)
      sortResponse = sortRequest.execute()
  </code></pre>