Fyle

App · 26 actions

Review and manage Fyle expenses and reports: approve, send back, comment and mark paid, and keep projects and cost centers in step.

Actions

ActionWhat it does
Approve an expense reportApprove an expense report as an admin.
Comment on an expenseAdd a comment to an expense, and tell its owner if you choose.
Comment on an expense reportAdd a comment to an expense report.
Create a cost centerCreate a cost center that expenses can be charged to.
Create a projectCreate a project that expenses can be filed against.
Create an expenseCreate an expense for an employee, as an admin.
Delete a cost centerDelete a cost center that no expense or other record uses yet.
Delete a projectDelete a project that no expense or other record uses yet.
Delete an expenseDelete an expense.
Get an expenseGet one expense with its amount, state, category, project and report.
Get an expense reportGet one expense report with its state, amount and approvers.
Get my profileGet the connected person's profile, their roles and their organization.
List advance requestsList employees' requests for cash advances, newest first.
List categoriesList the organization's expense categories.
List corporate card transactionsList corporate card transactions, newest first, with whether each is matched to an expense.
List cost centersList the organization's cost centers.
List employeesList the organization's employees with their email addresses.
List expense reportsList the organization's expense reports, newest first.
List expensesList the organization's expenses, newest first.
List projectsList the organization's projects.
List reimbursementsList reimbursements paid to employees, newest first.
Mark an expense report as paidMark an approved expense report as paid, when you reimbursed it outside Fyle.
Send back an expense reportSend an expense report back to the employee, saying why.
Submit expenses as a reportPut an employee's expenses on a new expense report and submit it for approval, on their behalf.
Update a projectRename a project, or change its code, description or whether it's enabled.
Update an expenseChange an expense's purpose, merchant, amount, category, project, cost center or billable flag.

Approve an expense report

Approve an expense report as an admin.

Inputs

Reportreport_idtextRequired
The report to approve.

Outputs

dataobject
The response from Fyle.
Example output
{
  "data": {}
}

Comment on an expense

Add a comment to an expense, and tell its owner if you choose.

Inputs

Expense IDexpense_idtextRequired
The expense to comment on.
CommentcommenttextRequired
The comment.
Notify the employeenotifytrue/false
Tell the expense's owner about the comment.

Outputs

dataobject
The response from Fyle.
Example output
{
  "data": {
    "data": [
      {
        "action": "example",
        "comment": "example",
        "created_at": "example",
        "creator_user_id": "example",
        "expense_id": "example",
        "id": "example"
      }
    ]
  }
}

Comment on an expense report

Add a comment to an expense report.

Inputs

Reportreport_idtextRequired
The report to comment on.
CommentcommenttextRequired
The comment.

Outputs

dataobject
The response from Fyle.
Example output
{
  "data": {
    "data": {
      "comment": "example",
      "created_at": "example",
      "creator_user_id": "example",
      "id": "example",
      "report_id": "example"
    }
  }
}

Create a cost center

Create a cost center that expenses can be charged to.

Inputs

NamenametextRequired
The cost center's name.
Codecodetext
A code to match the cost center in another system.
Descriptiondescriptiontext
A description.
Enabledis_enabledtrue/false
Whether employees can use the cost center. Leave empty for enabled.

Outputs

dataobject
The response from Fyle.
Example output
{
  "data": {
    "data": {
      "code": "example",
      "created_at": "example",
      "description": "example",
      "id": 1,
      "is_enabled": true,
      "name": "example",
      "updated_at": "example"
    }
  }
}

Create a project

Create a project that expenses can be filed against.

Inputs

NamenametextRequired
The project's name.
Sub-projectsub_projecttext
A sub-project name, shown as Name / Sub-project.
Codecodetext
A code to match the project in another system.
Descriptiondescriptiontext
A description.
Enabledis_enabledtrue/false
Whether employees can use the project. Leave empty for enabled.

Outputs

dataobject
The response from Fyle.
Example output
{
  "data": {
    "data": {
      "approver_user_ids": [
        "example"
      ],
      "category_ids": [
        1
      ],
      "code": "example",
      "created_at": "example",
      "description": "example",
      "display_name": "example",
      "id": 1,
      "is_enabled": true,
      "name": "example",
      "sub_project": "example",
      "updated_at": "example"
    }
  }
}

