API Request no longer working

Hello,
I sent an email to concierge but was referred to here and hoping someone can help. I've written an integration years ago and have not change anything except including the email address in my output. This was a change done some time last year. In the last 2 days, myself and other customers that I've given my program too are unable to retrieve expense reports (continuously getting a Bad Request(400) error.
My request is as follows:
jobDescription:
{ "test":"true", "type":"file", "credentials": { "partnerUserID":"aa_expenses_synergyresources_net","partnerUserSecret":"REMOVED_FOR_SECURITY"}, "onReceive":{ "immediateResponse": ["returnRandomFileName"] }, "inputSettings":{ "type":"combinedReportData", "reportState":"APPROVED", "filters":{ "policyIDList":"A60D109AFADC1E1E,A7C8CECC7792F607","startDate":"2020-03-25","endDate":"2020-03-25","markedAsExported":"SAP" } }, "outputSettings":{ "fileExtension":"xls" }, "onFinish": [ {"actionName":"markAsExported","label":"SAP"} ] }
<#-- Header -->
Submitted Date,Expense Date, Report ID,ReportName,UserID,Merchant,Reimbursable, Billable,Category,GLCode,Comments,Tag,Amount,Email Address
<#list reports as report>
<#list report.transactionList as expense>
<#--Compute the final amount, merchant, and created date and store them in variable -->
<#if expense.convertedAmount?has_content>
<#assign amount = (expense.convertedAmount/100)>
<#elseif expense.modifiedAmount?has_content>
<#assign amount = (expense.modifiedAmount/100)>
<#else>
<#assign amount = (expense.amount/100)>
</#if>
<#if expense.modifiedMerchant?has_content>
<#assign merchant = expense.modifiedMerchant>
<#else>
<#assign merchant = expense.merchant>
</#if>
<#if expense.modifiedCreated?has_content>
<#assign created = expense.modifiedCreated>
<#else>
<#assign created = expense.created>
</#if>
${report.submitted},<#t>
${created},<#t>
${report.reportID},<#t>
${report.reportName},<#t>
${report.submitterUserID},<#t>
${merchant},<#t>
${expense.reimbursable?string('true','false')},<#t>
${expense.billable?string('true','false')},<#t>
${expense.category},<#t>
${expense.categoryGlCode},<#t>
${expense.comment},<#t>
${expense.tag},<#t>
${amount},<#t>
${report.accountEmail}<#lt>
</#list>
</#list>
Any help would be greatly appreciated as all of my customers (as well as us as a company) are no longer able to use the software.
Answers
-
Hi @SynergyResources, welcome to the Expensify Community!
Is this issue happening consistently for you? It's possible that there was a temporary server issue causing errors. Can you please retry the connection and let me know how you get on? Thanks!
-
Hi Kadie,
Unfortunately, this is happening consistently now and came out of nowhere.
-
same thing is happening to the integration that I built, it's not a temporary issue and the api is completely unusable at the moment
-
Thanks you two! We're investigating further, and will come back to you once we have an idea of why this is happening out of the blue.
-
FYI Same thing here. No changes made to the script, but getting the 400 error every time it runs.
-
Cortney Ofstad Expensify Success Coach - Admin, Expensify Team, Expensify Student Ambassador Posts: 174 Expensify Team
Hi @ComportTom — sorry to hear that! If possible, can you reach out to [email protected] and share your cal request with our team? This will allow us to get that looked into right away.
Once we have an update on this, we'll let everyone know — thanks!
-
Same thing here.
var reportExporterParamObj = new
{
type = "file",
credentials = new
{
partnerUserID = {partnerUserID},
partnerUserSecret = {partnerUserSecret}
},
onReceive = new
{
immediateResponse = new[] { "returnRandomFileName" }
},
inputSettings = new
{
type = "combinedReportData",
reportState = "ARCHIVED",
filters = new
{
startDate = lastRun.ToString("yyyy-MM-dd"),
markedAsExported = "exported"
}
},
outputSettings = new
{
fileExtension = "csv"
},
onFinish = new[] {
new {
actionName = "markAsExported",
label = "exported"
}
}
}
I am getting the error "System.Net.WebException: The remote server returned an error: (400) Bad Request. at System.Net.HttpWebRequest.GetResponse()" starting from Mar 25 around 1pm EST.
-
I am trying to submit my script, but the content is being blocked.
-
Hey @jeff_klick!
Can you reach out to [email protected] and share your information with our team please? We have an internal issue going and we can reach back out to you directly once we have any updates.
-
i got the reply from [email protected]
-
@jeff_klick Please make it clear to Concierge that you were directed from Community for an existing known issue.
-
That reply from Concierge is what sent me here
-
@SynergyResources @jeff_klick @ComportTom @aschade92 Sorry for the recent trouble with the API. Our engineering team is digging into this. We'll give an update here once this is resolved.
-
Expensify team, has there been any progress on this problem? It is holding up a very important workflow within our company?
Can you please give status? Found the problem? Still troubleshooting?
-
Jason Li Expensify Success Coach - Admin, Expensify Team, Expensify Student Ambassador Posts: 231 Expensify Team
Hi @ComportTom - could you reach out to [email protected] regarding your issue? Thanks in advance!
-
I reached out to [email protected]. The response was infuriatingly unhelpful. I think it's a bot that doesn't understand that the API is broken and that I would like to know how long it will take to get back up and running...
-
Hi folks - thanks for your patience here. As @Stevie LaFortune explained, the team is working on this on the back end to get this resolved.
If you have been speaking to Concierge and received a message about the API to be a self-serve tool then this is technically correct. However, in this instance we are looking into a wider error here affecting a subset of our users who rely on the API.
As soon as we have more information on this issue we will be back in touch here.
-
@SynergyResources @jeff_klick @ComportTom @aschade92 @philipataimpoint Thanks for your patience! We've resolved this now. Let us know if you're still seeing any issues with exporting reports on our API.
-
Thanks Stevie. I just ran our integration script and, at least for me, the problem is resolved....
-
Cortney Ofstad Expensify Success Coach - Admin, Expensify Team, Expensify Student Ambassador Posts: 174 Expensify Team
Hi @ComportTom! Thanks for responding and glad to hear it! If you have any other questions or need anything else, please let us know and we'll be glad to help!