Skip to main content

Expensify Connector

Expensify Expensify provides an industry leading expense management system. Use the Expensify component to programmatically download expense report data for analysis or insertion into your accounting package, provision accounts for new hires, and much more.

Connections

Basic Connection

Basic connection for Expensify

InputCommentsDefault
Partner User IDProvide a string value for the partnerUserID of your Expensify account.
Partner User SecretProvide a string value for the partnerUserSecret of your Expensify account.

Actions

Create Expense

Allows you to create expenses in a user’s account.

InputCommentsDefault
Connection
TypeSpecifies to the job that it has to create expenses.expenses
Employee EmailThe report will be created in that account.
Transaction ListThe transactions to add to the report.
[
{
"created": "2016-01-01",
"currency": "USD",
"merchant": "Name of merchant 1",
"amount": 1234
},
{
"created": "2016-01-21",
"currency": "EUR",
"merchant": "Name of merchant 2",
"amount": 2211,
"policyID": "E40D9B8DF456E233",
"tax": {
"rateID": "id_TAX_OPTION_16"
}
},
{
"created": "2016-01-31",
"currency": "CAD",
"merchant": "Name of merchant 3",
"amount": 2211,
"reportID": "R006AseGxMka",
"tax": {
"rateID": "id_TAX_OPTION_16",
"amount": 600
}
}
]

Create Expense Rule

Create expense rules for a given employee on a given policy.

InputCommentsDefault
Connection
TypeSpecifies to the job that it has to create an expense rule.expenseRules
Employee EmailThe report will be created in that account.
Policy IDThe report will be created in that policy.
ActionsThe actions to perform on the expense rule.
{
"tag": "Tag Name",
"defaultBillable": true
}

Create Policy

Creates a policy.

InputCommentsDefault
Connection
TypeSpecifies to the job that it has to create a policy.policy
Policy NameThe name of the policy to create.
PlanSpecifies the plan of the policy. If not specified, the new policy will be created under the team plan.

Create Report

Creates a report, with transactions, in a user’s account.

InputCommentsDefault
Connection
TypeSpecifies to the job that it has to create a report.report
Employee EmailThe report will be created in that account.
ReportThe report to create.
{
"title": "Name of the report",
"fields": {
"reason_of_trip": "Business trip",
"employees": "3"
}
}
ExpensesThe expenses to add to the report.
[
{
"date": "yyyy-mm-dd",
"currency": "USD",
"merchant": "Name of merchant",
"amount": 1234
},
{
"date": "yyyy-mm-dd",
"currency": "CAD",
"merchant": "Name of merchant",
"amount": 2211
}
]
Policy IDThe report will be created in that policy.

Download Report

This job lets you download reports that were generated with the Report Exporter job.

InputCommentsDefault
Connection
File NameThe name of a file generated from the exporter job.
File SystemThe name of a file generated from the exporter job.integrationServer

Export Report

Export expense or report data in a configurable format for analysis or insertion into your accounting package.

InputCommentsDefault
Connection
Start DateFilters out all reports submitted or created before the given date, whichever occurred last (inclusive). yyyy-mm-dd formatted date.2016-01-01
End DateFilters out all reports submitted or created before the given date, whichever occurred last (inclusive). yyyy-mm-dd formatted date.2016-01-01
Approved After
Mark as Exported Label Filter
Policy ID ListThe IDs of the policies to get information for.
Report ID ListThe IDs of the reports to get information for.
File ExtensionSpecifies the format of the generated report. Note: if the 'pdf' option is chosen, one PDF file will be generated for each report exported.json
File BasenameThe name of the generated file(s) will start with this value, and a random part will be added to make each filename globally unique. If not specified, the default value export is use.
Include Full Page Receipts PDFSpecifies whether generated PDFs should include full page receipts. This parameter is used only if fileExtension contains pdffalse
Report StateThe status to change the reports to. At the moment, only Reimbursed is supported. Only reports in the Approved status can be updated to Reimbursed. All other reports will be ignored.REIMBURSED
LimitMaximum number of reports to export.
Employee EmailThe report will be created in that account.
On FinishYou can configure the recipients list of email addresses that should receive a summary email of the changes made by the API.
[
{
"actionName": "markAsExported",
"label": "Expensify Export"
},
{
"actionName": "email",
"recipients": "manager@domain.com,finances@domain.com",
"message": "Report is ready."
}
]
TestIf set to true, actions defined in onFinish will not be executed.false
TemplateThe template parameter is used to format the Expensify data as you wish. It is based on the Freemarker language's syntax.
<#if addHeader == true>
Merchant,Original Amount,Category,Report number,Expense number<#lt>
</#if>
<#assign reportNumber = 1>
<#assign expenseNumber = 1>
<#list reports as report>
<#list report.transactionList as expense>
${expense.merchant},<#t>
<#-- note: expense.amount prints the original amount only -->
${expense.amount},<#t>
${expense.category},<#t>
${reportNumber},<#t>
${expenseNumber}<#lt>
<#assign expenseNumber = expenseNumber + 1>
</#list>
<#assign reportNumber = reportNumber + 1>
</#list>

Get Policy

Gets specific information about listed policies.

InputCommentsDefault
Connection
TypeSpecifies to the job that it has to get information specific to policies.policy
Policy ID ListThe IDs of the policies to get information for.
FieldsSpecifies the fields of the policy to gather information for.
User EmailSpecifies the user to gather the policy list for. You must have been granted third-party access by that user/company domain beforehand.

List Cards

Gets the list of credit cards that are assigned at the domain level.