Create an expense

Create an expense for an employee, as an admin.

Inputs

Employee emailemployee_emailtextRequired
The email address of the employee the expense belongs to.
AmountamountnumberRequired
The amount, in the organization's currency.At least 0.
Spent atspent_atdate and timeRequired
When the money was spent. It can't be in the future.
Purposepurposetext
What the expense was for.
Merchantmerchanttext
Who was paid.
Categorycategory_idnumber
The expense category.
Projectproject_idnumber
The project the expense is for.
Cost centercost_center_idnumber
The cost center the expense is charged to.
Billableis_billabletrue/false
Whether the expense can be billed to a client.
Reference codecodetext
Your own reference for the expense, such as an ID in another system.
Reimbursableis_reimbursabletrue/false
Whether the employee is paid back for it. Leave empty for Fyle's default.

Outputs

dataobject
The response from Fyle.
Example output
{
  "data": {
    "data": {
      "admin_amount": 1,
      "amount": 1,
      "category": {
        "display_name": "example",
        "id": 1,
        "name": "example",
        "sub_category": "example"
      },
      "category_id": 1,
      "claim_amount": 1,
      "code": "example",
      "cost_center": {
        "code": "example",
        "id": 1,
        "name": "example"
      },
      "cost_center_id": 1,
      "created_at": "example",
      "currency": "example",
      "employee_id": "example",
      "file_ids": [
        "example"
      ],
      "foreign_amount": 1,
      "foreign_currency": "example",
      "id": "example",
      "is_billable": true,
      "is_exported": true,
      "is_manually_flagged": true,
      "is_policy_flagged": true,
      "is_reimbursable": true,
      "is_verified": true,
      "merchant": "example",
      "project": {
        "display_name": "example",
        "id": 1,
        "name": "example",
        "sub_project": "example"
      },
      "project_id": 1,
      "purpose": "example",
      "report_id": "example",
      "seq_num": "example",
      "source": "example",
      "spent_at": "example",
      "state": "DRAFT",
      "state_display_name": "example",
      "tax_amount": 1,
      "updated_at": "example",
      "user": {
        "email": "example",
        "full_name": "example",
        "id": "example"
      },
      "user_id": "example"
    }
  }
}

Delete a cost center

Delete a cost center that no expense or other record uses yet. Fyle refuses one in use.

Inputs

Cost centercost_center_idnumberRequired
The cost center to delete.

Outputs

dataobject
The response from Fyle.
Example output
{
  "data": {}
}

Delete a project

Delete a project that no expense or other record uses yet. Fyle refuses one in use.

Inputs

Projectproject_idnumberRequired
The project to delete.

Outputs

dataobject
The response from Fyle.
Example output
{
  "data": {}
}

Delete an expense

Delete an expense. This can't be undone.

Inputs

Expense IDexpense_idtextRequired
The expense to delete.

Outputs

dataobject
The response from Fyle.
Example output
{
  "data": {}
}

Get an expense

Get one expense with its amount, state, category, project and report.

Inputs

Expense IDexpense_idtextRequired
The expense to read, such as txAbC123.

Outputs

dataobject
The response from Fyle.
Example output
{
  "data": {
    "admin_amount": 1,
    "amount": 1,
    "category": {
      "display_name": "example",
      "id": 1,
      "name": "example",
      "sub_category": "example"
    },
    "category_id": 1,
    "claim_amount": 1,
    "code": "example",
    "cost_center": {
      "code": "example",
      "id": 1,
      "name": "example"
    },
    "cost_center_id": 1,
    "created_at": "example",
    "currency": "example",
    "employee_id": "example",
    "file_ids": [
      "example"
    ],
    "foreign_amount": 1,
    "foreign_currency": "example",
    "id": "example",
    "is_billable": true,
    "is_exported": true,
    "is_manually_flagged": true,
    "is_policy_flagged": true,
    "is_reimbursable": true,
    "is_verified": true,
    "merchant": "example",
    "project": {
      "display_name": "example",
      "id": 1,
      "name": "example",
      "sub_project": "example"
    },
    "project_id": 1,
    "purpose": "example",
    "report_id": "example",
    "seq_num": "example",
    "source": "example",
    "spent_at": "example",
    "state": "DRAFT",
    "state_display_name": "example",
    "tax_amount": 1,
    "updated_at": "example",
    "user": {
      "email": "example",
      "full_name": "example",
      "id": "example"
    },
    "user_id": "example"
  }
}

