Issue on Expense Reports using API from MS Dynamics NAV 2018

rajatmongarajatmonga Posts: 1
edited April 20 in Integrations and API

Hi Team,

Hope you doing good…!!

We are facing an issue regarding downloading Expense Reports using API from MS Dynamics NAV 2018, as the file is not getting generated on the API request.

Please check on the same and assist, if we are missing something.


Also, Please refer to below for your reference for issue analysis:

  1. a. Attached codeunit Expensify_Integration_Function.txt – Function name GetExpReporstListCURL(), that is being used for downloading expense reports.
  2. API Request Details

"C:\Expensify\curl-7.54.0-win64-mingw\bin\curl.exe" -X POST http://integrations.expensify.com/Integration-Server/ExpensifyIntegrations -d 'requestJobDescription="{type:file,credentials:{partnerUserID:*******,partnerUserSecret:****************************************},onReceive:{ immediateResponse:[returnRandomFileName] },inputSettings:{type:combinedReportData,filters:{startDate:2016-01-01,endDate:2019-12-31}},outputSettings:{ fileExtension:csv, fileBasename:allExpReps },onFinish:[{ actionName:markAsExported, label:Expensify Export }]}' --data-urlencode '[email protected]:\Expensify\curl-7.54.0-win64-mingw\bin\expensify_template.ftl' -H Expect:


Regards,

Rajat Monga


Answers

  • FrancoisFrancois Posts: 8 Expensify Success Coach
    edited April 20

    Hi Rajat,


    When you executed the curl request, you should have received a response from the Expensify API. Can you please share it here? It should indicate if anything went wrong.


    One thing that looks incorrect with the request so far though is that the value of the requestJobDescription parameter should be valid JSON, so:

    'requestJobDescription="{type:file,credentials:{partnerUserID:xx,partnerUserSecret:yy} (etc.)
    

    should be:

    'requestJobDescription={"type":"file","credentials":{"partnerUserID":"xx","partnerUserSecret":"yy"} (etc.)
    


Sign In or Register to comment.