Issue on Expense Reports using API from MS Dynamics NAV 2018

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:
- a. Attached codeunit Expensify_Integration_Function.txt – Function name GetExpReporstListCURL(), that is being used for downloading expense reports.
- 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 'template@C:\Expensify\curl-7.54.0-win64-mingw\bin\expensify_template.ftl' -H Expect:
Regards,
Rajat Monga
Answers
-
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.)
-
Hi @Francois,
Hope you doing good…!!
As per your update to the issue, I have tried updating the request as below, but still not getting results:
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":"xx","partnerUserSecret":"yy"},"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 "template@C:\Expensify\curl-7.54.0-win64-mingw\bin\expensify_template.ftl" -H "Expect":
Also, Please attached the response for your reference.
Please check on the same and assist, if we are missing something.
Regards,
Rajat Monga
-
Hi Team,
As per update from Francois, the issue is still not resolved.
Please check on the same and assist, if we are missing something.
Also, Please refer to below for your reference for issue analysis:
- Attached codeunit Expensify_Integration_Function.txt – Function name GetExpReporstListCURL(), that is being used for downloading expense reports.
2. API Request:
"C:\Expensify\curl-7.54.0-win64-mingw\bin\curl.exe" -X POST https://integrations.expensify.com -d requestJobDescription={"type":"file","credentials":{"partnerUserID":"aa_rajat_inecta_com","partnerUserSecret":"cec4183e990b1e4efb2d6899f59287c407f55a26"},"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 "template@C:\Expensify\curl-7.54.0-win64-mingw\bin\expensify_template.ftl" -H Expect:
3. CURL Response.jpg
Regards,
Rajat Monga