Get an expense report

Get one expense report with its state, amount and approvers.

Inputs

Reportreport_idtextRequired
The report to read.

Outputs

dataobject
The response from Fyle.
Example output
{
  "data": {
    "amount": 1,
    "created_at": "example",
    "currency": "example",
    "employee_id": "example",
    "id": "example",
    "is_exported": true,
    "is_manually_flagged": true,
    "is_policy_flagged": true,
    "is_verified": true,
    "last_approved_at": "example",
    "last_paid_at": "example",
    "last_submitted_at": "example",
    "next_approver_user_ids": [
      "example"
    ],
    "num_expenses": 1,
    "purpose": "example",
    "reimbursement_id": "example",
    "seq_num": "example",
    "state": "DRAFT",
    "state_display_name": "example",
    "tax": 1,
    "updated_at": "example",
    "user": {
      "email": "example",
      "full_name": "example",
      "id": "example"
    },
    "user_id": "example"
  }
}

Get my profile

Get the connected person's profile, their roles and their organization.

Inputs

None.

Outputs

dataobject
The response from Fyle.
Example output
{
  "data": {
    "data": {
      "org": {
        "currency": "example",
        "domain": "example",
        "id": "example",
        "name": "example"
      },
      "org_id": "example",
      "roles": [
        "example"
      ],
      "user": {
        "email": "example",
        "full_name": "example",
        "id": "example"
      },
      "user_id": "example"
    }
  }
}

List advance requests

List employees' requests for cash advances, newest first.

Inputs

Statestatetext
Only requests in this state.One of: DRAFT, APPROVAL_PENDING (Awaiting approval), APPROVED, SENT_BACK (Sent back), PULLED_BACK (Pulled back), REJECTED, PAID.
Employeeemployee_idtext
Only this employee's records.
Updated sinceupdated_sincedate and time
Only records changed at or after this time.
Limitlimitnumber
How many advance requests to return, up to 200.From 1 to 200. Default: 50.
Offsetoffsetnumber
How many advance requests to skip, to read the next page.At least 0.

Outputs

dataobject
The response from Fyle.
Example output
{
  "data": {
    "count": 1,
    "data": [
      {
        "amount": 1,
        "code": "example",
        "created_at": "example",
        "currency": "example",
        "employee_id": "example",
        "id": "example",
        "is_exported": true,
        "last_approved_at": "example",
        "notes": "example",
        "project_id": 1,
        "purpose": "example",
        "seq_num": "example",
        "state": "DRAFT",
        "updated_at": "example",
        "user_id": "example"
      }
    ],
    "offset": 1
  }
}

List categories

List the organization's expense categories.

Inputs

Name containsnametext
Only categories whose name contains this text.
Enabledis_enabledtrue/false
Only enabled categories, or only disabled ones.
Limitlimitnumber
How many categories to return, up to 200.From 1 to 200. Default: 50.
Offsetoffsetnumber
How many categories to skip, to read the next page.At least 0.

Outputs

dataobject
The response from Fyle.
Example output
{
  "data": {
    "count": 1,
    "data": [
      {
        "code": "example",
        "created_at": "example",
        "display_name": "example",
        "id": 1,
        "is_enabled": true,
        "name": "example",
        "sub_category": "example",
        "system_category": "example",
        "updated_at": "example"
      }
    ],
    "offset": 1
  }
}

List corporate card transactions

List corporate card transactions, newest first, with whether each is matched to an expense.

Inputs

Statusstatustext
Only posted or only pending transactions.One of: POSTED, PENDING.
Assigned to user IDassigned_user_idtext
Only transactions assigned to this person (their user ID).
Updated sinceupdated_sincedate and time
Only records changed at or after this time.
Limitlimitnumber
How many transactions to return, up to 200.From 1 to 200. Default: 50.
Offsetoffsetnumber
How many transactions to skip, to read the next page.At least 0.