InputCommentsDefault
Connection
TypeSpecifies to the job that it has to list the cards of a domain.domainCardList
DomainThe name of the domain to get the cards for.

List Policies

Gets a list of policies with some relevant information about them.

InputCommentsDefault
Connection
TypeSpecifies to the job that it has to get a policy summary list.policyList
Admin OnlyWhether or not to only get policies for which the user is an admin for.false
User EmailSpecifies the user to gather the policy list for. You must have been granted third-party access by that user/company domain beforehand.

Raw Request

Send a raw HTTP request to the Expensify API

InputCommentsDefault
Connection
URLThis input is not required as the Expensify API is a single endpoint.
MethodThe HTTP method to use.
DataThe HTTP body payload to send to the URL.
Form DataThe Form Data to be sent as a multipart form upload.
File DataFile Data to be sent as a multipart form upload.
File Data File NamesFile names to apply to the file data inputs. Keys must match the file data keys above.
Query ParameterA list of query parameters to send with the request. This is the portion at the end of the URL similar to ?key1=value1&key2=value2.
HeaderA list of headers to send with the request.
Response TypeThe type of data you expect in the response. You can request json, text, or binary data.json
TimeoutThe maximum time that a client will await a response to its request
Debug RequestEnabling this flag will log out the current request.false
Retry Delay (ms)The delay in milliseconds between retries. This is used when 'Use Exponential Backoff' is disabled.0
Retry On All ErrorsIf true, retries on all erroneous responses regardless of type. This is helpful when retrying after HTTP 429 or other 3xx or 4xx errors. Otherwise, only retries on HTTP 5xx and network errors.false
Max Retry CountThe maximum number of retries to attempt. Specify 0 for no retries.0
Use Exponential BackoffSpecifies whether to use a pre-defined exponential backoff strategy for retries. When enabled, 'Retry Delay (ms)' is ignored.false

Update Employee

Add, update or remove policy members

InputCommentsDefault
Connection
TypeSpecifies to the job that it has to update an employeeemployees
EmployeesReplace or update the existing employees of the policy with the ones provided. If the employee does not exist, it will be created.
[
{
"employeeEmail": "employee@domain.com",
"managerEmail": "manager@domain.com",
"policyID": "0123456789ABCDEF",
"employeeID": "12345",
"firstName": "John",
"lastName": "Doe",
"customField2": "ABC123",
"approvalLimit": 12300,
"overLimitApprover": "audit@domain.com",
"isTerminated": false,
"additionalPolicyIDs": [
"ABCDEF0123456789",
"456789ABCDEF0123"
]
},
{
"employeeEmail": "manager@domain.com",
"managerEmail": "ceo@domain.com",
"policyID": "0123456789ABCDEF",
"employeeID": "34567",
"firstName": "Michael",
"lastName": "Scott",
"customField1": "ZZZ333",
"customField2": "BCD345",
"isTerminated": false
}
]
Dry RunIf set to true, employees will not actually be provisioned or updated. Use this for development.false
On FinishYou can configure the recipients list of email addresses that should receive a summary email of the changes made by the API.
[
{
"actionName": "email",
"recipients": "admin1@domain.com,admin2@domain.com"
}
]
Set Employee Primary PolicySpecifies the policy to set as the primary policy for the employee. If not specified, the employee will not have a primary policy.none
Admin OnlyDictates whether Expensify will automatically invite managers (submitsTo), managers’ managers, and so on to policies where they approve reports, if it is not their primary policy.true

Update Expense Rules

Update a preexisting expense rule for a given employee on a given policy.

InputCommentsDefault
Connection
TypeSpecifies to the job that it has to create an expense rule.expenseRules
Employee EmailThe report will be created in that account.
Policy IDThe report will be created in that policy.
Rule IDThe rule to update.
ActionsThe actions to perform on the expense rule.
{
"tag": "Tag Name",
"defaultBillable": true
}

Update Policy

manage categories, tags and report fields on a policy.

InputCommentsDefault
Connection
TypeSpecifies to the job that it has to update a policy.policy
Policy IDThe report will be created in that policy.
Policy ID ListThe IDs of the policies to get information for.
CategoriesReplace or update the existing categories of the policy with the ones provided.
{
"action": "merge",
"data": [
{
"name": "Category 1",
"enabled": true,
"payrollCode": "Payroll Code 1",
"glCode": "GL Code 1",
"commentHint": "Comment hint 1",
"areCommentsRequired": true,
"maxExpenseAmount": 2500
},
{
"name": "Category 2",
"enabled": false
}
]
}
TagsReplace the existing tags of the policy with the ones provided.
{
"data": [
{
"name": "Tag",
"tags": [
{
"name": "Tag 1",
"glCode": "Tag 1 GL Code"
},
{
"name": "Tag 2",
"enabled": false
}
]
}
]
}
Report FieldsReplace or update the existing report fields of the policy with the ones provided.
{
"action": "merge",
"data": [
{
"name": "Report field 1",
"type": "dropdown",
"values": [
"value 1",
"value 2",
"value 3"
]
}
]
}

Update Report Status

Update the status of a report.

InputCommentsDefault
Connection
TypeSpecifies to the job that it has to update the status of a list of reports.reportStatus
StatusThe status to change the reports to. At the moment, only Reimbursed is supported. Only reports in the Approved status can be updated to Reimbursed. All other reports will be ignored.REIMBURSED
FiltersThe filters to apply to the report list.
{
"type": "reportStatus",
"status": "REIMBURSED",
"filters": {
"reportIDList": "R006AseGxMka,R00bCluvcO4T"
}
}