Lodol Docs

Expensify

API actions for the Expensify integration.

Expensify

Automate expense reporting, policy management, and card reconciliation with the Expensify Integration Server API.


Create expense rule

Create an expense rule for an employee on a policy. Use policy IDs from list_policies (policies[].id).

Parameters

ParameterTypeRequiredDescription
policy_idstringYesThe policy ID. Obtainable from list_policies (policies[].id) or create_policy (policyID).
employee_emailstringYesEmail of the employee to create the rule for.
tagstringNoTag to auto-apply to matching expenses.
default_billablebooleanNoWhether matching expenses should default to billable.

Response

{
  "ruleID": 42
}

Create standalone expenses

Create standalone expenses in a user's account. Requires advanced permissions from Expensify. Amounts are accepted in dollars and converted to cents for the API.

Parameters

ParameterTypeRequiredDescription
employee_emailstringYesEmail of the employee to create expenses for. Requires advanced permissions.
transactionsarrayYesJSON array of expense objects. Each: {created (YYYY-MM-DD), currency, merchant, amount (in dollars)}. Optional per expense: category, tag, comment, billable, reimbursable, reportID (from export_reports), policyID (from list_policies).

Response

[
  "T001",
  "T002"
]

Create Expensify policy

Create a new Expensify workspace/policy.

Parameters

ParameterTypeRequiredDescription
policy_namestringYesName for the new workspace/policy.
planstringNoPolicy plan type: 'team' (default) or 'corporate'.

Response

{
  "policyID": "NEW123POLICY"
}

Create expense report

Create an expense report with expenses in a user's account. Requires pre-approval from Expensify (contact concierge@expensify.com). Use policy IDs from list_policies (policies[].id) or create_policy (policyID). Amounts are accepted in dollars and converted to cents for the API.

Parameters

ParameterTypeRequiredDescription
employee_emailstringYesEmail of the employee to create the report for. Requires domain and policy admin.
policy_idstringYesPolicy ID to create the report under. Obtainable from list_policies (policies[].id) or create_policy (policyID).
report_titlestringYesTitle for the expense report.
expensesarrayYesJSON array of expense objects. Each: {date (YYYY-MM-DD), currency, merchant, amount (in dollars)}.
report_fieldsobjectNoOptional custom report field values as a JSON object. Field names obtainable from get_policy with fields=['reportFields'].

Response

{
  "reportID": "R00newreport"
}

Download exported file

Download a file previously generated by export_reports or reconcile_cards. The file_name is returned by those actions.

Parameters

ParameterTypeRequiredDescription
file_namestringYesThe filename to download. Obtainable from export_reports or reconcile_cards results.
file_systemstringNoFile system to download from: 'integrationServer' (default, for report exports) or 'reconciliation' (for card reconciliation files).

Response

"file-contents-here"

Export expense reports

Export expense reports from Expensify with flexible filters. Returns structured report data with nested expenses. Amounts are in dollars (not cents).

Parameters

ParameterTypeRequiredDescription
start_datestringNoStart date for the export range (YYYY-MM-DD). Required unless report_id_list is provided.
end_datestringNoEnd date for the export range (YYYY-MM-DD). Date range cannot exceed one year.
report_id_liststringNoComma-separated report IDs to export. Required unless start_date is provided. Report IDs obtainable from a previous export_reports call.
report_statestringNoFilter by report state. Comma-separated values from: OPEN, SUBMITTED, APPROVED, REIMBURSED, ARCHIVED.
policy_idstringNoFilter by policy/workspace ID. Obtainable from list_policies (policies[].id) or create_policy (policyID).
limitstringNoMaximum number of reports to export.
file_formatstringNoOutput format: json (default), csv, xls, xlsx, txt, pdf, xml.
custom_templatestringNoOptional Freemarker template string to override the default export format. See Expensify template docs for available fields.

Response

[
  {
    "currency": "USD",
    "expenses": [
      {
        "amount": 350.0,
        "category": "Travel",
        "date": "2024-03-15",
        "merchant": "Delta Airlines",
        "transactionID": "T001"
      }
    ],
    "policyName": "Default Policy",
    "reportID": "R00abc123",
    "reportName": "March Travel",
    "status": "Approved",
    "submitter": "user@example.com",
    "total": 450.75
  }
]

Get policy details

Retrieve detailed information about specific policies including categories, tags, report fields, tax, and employees.

Parameters

ParameterTypeRequiredDescription
policy_id_listarrayYesJSON array of policy IDs to retrieve. Obtainable from list_policies (policies[].id) or create_policy (policyID).
fieldsarrayYesJSON array of fields to retrieve. Options: categories, reportFields, tags, tax, employees.
user_emailstringNoOptional email to retrieve policies for another user (requires third-party access grant).

Response

{
  "ABC123DEF456": {
    "categories": [
      {
        "enabled": true,
        "name": "Travel"
      },
      {
        "enabled": true,
        "name": "Meals"
      }
    ]
  }
}

List domain cards

