https://integrations.expensify.com/Integration-Server/ExpensifyIntegrations
POST
method is recommendedrequestJobDescription
parameterpartnerUserID
/partnerUserSecret
). Go to this page to generate credentials for your account.Given the job description used for the policy creator:
curl -X POST https://integrations.expensify.com/Integration-Server/ExpensifyIntegrations \
-d 'requestJobDescription={
"type": "create",
"credentials": {
"partnerUserID": "...",
"partnerUserSecret": "..."
},
"inputSettings": {
"type": "policy",
"policyName": "My New Policy"
}
}'
When using the report exporter, it is advised to store your template in a separate file, and use curl’s parameter@filename
feature to pass it to the request, as show below:
template.txt
<#if addHeader == true>
Report ID, Report name<#lt>
</#if>
<#list reports as report>
${report.reportID},${report.reportName}<#lt>
</#list>
curl -X POST https://integrations.expensify.com/Integration-Server/ExpensifyIntegrations \
-d 'requestJobDescription={
"type":"file",
"credentials":{
"partnerUserID":"...",
"partnerUserSecret":"...",
},
"onReceive":{
"immediateResponse":["returnRandomFileName"]
},
"inputSettings":{
"type":"combinedReportData",
"filters":{
"reportIDList":"123456789,234567890"
}
},
"outputSettings":{
"fileExtension":"csv"
}
}' \
--data-urlencode template@template.txt
417 Expectation failed
Add an Expect
header to your request, with an empty value:
curl -X POST https://integrations.expensify.com/Integration-Server/ExpensifyIntegrations \
-H 'Expect: ' \
-d 'requestJobDescription={...}'