# Fetching a single Expense

You can request either GET /api/v1/expenses.json?only=5 or
GET /api/v1/expenses/5.json.  In both cases, default filters will be applied. Unless you
provide the from_archived_workspaces:true filter you won't receive expenses from archived projects,
and will get a 404 status on the "show" route.


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.

Endpoint: GET /expenses/{id}
Version: 1.0.0

## Path parameters:

  - `id` (integer, required)
    The ID of the Model.

## Query parameters:

  - `include` (string)
    Any of the below associations can be included in your request by providing the include param, e.g. include=association1,association2.
- active_submission (ExpenseReportSubmission)
- expense_category (ExpenseCategory) - The category associated with the expense.
- external_references (ExternalReference) - Includes references to external integrations for this object.
- receipt (Attachments::ReceiptAttachment) - Information about receipts associated with this expense, returned 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.
- role (Role) - The role of the user.
- story (Story) - Linked task, returned in the stories top-level key.
- user (User) - The user who created the expense, returned in the users top-level key.
- vendor (Vendor) - The party to which the expense is payable.
- workspace (Workspace) - The project to which this expense belongs, returned in the workspaces top-level key.

  - `optional_fields` (array)
    Allows you to request one or more optional fields as an array.
    Enum: "user_can_edit"

## Response 200 fields (application/json):

  - `count` (integer)

  - `meta` (object)

  - `meta.count` (integer)

  - `meta.page_count` (integer)

  - `meta.page_number` (integer)

  - `meta.page_size` (integer)

  - `results` (array)

  - `results.key` (string)

  - `results.id` (string)

  - `expenses` (object)

  - `external_references` (object)

  - `stories` (object)

  - `workspaces` (object)

  - `users` (object)

  - `attachments` (object)

  - `expense_report_submissions` (object)

  - `expense_categories` (object)

  - `roles` (object)

  - `vendors` (object)

## Response 400 fields (application/json):

  - `errors` (array)

  - `errors.type` (string)

  - `errors.message` (string)


