API returns invalid JSON

Options
dmitrykosar
dmitrykosar Expensify Customer Posts: 1
edited March 2023 in Integrations and API

Hello!

I'm getting an invalid json when requesting the following report. The comma is missed in several places in the response. See the response and request.


requestJobDescription={

  "type": "file",

  "credentials": { },

  "onReceive": {

    "immediateResponse": [

      "returnRandomFileName"

    ]

  },

  "inputSettings": {

    "type": "combinedReportData"

  },

  "outputSettings": {

    "fileExtension": "json",

    "fileBasename": "export"

  }

}&template=<#if addHeader>[</#if><#lt>

<#list reports as report>

  {<#lt>

    "accountId": "${report.accountID}",<#lt>

    "accountEmail": "${report.accountEmail}",<#lt>

    "status": "${report.status}",<#lt>

    "submitDate": "${report.submitted}",<#lt>

    "createdDate": "${report.created}",<#lt>

    "currency": "${report.currency}"<#lt>

  }<#if report?has_next>,</#if><#lt>

</#list>

<#if addFooter>]</#if>


Is there any workaround to avoid this? It looks like has_next flag can be false even when there are still items left.