Expenses API
Overview
When working with the Expenses API, you've got a few resource endpoints you can work from:
Resource | Path | Description |
---|---|---|
Full expense reports | /api/expense_reports/ |
Full expense reports that contains information on approvals, comments, users, history and more. See Actions and Elements below for details. |
Expense lines | /api/expense_lines/ |
Expense lines that contain information on accounts, preapprovals, types, attendees, and more. See Expense Lines API for details. |
Expense artifacts | /api/expense_reports/{id}/expense_artifacts |
You can pull individual attachments from the expense header or line using this resource. Path varies on parent item being referenced. See Expense Artifacts API for details. |
Expense API Objects
This is the full list of expense objects available via the UI. However, not all objects listed here have endpoints–some are only referenced by objects, and can't be updated directly.
- Audit Status API
- Expense Artifact API
- Expense Attendee API
- Expense Attendee Type API
- Expense Category API
- Expense Lines API
- Expense Line Allocation API
- Expense Line Attendee API
- Expense Line Imported Data API
- Expense Line Mileage API
- Expense Line Mileage Allocation API
- Expense Line Per Diem API
- Expense Line Tax API
- Expense Preapproval API
- Expense Report Preapproval API
- Expense Violation API
- Itemized Expense Line API
Actions
The Expense Reports API allows you to:
Verb | Path | Action | Description |
---|---|---|---|
PUT | /api/expense_reports/:id/add_approver |
add_approver | Manually add an approver for an expense report |
POST | /api/expense_reports |
create | Create an expense report in draft status |
GET | /api/expense_reports |
index | Query expense reports |
PUT | /api/expense_reports/:id/remove_approval |
remove_approval | Remove an approver who was manually added |
GET | /api/expense_reports/:id |
show | Show expense report |
PUT | /api/expense_reports/:id/submit |
submit | Create an expense report and attempt to submit it for approval |
PATCH | /api/expense_reports/:id |
update | Update expense report |
PUT | /api/expense_reports/:id |
update | Update expense report |
Elements
The following elements are available for the Expense Reports API:
Element | Description | Required Field? | Unique? | Allowable Value | Api_In Field? | Api_Out Field? | Data Type |
---|---|---|---|---|---|---|---|
approvals | Approvals | yes | Approval | ||||
audit-score | Coupa's Audit Score | yes | integer | ||||
auditor-note | Auditor Comments on Expense Report | yes | yes | text | |||
comments | Comments | yes | Comment | ||||
created-at | Time of Record Creation | yes | datetime | ||||
created-by | User who created | yes | User | ||||
currency | Currency Code | yes | Currency | ||||
events | Events | yes | ExpenseReportEventHistory | ||||
expense-lines | Expense lines | yes | yes | ExpenseLine | |||
expense-policy-violations | Expense policy violations | yes | ExpensePolicyViolation | ||||
expense-violations | Expense violations | yes | ExpenseViolation | ||||
expensed-by | Expensed by user | yes | yes | User | |||
exported | Indicates if transaction has been exported | yes | boolean | ||||
external-src-name | External source name | yes | yes | string(255) | |||
external-src-ref | External source reference | yes | yes | string(255) | |||
id | Coupa's Expense Report ID | yes | integer | ||||
last-exported-at | Date and time transaction was last exported in the format YYYY-MM-DDTHH:MM:SS+HH:MMZ | yes | datetime | ||||
paid | Has expense report been paid? | yes | yes | boolean | |||
past-due | Report has passed the due date in the format True or false | true, false | yes | boolean | |||
payment | Payment | yes | yes | Payment | |||
reject-reason | Reason why report was rejected | yes | yes | text | |||
report-due-date | Due date before which report needs to be submitted in the format YYYY-MM-DDTHH:MM:SS+HH:MMZ | yes | datetime | ||||
status | Current Expense Report Status | yes | string(255) | ||||
submitted-at | Date Expense Report was Submitted for Approval | yes | yes | datetime | |||
submitted-by | Submitted by user | yes | User | ||||
title | Expense Report Title | yes | yes | string(255) | |||
total | Expense Report Total in Transactional Currency | yes | decimal(32,4) | ||||
updated-at | Time of Record Creation | yes | datetime | ||||
updated-by | User who updated | yes | User |