Outputs

dataobject
The response from Fyle.
Example output
{
  "data": {
    "count": 1,
    "data": [
      {
        "amount": 1,
        "category": "example",
        "created_at": "example",
        "currency": "example",
        "description": "example",
        "foreign_amount": 1,
        "foreign_currency": "example",
        "id": "example",
        "is_assigned": true,
        "is_dismissed": true,
        "is_exported": true,
        "is_marked_personal": true,
        "matched_expense_ids": [
          "example"
        ],
        "mcc": "example",
        "merchant": "example",
        "post_date": "example",
        "spent_at": "example",
        "transaction_status": "POSTED",
        "updated_at": "example",
        "user_id": "example"
      }
    ],
    "offset": 1
  }
}

List cost centers

List the organization's cost centers.

Inputs

Name containsnametext
Only cost centers whose name contains this text.
Enabledis_enabledtrue/false
Only enabled cost centers, or only disabled ones.
Limitlimitnumber
How many cost centers to return, up to 200.From 1 to 200. Default: 50.
Offsetoffsetnumber
How many cost centers to skip, to read the next page.At least 0.

Outputs

dataobject
The response from Fyle.
Example output
{
  "data": {
    "count": 1,
    "data": [
      {
        "code": "example",
        "created_at": "example",
        "description": "example",
        "id": 1,
        "is_enabled": true,
        "name": "example",
        "updated_at": "example"
      }
    ],
    "offset": 1
  }
}

List employees

List the organization's employees with their email addresses. Find one by email.

Inputs

Emailemailtext
Only the employee with exactly this email address.
Enabledis_enabledtrue/false
Only enabled employees, or only disabled ones.
Limitlimitnumber
How many employees to return, up to 200.From 1 to 200. Default: 50.
Offsetoffsetnumber
How many employees to skip, to read the next page.At least 0.

Outputs

dataobject
The response from Fyle.
Example output
{
  "data": {
    "count": 1,
    "data": [
      {
        "approver_user_ids": [
          "example"
        ],
        "code": "example",
        "created_at": "example",
        "department_id": "example",
        "has_accepted_invite": true,
        "id": "example",
        "is_enabled": true,
        "joined_at": "example",
        "level_id": "example",
        "mobile": "example",
        "updated_at": "example",
        "user": {
          "email": "example",
          "full_name": "example",
          "id": "example"
        },
        "user_id": "example"
      }
    ],
    "offset": 1
  }
}

List expense reports

List the organization's expense reports, newest first. Filter by state, employee or when they changed.

Inputs

Statestatetext
Only reports in this state.One of: DRAFT, APPROVER_PENDING (Awaiting approval), APPROVER_INQUIRY (Sent back), APPROVED, PAYMENT_PENDING (Payment pending), PAYMENT_PROCESSING (Payment processing), PAID.
Employeeemployee_idtext
Only this employee's records.
Updated sinceupdated_sincedate and time
Only records changed at or after this time.
Limitlimitnumber
How many reports to return, up to 200.From 1 to 200. Default: 50.
Offsetoffsetnumber
How many reports to skip, to read the next page.At least 0.

Outputs

dataobject
The response from Fyle.
Example output
{
  "data": {
    "count": 1,
    "data": [
      {
        "amount": 1,
        "created_at": "example",
        "currency": "example",
        "employee_id": "example",
        "id": "example",
        "is_exported": true,
        "is_manually_flagged": true,
        "is_policy_flagged": true,
        "is_verified": true,
        "last_approved_at": "example",
        "last_paid_at": "example",
        "last_submitted_at": "example",
        "next_approver_user_ids": [
          "example"
        ],
        "num_expenses": 1,
        "purpose": "example",
        "reimbursement_id": "example",
        "seq_num": "example",
        "state": "DRAFT",
        "state_display_name": "example",
        "tax": 1,
        "updated_at": "example",
        "user": {
          "email": "example",
          "full_name": "example",
          "id": "example"
        },
        "user_id": "example"
      }
    ],
    "offset": 1
  }
}

List expenses

List the organization's expenses, newest first. Filter by state, employee, report or when they changed.

Inputs