List all credit cards assigned at the domain level.

Parameters

ParameterTypeRequiredDescription
domainstringYesThe domain name to list cards for (e.g., 'example.com').

Response

[
  {
    "name": "Corporate Amex",
    "owner": "finance@example.com"
  }
]

List Expensify policies

List all policies (workspaces) the authenticated user has access to.

Parameters

ParameterTypeRequiredDescription
admin_onlybooleanNoIf true, only return policies where the user is an admin.

Response

[
  {
    "id": "ABC123DEF456",
    "name": "Engineering Team",
    "role": "admin",
    "type": "corporate"
  }
]

Reconcile card transactions

Export card transaction data for reconciliation. Requires domain admin access. Amounts are in dollars. Uses default reconciliation template unless custom_template is provided.

Parameters

ParameterTypeRequiredDescription
domainstringYesThe domain to reconcile cards for (e.g., 'example.com'). Must be domain admin.
start_datestringYesStart date (YYYY-MM-DD).
end_datestringYesEnd date (YYYY-MM-DD).
reconciliation_typestringNoType of reconciliation: 'All' (default) or 'Unreported'.
feedstringNoCard feed name to filter by, or 'export_all_feeds'. Feed names obtainable from list_domain_cards.
file_formatstringNoOutput format: json (default), csv, txt, xml.
custom_templatestringNoOptional Freemarker template string to override the default reconciliation format.

Response

[
  {
    "cardName": "Corporate Amex",
    "cardOwner": "user@example.com",
    "currency": "USD",
    "originalAmount": 1250.0,
    "originalMerchant": "AWS"
  }
]

Update employees on policy

Provision or de-provision employees on a policy using the Advanced Employee Updater. Use policy IDs from list_policies (policies[].id) or create_policy (policyID). Supports dry_run to preview changes without applying them.

Parameters

ParameterTypeRequiredDescription
employeesarrayYesJSON array of employee objects. Required fields per employee: employeeEmail, managerEmail, employeeID, policyID. Optional: firstName, lastName, approvalLimit, overLimitApprover, isTerminated, role (user/auditor/admin).
dry_runbooleanNoIf true, preview changes without applying them.

Response

{
  "added": 2,
  "removed": 0,
  "updated": 1
}

Update expense rule

Update an existing expense rule. Rule IDs obtainable from create_expense_rules (ruleID).

Parameters

ParameterTypeRequiredDescription
policy_idstringYesThe policy ID. Obtainable from list_policies (policies[].id) or create_policy (policyID).
employee_emailstringYesEmail of the employee the rule applies to.
rule_idnumberYesID of the rule to update. Obtainable from create_expense_rules (ruleID).
tagstringNoUpdated tag to auto-apply.
default_billablebooleanNoUpdated billable default.

Response

{
  "status": "success"
}

Update Expensify policy

Update categories, tags, and/or report fields on a policy. Policy ID obtainable from list_policies (policies[].id) or create_policy (policyID).

Parameters

ParameterTypeRequiredDescription
policy_idstringYesThe policy ID to update. Obtainable from list_policies (policies[].id) or create_policy (policyID).
categoriesobjectNoCategory update object with 'action' ('merge' or 'replace') and 'data' array. Each entry: {name, enabled, glCode, payrollCode, areCommentsRequired, commentHint, maxExpenseAmount}. Existing categories obtainable from get_policy with fields=['categories'].
tagsobjectNoTag update object. Supports single-level and multi-level tags. Existing tags obtainable from get_policy with fields=['tags'].
report_fieldsobjectNoReport fields update object with 'action' ('merge' or 'replace') and 'data' array. Each entry: {name, type (text/dropdown/date), values, defaultValue}. Existing fields obtainable from get_policy with fields=['reportFields'].

Response

{
  "status": "success"
}

Mark reports as reimbursed

Mark reports as reimbursed. Only Approved reports will be updated; others are skipped. Report IDs obtainable from export_reports (reports[].reportID).

Parameters

ParameterTypeRequiredDescription
report_id_liststringNoComma-separated report IDs to mark as reimbursed. Required unless start_date is provided. Obtainable from export_reports (reports[].reportID).
start_datestringNoStart date filter (YYYY-MM-DD). Required unless report_id_list is provided.
end_datestringNoEnd date filter (YYYY-MM-DD).
payment_sourcestringNoOptional description of the payment source (1-100 characters).

Response

{
  "reportIDsUpdated": [
    "R00abc123",
    "R00def456"
  ]
}

Update tag approvers

Set approvers for individual tags on a policy. Only supports single-level tag lists. Use policy IDs from list_policies (policies[].id).

Parameters

ParameterTypeRequiredDescription
policy_idstringYesThe policy ID. Obtainable from list_policies (policies[].id) or create_policy (policyID).
tag_approversarrayYesJSON array of objects with 'name' (tag name) and 'approver' (email). Set approver to empty string to clear. Tag names obtainable from get_policy with fields=['tags'].

Response

{
  "status": "success"
}

On this page