Fetching a list of Expenses
The expenses endpoint provides a list of every expense that the user making the request is allowed to see— across all projects to which the user belongs.
The response will contain an array of expense objects, sorted by the date attribute in descending order, available under the expenses key.
This endpoint returns structured Expense objects. As with all Kantata OX API endpoints, the returned data will be referenced in sorted order in the results array and will be indexed by ID in the expenses top-level JSON key. Please see our Response Format section for more information.
Request
- Base URLhttps://api.mavenlink.com/api/v1
- Authnone declared
Query parameters
Filter for expenses that are on approved expense reports, or on a workspace that does not require approvals.
Filter for records created after a specified datetime. The datetime must be in ISO 8601 format.
Filter for records created before a specified datetime. The datetime must be in ISO 8601 format.
Filter for expenses between the start and end dates in a colon-separated YYYY-MM-DD format. For example, 2013-06-01:2013-08-01. If a date is not specified, it is interpreted as no start/end date.
Filter the objects based on the external message of their associated external references. This is an exact match.
Filter by the status of the external object in the external system.
Filter by the type of the external object this external reference belongs to.
Filter by the id of the external object this external reference belongs to.
Filter for objects that correlate to the specified external object IDs. Provide a comma-separated list of up to 200 external IDs.
Filter by the name of the provider for integration.
Filter by the status of the integration, this can be successful or fail.
Filter for expenses from archived projects.
Filter by whether or not the object has external references.
Limit results to time entries current in the specified active invoice.
Any of the below associations can be included in your request by providing the include param, e.g. include=association1,association2.
- active_submission (ExpenseReportSubmission) - The active expense report the expense is submitted in. The response will include active_submission_id, which references the data in the expense_report_submissions top-level key.
- expense_budget (ExpenseBudget) - Retrieves the expense budget the expense is logged to. The response will include expense_budget_id, which references the data in the expense_budgets top-level key.
- expense_category (ExpenseCategory) - The category associated with the expense. The response will include expense_category, which references the data in the expense_categories top-level key.
- external_references (ExternalReference) - Includes references to external integrations for this object.
- receipt (Attachments::ReceiptAttachment) - Information about receipts associated with this expense. The response will include receipt_id, which references the data in the attachments top-level key.
- recent_submission (ExpenseReportSubmission) - The most recent expense report the expense was submitted in, including any rejected or cancelled reports. The response will include recent_submission_id, which references the data in the expense_report_submissions top-level key.
- role (Role) - The role of the user. The response will include role_id, which references the data in the roles top-level key.
- story (Story) - Linked task. The response will include story_id, which references the data in the stories top-level key.
- user (User) - The user who created the expense. The response will include user_id, which references the data in the users top-level key.
- vendor (Vendor) - The party to which the expense is payable. The response will include vendor_id, which references the data in the vendors top-level key.
- workspace (Workspace) - The project to which this expense belongs. The response will include workspace_id, which references the data in the workspaces top-level key.
Include expenses that have been invoiced.
Filter for expenses created by the user.
Only include expenses that are on internal projects. On my account false will include internal and external expenses.
Allows you to request one or more resources directly by ID. Multiple IDs can be supplied in a comma separated list, like GET /api/v1/workspaces.json?only=5,6,7.
Allows you to request one or more optional fields as an array.
Supply order with the name of a valid sort field for the endpoint and a direction.
Valid values: amount:asc, amount:desc, category:asc, category:desc, created_at:asc, created_at:desc, date:asc, date:desc, notes:asc, notes:desc, vendor_name:asc, and vendor_name:desc.
Filter for expenses that are reimbursable based on the provided value.
Filter for expenses that have been submitted.
Filter for expenses that have not been invoiced.
Filter for expenses that have not been submitted.
Filter for records updated after a specified datetime. The datetime must be in ISO 8601 format.
Filter for records updated before a specified datetime. The datetime must be in ISO 8601 format.
Filter for expenses associated with the specified expense report ID. If the report was canceled or rejected, no result is returned.
Filter for expenses associated with the specified expense report IDs, including from canceled and rejected reports. Give multiple report IDs in a comma separated list.
**Note**: Expenses are only associated with the most recent reports they were submitted in (`recent_submission`).
If you re-submit an expense from a canceled or rejected report in a new report, the expense will only be returned
in association with that most recent submission`.
Exclude by the existence of an external reference with the specified service name.
Filter for expenses associated with the specified project ID.
Response
A list of Expenses have been retrieved.
Changes
No recorded changes to this operation across all 1 revision of this API.