Question regarding Expensify expenses report error

Convex
Convex Expensify Customer Posts: 3

Hey all, going to keep it as short but informative as possible.

I'm trying to export a report via the API but I'm getting auth issues. We know it's not actually auth issues because using the same creds we've been able to make an expense correctly using the API. What do you think the error could be? We've taken the example from the API documentation page and tweaked it slightly for our own uses, but no dice.

We think it's the do with the template that we're passing, the reason being is because if we remove the template, we get an error saying "we haven't included the template" which make sense. We know the report is incorrect, we just want to make sure the connects are correct. I'll include some examples. Any help or insights would be greatly appreciated.


Example of Request:


{

    requestJobDescription: {

        "type":"file",

        "credentials":{

            "partnerUserID":"REDACTED",

            "partnerUserSecret":"REDACTED"

        },

        "onReceive":{

            "immediateResponse":"test"

        },

        "inputSettings":{

            "type":"combinedReportData",

            "reportState":"APPROVED,REIMBURSED",

            "filters":{

                "startDate":"2020-01-08",

                "endDate":"2020-02-08",

                "markedAsExported":"Expensify Export"

            }

        },

        "outputSettings":{

            "fileExtension":"csv",

            "fileBasename":"myExport"

        }

    },

    "template": "<#if addHeader == true>\n   attendees.email<#lt>\n</#if>"

}

Answers