# Creating a new Expense Report Submission

This endpoint returns structured Expense Report Submission 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 expense_report_submissions top-level JSON key.
Please see our Response Format section for more information.

Endpoint: POST /expense_report_submissions
Version: 1.0.0

## 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.
- expenses (Expense) - Include expense line items with the expense report submission.
- external_references (ExternalReference) - Includes references to external integrations for this object.
- resolutions (Resolution) - Include the resolutions (approvals, rejections, or cancelations).
- user (User) - Includes user who owns the line items on the submission.
- workspace (Workspace) - Includes workspace to which the submission belongs.

## Request fields (application/json):

  - `expense_report_submission` (object)

  - `expense_report_submission.line_item_ids` (array, required)
    An array of expense ids of the expenses that will be included in the Expense Report Submission.

  - `expense_report_submission.title` (string, required)
    The title of the Expense Report Submission.

  - `expense_report_submission.workspace_id` (integer, required)
    The id of the workspace that will own the Expense Report Submission and its expenses.

  - `expense_report_submission.user_id` (integer)
    This can be included when the Expense Report Submission is being submitted on behalf of another user.

  - `expense_report_submission.comment` (string)
    Additional notes on the Expense Report Submission.

  - `expense_report_submission.external_reference` (object)
    Typically populated programmatically by a third party system via an integration, this is an optional
object that holds data from an external system. It connects objects in an external system with objects in
Kantata OX (for example, to connect a Jira issue to a Kantata OX Project).

  - `expense_report_submission.external_reference.service_name` (string, required)
    The provider name of the integration. If you are adding multiple external references to the same object, the service_name must be unique.

  - `expense_report_submission.external_reference.service_model` (string, required)
    The object type of the external object this external reference belongs to.

  - `expense_report_submission.external_reference.service_model_ref` (string, required)
    The object ID of the external object this external reference belongs to.

  - `expense_report_submission.external_reference.status` (string)
    The status of the integration. Options are successful, pending,  or failed.

  - `expense_report_submission.external_reference.external_message` (string)
    The message on the external object.

  - `expense_report_submission.external_reference.external_link` (string)
    The link to the external object.

  - `expense_report_submission.external_reference.external_status` (string)
    The status of the external object in the external system.

  - `expense_report_submission.external_reference.locked` (boolean)
    Whether the subject is locked.

## 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)

  - `expense_report_submissions` (object)

  - `external_references` (object)

  - `users` (object)

  - `workspaces` (object)

  - `expenses` (object)

  - `resolutions` (object)

## Response 400 fields (application/json):

  - `errors` (array)

  - `errors.type` (string)

  - `errors.message` (string)


