Kantata Kantata OX Knowledge Base
Release Notes
Status Page

Timesheet Submissions

TimesheetSubmissions hold a set of time entries for a specified week, and can be approved, rejected, or canceled. You can enable Timesheet submissions and approval in your project settings. Once enabled, time entries must be approved through a TimesheetSubmission before it is invoiceable.

Note: Each TimesheetSubmission can only be associated with a single project. So when a timesheet is submitted through the UI with time entries for multiple projects, a separate TimesheetSubmission object is created for each project in the backend.

Fetching a list of Timesheet Submissions

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

Request
query Parameters
active
boolean

Returns only active submissions.

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.

end_date
string <date>

Limit Timesheet Submissions to the week ending with this date. The date 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.

  • external_references (ExternalReference) - Includes references to external integrations for this object.
  • time_entries (TimeEntry) - Reference the Time Entries that belong to the Timesheet Submissions.
  • 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: "date:desc"

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

Valid values: date:asc and date:desc.

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

Limit Timesheet Submissions to the week starting with this date. The date must be in ISO 8601 format.

start_date_after
string <date>

Filter for Timesheet Submissions that start on OR after a specified datetime. The date must be in ISO 8601 format.

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 Timesheet Submissions have been retrieved.

Response Schema: application/json
count
integer <int32>
object
Array of objects
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/timesheet_submissions
Request samples
Response samples
application/json
{
  • "count": 0,
  • "meta": {
    },
  • "results": [
    ],
  • "timesheet_submissions": {
    },
  • "external_references": {
    },
  • "users": {
    },
  • "workspaces": {
    },
  • "time_entries": {
    }
}

Create a Timesheet Submission

Create a new TimesheetSubmission.

Note: Only 1 TimesheetSubmission can be created per project."

This endpoint returns structured Timesheet 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 timesheet_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.

  • external_references (ExternalReference) - Includes references to external integrations for this object.
  • time_entries (TimeEntry) - Reference the Time Entries that belong to the Timesheet Submissions.
  • 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 time entry IDs of the time entries that will be included in the TimesheetSubmission.

user_id
integer <int32>

This can be included when the TimesheetSubmission is being submitted on behalf of another user.

title
required
string

The title of the TimesheetSubmission.

workspace_id
required
integer <int32>

The ID of the project that will own the TimesheetSubmission and its time entries.

comment
string

Additional notes on the TimesheetSubmission.

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

Timesheet Submission has been created.

Response Schema: application/json
count
integer <int32>
object
Array of objects
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/timesheet_submissions
Request samples
application/json
{
  • "timesheet_submission": {
    }
}
Response samples
application/json
{
  • "count": 0,
  • "meta": {
    },
  • "results": [
    ],
  • "timesheet_submissions": {
    },
  • "external_references": {
    },
  • "users": {
    },
  • "workspaces": {
    },
  • "time_entries": {
    }
}

Fetching a single Timesheet Submission

This endpoint returns structured Timesheet 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 timesheet_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.

  • external_references (ExternalReference) - Includes references to external integrations for this object.
  • time_entries (TimeEntry) - Reference the Time Entries that belong to the Timesheet Submissions.
  • user (User) - Includes user who owns the line items on the submission.
  • workspace (Workspace) - Includes workspace to which the submission belongs.
Responses
200

The Timesheet Submission has been retrieved.

Response Schema: application/json
count
integer <int32>
object
Array of objects
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/timesheet_submissions/{id}
Request samples
Response samples
application/json
{
  • "count": 0,
  • "meta": {
    },
  • "results": [
    ],
  • "timesheet_submissions": {
    },
  • "external_references": {
    },
  • "users": {
    },
  • "workspaces": {
    },
  • "time_entries": {
    }
}

Approve a Timesheet Submission

Approve a TimesheetSubmission. You must have Time Approval permissions.

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/timesheet_submissions/{id}/approve
Request samples
application/json
{
  • "resolution": {
    }
}
Response samples
application/json
{
  • "count": 0,
  • "meta": {
    },
  • "results": [
    ],
  • "resolutions": {
    }
}

Cancel a Timesheet Submission

You can cancel a TimesheetSubmission 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/timesheet_submissions/{id}/cancel
Request samples
application/json
{
  • "resolution": {
    }
}
Response samples
application/json
{
  • "count": 0,
  • "meta": {
    },
  • "results": [
    ],
  • "resolutions": {
    }
}

Reject a Timesheet Submission

You can reject a TimesheetSubmission 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/timesheet_submissions/{id}/reject
Request samples
application/json
{
  • "resolution": {
    }
}
Response samples
application/json
{
  • "count": 0,
  • "meta": {
    },
  • "results": [
    ],
  • "resolutions": {
    }
}