Kantata Kantata OX Knowledge Base
Release Notes
Status Page

Expense Report Submissions

Expense report submissions contain a set of expense line items. These expenses must be approved through an expense report submission before they can be added to an invoice. All submission expenses must be in the same workspace (project).

Fetching a list of Expense Report Submissions

Returns expense report submissions for the logged in user by default. When all_on_account filter is set to true, the endpoint returns all expense report submissions on the account visible to the user.

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.

Request
query Parameters
active
boolean

Returns only active submissions.

all_on_account
boolean
Default: false

Return expense report submissions on the account.

created_after
string <date-time>

Filter for records created after a specified datetime. The datetime must be in ISO 8601 format.

created_before
string <date-time>

Filter for records created before a specified datetime. The datetime must be in ISO 8601 format.

external_reference_external_message
string

Filter the objects based on the external message of their associated external references. This is an exact match.

external_reference_external_status
string

Filter by the status of the external object in the external system.

external_reference_service_model
string

Filter by the type of the external object this external reference belongs to.

external_reference_service_model_ref
integer <int32>

Filter by the id of the external object this external reference belongs to.

external_reference_service_model_refs
string

Filter for objects that correlate to the specified external object IDs. Provide a comma-separated list of up to 200 external IDs.

external_reference_service_name
string

Filter by the name of the provider for integration.

external_reference_status
string

Filter by the status of the integration, this can be successful or fail.

has_external_references
boolean

Filter by whether or not the object has external references.

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.
not_cancelled
boolean

Returns only submissions that are not cancelled.

only
string

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.

order
string
Default: "created_at:desc"

Supply order with the name of a valid sort field for the endpoint and a direction.

Valid values: amount:asc, amount:desc, created_at:asc, created_at:desc, date:asc, date:desc, status:asc, status:desc, title:asc, title:desc, workspace_title:asc, and workspace_title:desc.

page
integer <int32>
Default: 1
per_page
integer <int32> <= 200
Default: 20
statuses
string

Returns submissions with the statuses specified. Multiple statuses can be supplied in a comma separated list. Valid values: ‘new’, ‘cancelled’, ‘rejected’, and ‘approved’.

updated_after
string <date-time>

Filter for records updated after a specified datetime. The datetime must be in ISO 8601 format.

updated_before
string <date-time>

Filter for records updated before a specified datetime. The datetime must be in ISO 8601 format.

user_ids
string

Only includes submissions associated with the specified user ids.

without_external_reference_service_name
string

Exclude by the existence of an external reference with the specified service name.

workspace_id
integer <int32>

Ordered by the submission's workspace id.

workspace_ids
string

Only includes submissions associated with the specified workspace ids.

Responses
200

A list of Expense Report Submissions have been retrieved.

Response Schema: application/json
count
integer <int32>
object
Array of objects
object
object
object
object
object
object
400

Bad Request

401

Unauthorized request

403

Forbidden request

404

Page Not Found

422

Unprocessable Entity

503

Service is unavailable

get/expense_report_submissions
Request samples
Response samples
application/json
{
  • "count": 0,
  • "meta": {
    },
  • "results": [
    ],
  • "expense_report_submissions": {
    },
  • "external_references": {
    },
  • "users": {
    },
  • "workspaces": {
    },
  • "expenses": {
    },
  • "resolutions": {
    }
}

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.

Request
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 Body schema: application/json
required
object
line_item_ids
required
Array of integers <int32>

An array of expense ids of the expenses that will be included in the Expense Report Submission.

user_id
integer <int32>

This can be included when the Expense Report Submission is being submitted on behalf of another user.

title
required
string

The title of the Expense Report Submission.

workspace_id
required
integer <int32>

The id of the workspace that will own the Expense Report Submission and its expenses.

comment
string

Additional notes on the Expense Report Submission.

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

Responses
200

Expense Report Submission has been created.

Response Schema: application/json
count
integer <int32>
object
Array of objects
object
object
object
object
object
object
400

Bad Request

401

Unauthorized request

403

Forbidden request

404

Page Not Found

422

Unprocessable Entity

503

Service is unavailable

post/expense_report_submissions
Request samples
application/json
{
  • "expense_report_submission": {
    }
}
Response samples
application/json
{
  • "count": 0,
  • "meta": {
    },
  • "results": [
    ],
  • "expense_report_submissions": {
    },
  • "external_references": {
    },
  • "users": {
    },
  • "workspaces": {
    },
  • "expenses": {
    },
  • "resolutions": {
    }
}

Fetching a single 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.

Request
path Parameters
id
required
integer

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.

  • 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.
Responses
200

The Expense Report Submission has been retrieved.

Response Schema: application/json
count
integer <int32>
object
Array of objects
object
object
object
object
object
object
400

Bad Request

401

Unauthorized request

403

Forbidden request

404

Page Not Found

422

Unprocessable Entity

503

Service is unavailable

get/expense_report_submissions/{id}
Request samples
Response samples
application/json
{
  • "count": 0,
  • "meta": {
    },
  • "results": [
    ],
  • "expense_report_submissions": {
    },
  • "external_references": {
    },
  • "users": {
    },
  • "workspaces": {
    },
  • "expenses": {
    },
  • "resolutions": {
    }
}

Approve an Expense Report Submission

You can approve an Expense Report Submission by accessing the approve endpoint

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

Request
path Parameters
id
required
integer

The ID of the Model.

Request Body schema: application/json
required
object
description
string

Any additional details about the resolution can be added in the description.

Responses
200

Resolution has been updated.

Response Schema: application/json
count
integer <int32>
object
Array of objects
object
400

Bad Request

401

Unauthorized request

403

Forbidden request

404

Page Not Found

422

Unprocessable Entity

503

Service is unavailable

put/expense_report_submissions/{id}/approve
Request samples
application/json
{
  • "resolution": {
    }
}
Response samples
application/json
{
  • "count": 0,
  • "meta": {
    },
  • "results": [
    ],
  • "resolutions": {
    }
}

Cancel an Expense Report Submission

You can cancel an Expense Report Submission by accessing the cancel endpoint

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

Request
path Parameters
id
required
integer

The ID of the Model.

Request Body schema: application/json
required
object
description
string

Any additional details about the resolution can be added in the description.

Responses
200

Resolution has been updated.

Response Schema: application/json
count
integer <int32>
object
Array of objects
object
400

Bad Request

401

Unauthorized request

403

Forbidden request

404

Page Not Found

422

Unprocessable Entity

503

Service is unavailable

put/expense_report_submissions/{id}/cancel
Request samples
application/json
{
  • "resolution": {
    }
}
Response samples
application/json
{
  • "count": 0,
  • "meta": {
    },
  • "results": [
    ],
  • "resolutions": {
    }
}

Reject an Expense Report Submission

You can reject an Expense Report Submission by accessing the reject endpoint

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

Request
path Parameters
id
required
integer

The ID of the Model.

Request Body schema: application/json
required
object
description
string

Any additional details about the resolution can be added in the description.

Responses
200

Resolution has been updated.

Response Schema: application/json
count
integer <int32>
object
Array of objects
object
400

Bad Request

401

Unauthorized request

403

Forbidden request

404

Page Not Found

422

Unprocessable Entity

503

Service is unavailable

put/expense_report_submissions/{id}/reject
Request samples
application/json
{
  • "resolution": {
    }
}
Response samples
application/json
{
  • "count": 0,
  • "meta": {
    },
  • "results": [
    ],
  • "resolutions": {
    }
}