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
| Action | What it does |
|---|---|
| Approve an expense report | Approve an expense report as an admin. |
| Comment on an expense | Add a comment to an expense, and tell its owner if you choose. |
| Comment on an expense report | Add a comment to an expense report. |
| Create a cost center | Create a cost center that expenses can be charged to. |
| Create a project | Create a project that expenses can be filed against. |
| Create an expense | Create an expense for an employee, as an admin. |
| Delete a cost center | Delete a cost center that no expense or other record uses yet. |
| Delete a project | Delete a project that no expense or other record uses yet. |
| Delete an expense | Delete an expense. |
| Get an expense | Get one expense with its amount, state, category, project and report. |
| Get an expense report | Get one expense report with its state, amount and approvers. |
| Get my profile | Get the connected person's profile, their roles and their organization. |
| List advance requests | List employees' requests for cash advances, newest first. |
| List categories | List the organization's expense categories. |
| List corporate card transactions | List corporate card transactions, newest first, with whether each is matched to an expense. |
| List cost centers | List the organization's cost centers. |
| List employees | List the organization's employees with their email addresses. |
| List expense reports | List the organization's expense reports, newest first. |
| List expenses | List the organization's expenses, newest first. |
| List projects | List the organization's projects. |
| List reimbursements | List reimbursements paid to employees, newest first. |
| Mark an expense report as paid | Mark an approved expense report as paid, when you reimbursed it outside Fyle. |
| Send back an expense report | Send an expense report back to the employee, saying why. |
| Submit expenses as a report | Put an employee's expenses on a new expense report and submit it for approval, on their behalf. |
| Update a project | Rename a project, or change its code, description or whether it's enabled. |
| Update an expense | Change 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
- Report
report_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 ID
expense_idtextRequired - The expense to comment on.
- Comment
commenttextRequired - The comment.
- Notify the employee
notifytrue/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
- Report
report_idtextRequired - The report to comment on.
- Comment
commenttextRequired - 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
- Name
nametextRequired - The cost center's name.
- Code
codetext - A code to match the cost center in another system.
- Description
descriptiontext - A description.
- Enabled
is_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
- Name
nametextRequired - The project's name.
- Sub-project
sub_projecttext - A sub-project name, shown as Name / Sub-project.
- Code
codetext - A code to match the project in another system.
- Description
descriptiontext - A description.
- Enabled
is_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 email
employee_emailtextRequired - The email address of the employee the expense belongs to.
- Amount
amountnumberRequired - The amount, in the organization's currency.At least 0.
- Spent at
spent_atdate and timeRequired - When the money was spent. It can't be in the future.
- Purpose
purposetext - What the expense was for.
- Merchant
merchanttext - Who was paid.
- Category
category_idnumber - The expense category.
- Project
project_idnumber - The project the expense is for.
- Cost center
cost_center_idnumber - The cost center the expense is charged to.
- Billable
is_billabletrue/false - Whether the expense can be billed to a client.
- Reference code
codetext - Your own reference for the expense, such as an ID in another system.
- Reimbursable
is_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 center
cost_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
- Project
project_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 ID
expense_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 ID
expense_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
- Report
report_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
- State
statetext - Only requests in this state.One of:
DRAFT,APPROVAL_PENDING(Awaiting approval),APPROVED,SENT_BACK(Sent back),PULLED_BACK(Pulled back),REJECTED,PAID. - Employee
employee_idtext - Only this employee's records.
- Updated since
updated_sincedate and time - Only records changed at or after this time.
- Limit
limitnumber - How many advance requests to return, up to 200.From 1 to 200. Default:
50. - Offset
offsetnumber - 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 contains
nametext - Only categories whose name contains this text.
- Enabled
is_enabledtrue/false - Only enabled categories, or only disabled ones.
- Limit
limitnumber - How many categories to return, up to 200.From 1 to 200. Default:
50. - Offset
offsetnumber - 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
- Status
statustext - Only posted or only pending transactions.One of:
POSTED,PENDING. - Assigned to user ID
assigned_user_idtext - Only transactions assigned to this person (their user ID).
- Updated since
updated_sincedate and time - Only records changed at or after this time.
- Limit
limitnumber - How many transactions to return, up to 200.From 1 to 200. Default:
50. - Offset
offsetnumber - 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 contains
nametext - Only cost centers whose name contains this text.
- Enabled
is_enabledtrue/false - Only enabled cost centers, or only disabled ones.
- Limit
limitnumber - How many cost centers to return, up to 200.From 1 to 200. Default:
50. - Offset
offsetnumber - 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
- Email
emailtext - Only the employee with exactly this email address.
- Enabled
is_enabledtrue/false - Only enabled employees, or only disabled ones.
- Limit
limitnumber - How many employees to return, up to 200.From 1 to 200. Default:
50. - Offset
offsetnumber - 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
- State
statetext - 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. - Employee
employee_idtext - Only this employee's records.
- Updated since
updated_sincedate and time - Only records changed at or after this time.
- Limit
limitnumber - How many reports to return, up to 200.From 1 to 200. Default:
50. - Offset
offsetnumber - 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
- State
statetext - 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). - Employee
employee_idtext - Only this employee's records.
- Report
report_idtext - Only the expenses on this report.
- Updated since
updated_sincedate and time - Only records changed at or after this time.
- Spent on or after
spent_fromdate and time - Only expenses spent on or after this time.
- Limit
limitnumber - How many expenses to return, up to 200.From 1 to 200. Default:
50. - Offset
offsetnumber - 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 contains
nametext - Only projects whose name contains this text.
- Enabled
is_enabledtrue/false - Only enabled projects, or only disabled ones.
- Limit
limitnumber - How many projects to return, up to 200.From 1 to 200. Default:
50. - Offset
offsetnumber - 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
- Employee
employee_idtext - Only this employee's records.
- Paid since
paid_sincedate and time - Only reimbursements paid at or after this time.
- Limit
limitnumber - How many reimbursements to return, up to 200.From 1 to 200. Default:
50. - Offset
offsetnumber - 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
- Report
report_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
- Report
report_idtextRequired - The report to send back.
- Reason
commenttextRequired - 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 IDs
expense_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
- Project
project_idnumberRequired - The project to change.
- Name
nametextRequired - The project's name. Fyle needs it on every change: enter the current name to keep it.
- Sub-project
sub_projecttext - A sub-project name.
- Code
codetext - A code to match the project in another system.
- Description
descriptiontext - A description.
- Enabled
is_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 ID
expense_idtextRequired - The expense to change.
- Amount
amountnumber - The new amount, in the organization's currency.At least 0.
- Purpose
purposetext - What the expense was for.
- Merchant
merchanttext - Who was paid.
- Category
category_idnumber - The expense category.
- Project
project_idnumber - The project the expense is for.
- Cost center
cost_center_idnumber - The cost center the expense is charged to.
- Billable
is_billabletrue/false - Whether the expense can be billed to a client.
- Reference code
codetext - 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"
}
}
}