Statestatetext
Only expenses in this state.One of: DRAFT, COMPLETE (Complete (not yet reported)), APPROVER_PENDING (Awaiting approval), APPROVED, PAYMENT_PENDING (Payment pending), PAYMENT_PROCESSING (Payment processing), PAID, UNREPORTABLE (Can't be reported).
Employeeemployee_idtext
Only this employee's records.
Reportreport_idtext
Only the expenses on this report.
Updated sinceupdated_sincedate and time
Only records changed at or after this time.
Spent on or afterspent_fromdate and time
Only expenses spent on or after this time.
Limitlimitnumber
How many expenses to return, up to 200.From 1 to 200. Default: 50.
Offsetoffsetnumber
How many expenses to skip, to read the next page.At least 0.

Outputs

dataobject
The response from Fyle.
Example output
{
  "data": {
    "count": 1,
    "data": [
      {
        "admin_amount": 1,
        "amount": 1,
        "category": {
          "display_name": "example",
          "id": 1,
          "name": "example",
          "sub_category": "example"
        },
        "category_id": 1,
        "claim_amount": 1,
        "code": "example",
        "cost_center": {
          "code": "example",
          "id": 1,
          "name": "example"
        },
        "cost_center_id": 1,
        "created_at": "example",
        "currency": "example",
        "employee_id": "example",
        "file_ids": [
          "example"
        ],
        "foreign_amount": 1,
        "foreign_currency": "example",
        "id": "example",
        "is_billable": true,
        "is_exported": true,
        "is_manually_flagged": true,
        "is_policy_flagged": true,
        "is_reimbursable": true,
        "is_verified": true,
        "merchant": "example",
        "project": {
          "display_name": "example",
          "id": 1,
          "name": "example",
          "sub_project": "example"
        },
        "project_id": 1,
        "purpose": "example",
        "report_id": "example",
        "seq_num": "example",
        "source": "example",
        "spent_at": "example",
        "state": "DRAFT",
        "state_display_name": "example",
        "tax_amount": 1,
        "updated_at": "example",
        "user": {
          "email": "example",
          "full_name": "example",
          "id": "example"
        },
        "user_id": "example"
      }
    ],
    "offset": 1
  }
}

List projects

List the organization's projects.

Inputs

Name containsnametext
Only projects whose name contains this text.
Enabledis_enabledtrue/false
Only enabled projects, or only disabled ones.
Limitlimitnumber
How many projects to return, up to 200.From 1 to 200. Default: 50.
Offsetoffsetnumber
How many projects to skip, to read the next page.At least 0.

Outputs

dataobject
The response from Fyle.
Example output
{
  "data": {
    "count": 1,
    "data": [
      {
        "approver_user_ids": [
          "example"
        ],
        "category_ids": [
          1
        ],
        "code": "example",
        "created_at": "example",
        "description": "example",
        "display_name": "example",
        "id": 1,
        "is_enabled": true,
        "name": "example",
        "sub_project": "example",
        "updated_at": "example"
      }
    ],
    "offset": 1
  }
}

List reimbursements

List reimbursements paid to employees, newest first.

Inputs

Employeeemployee_idtext
Only this employee's records.
Paid sincepaid_sincedate and time
Only reimbursements paid at or after this time.
Limitlimitnumber
How many reimbursements to return, up to 200.From 1 to 200. Default: 50.
Offsetoffsetnumber
How many reimbursements to skip, to read the next page.At least 0.

Outputs

dataobject
The response from Fyle.
Example output
{
  "data": {
    "count": 1,
    "data": [
      {
        "amount": 1,
        "code": "example",
        "created_at": "example",
        "currency": "example",
        "employee_id": "example",
        "id": "example",
        "is_exported": true,
        "mode": "ACH",
        "paid_at": "example",
        "purpose": "example",
        "reimbursement_number": "example",
        "updated_at": "example",
        "user_id": "example"
      }
    ],
    "offset": 1
  }
}

Mark an expense report as paid

Mark an approved expense report as paid, when you reimbursed it outside Fyle.

Inputs

Reportreport_idtextRequired
The report that was paid.

Outputs

dataobject
The response from Fyle.
Example output
{
  "data": {}
}

Send back an expense report

Send an expense report back to the employee, saying why.

Inputs

Reportreport_idtextRequired
The report to send back.
ReasoncommenttextRequired
Why you're sending the report back.

Outputs

dataobject
The response from Fyle.
Example output
{
  "data": {
    "data": {
      "amount": 1,
      "created_at": "example",
      "currency": "example",
      "employee_id": "example",
      "id": "example",
      "is_exported": true,
      "is_manually_flagged": true,
      "is_policy_flagged": true,
      "is_verified": true,
      "last_approved_at": "example",
      "last_paid_at": "example",
      "last_submitted_at": "example",
      "next_approver_user_ids": [
        "example"
      ],
      "num_expenses": 1,
      "purpose": "example",
      "reimbursement_id": "example",
      "seq_num": "example",
      "state": "DRAFT",
      "state_display_name": "example",
      "tax": 1,
      "updated_at": "example",
      "user": {
        "email": "example",
        "full_name": "example",
        "id": "example"
      },
      "user_id": "example"
    }
  }
}

Submit expenses as a report

Put an employee's expenses on a new expense report and submit it for approval, on their behalf.

Inputs

Expense IDsexpense_idslistRequired
The expenses to submit, such as txAbC123. They must belong to the same employee and not be on a report yet.

Outputs

dataobject
The response from Fyle.
Example output
{
  "data": {}
}

Update a project

Rename a project, or change its code, description or whether it's enabled.

Inputs

Projectproject_idnumberRequired
The project to change.
NamenametextRequired
The project's name. Fyle needs it on every change: enter the current name to keep it.
Sub-projectsub_projecttext
A sub-project name.
Codecodetext
A code to match the project in another system.
Descriptiondescriptiontext
A description.
Enabledis_enabledtrue/false
Whether employees can use the project.

Outputs

dataobject
The response from Fyle.
Example output
{
  "data": {
    "data": {
      "approver_user_ids": [
        "example"
      ],
      "category_ids": [
        1
      ],
      "code": "example",
      "created_at": "example",
      "description": "example",
      "display_name": "example",
      "id": 1,
      "is_enabled": true,
      "name": "example",
      "sub_project": "example",
      "updated_at": "example"
    }
  }
}

Update an expense

Change an expense's purpose, merchant, amount, category, project, cost center or billable flag. Only the fields you fill in change.

Inputs

Expense IDexpense_idtextRequired
The expense to change.
Amountamountnumber
The new amount, in the organization's currency.At least 0.
Purposepurposetext
What the expense was for.
Merchantmerchanttext
Who was paid.
Categorycategory_idnumber
The expense category.
Projectproject_idnumber
The project the expense is for.
Cost centercost_center_idnumber
The cost center the expense is charged to.
Billableis_billabletrue/false
Whether the expense can be billed to a client.
Reference codecodetext
Your own reference for the expense, such as an ID in another system.

Outputs

dataobject
The response from Fyle.
Example output
{
  "data": {
    "data": {
      "admin_amount": 1,
      "amount": 1,
      "category": {
        "display_name": "example",
        "id": 1,
        "name": "example",
        "sub_category": "example"
      },
      "category_id": 1,
      "claim_amount": 1,
      "code": "example",
      "cost_center": {
        "code": "example",
        "id": 1,
        "name": "example"
      },
      "cost_center_id": 1,
      "created_at": "example",
      "currency": "example",
      "employee_id": "example",
      "file_ids": [
        "example"
      ],
      "foreign_amount": 1,
      "foreign_currency": "example",
      "id": "example",
      "is_billable": true,
      "is_exported": true,
      "is_manually_flagged": true,
      "is_policy_flagged": true,
      "is_reimbursable": true,
      "is_verified": true,
      "merchant": "example",
      "project": {
        "display_name": "example",
        "id": 1,
        "name": "example",
        "sub_project": "example"
      },
      "project_id": 1,
      "purpose": "example",
      "report_id": "example",
      "seq_num": "example",
      "source": "example",
      "spent_at": "example",
      "state": "DRAFT",
      "state_display_name": "example",
      "tax_amount": 1,
      "updated_at": "example",
      "user": {
        "email": "example",
        "full_name": "example",
        "id": "example"
      },
      "user_id": "example"
    }
  }
}

On this page