Kantata Kantata OX Knowledge Base
Release Notes
Status Page

Time Entries

This object allows you to manage Kantata OX time entries, depending on your permissions. Creating and updating time entries allows you to include time when invoicing clients.

Fetching a list of Time Entries

Returns all time entries visible to the requesting user, unless filter parameters have been applied.

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

Request
query Parameters
approved
boolean

Filter for time entries that are on approved timesheets, or on a workspace that does not require approvals.

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.

created_by
integer <int32>

Filter for time entries created by the specified user.

date_performed_between
string

Filter for time entries with work performed between 2 dates in a colon-separated YYYY-MM-DD format. For example, 2013-06-01:2013-08-01.

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.

from_archived_workspaces
boolean
Default: false

If true, includes time entries from archived projects.

has_external_references
boolean

Filter by whether or not the object has external references.

in_active_invoice_id
boolean

Limit results to time entries current in the specified active invoice.

in_active_submission
boolean

If true, filters for time entries that are part of active timesheet submissions (active_submissions). If false, filters for time entries that are not part of an active submission.

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 (TimesheetSubmission) - Retrieves the active timesheet (i.e. approved or pending) the time entry was submitted on, if any. The response will include active_submission_id, which references the data in the timesheet_submissions top-level key.
  • external_references (ExternalReference) - Includes references to external integrations for this object.
  • invoice (Invoice) - Retrieves the invoice the time entry was added to, if any. The response will include invoice_id, which references the data in the invoices top-level key.
  • recent_submission (TimesheetSubmission) - Retrieves the most recent timesheet the time entry was submitted on, if any, including any rejected or cancelled timesheets. The response will include recent_submission_id, which references the data in the timesheet_submissions top-level key.
  • role (Role) - Retrieves the project role of the user who performed the work for the time entry, if any. The response will include role_id, which references the data in the roles top-level key.
  • story (Story) - Retrieves the task the time entry is tracked to, if any. The response will include story_id, which references the data in the stories top-level key.
  • user (User) - Retrieves the user the time entry belongs to. The response will include user_id, which references the data in the users top-level key.
  • workspace (Workspace) - Retrieves the project the time entry is tracked to. The response will include workspace_id, which references the data in the workspaces top-level key.
invoiced
boolean

Filter for time entries that have been invoiced.

on_my_account
boolean
Default: true

Only include time entries that are on internal projects. On my account false will include internal and external time entries.

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.

optional_fields
Array of strings

Allows you to request one or more optional fields as an array.

Items Enum: "location_id" "user_can_edit"
order
string
Default: "date_performed:desc"

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

Valid values: created_at:asc, created_at:desc, date_performed:asc, date_performed:desc, updated_at:asc, and updated_at:desc.

page
integer <int32>
Default: 1
per_page
integer <int32> <= 200
Default: 20
uninvoiced
boolean

Filter for time entries that have not been invoiced.

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.

with_recent_timesheet_ids
string

Filter for time entries from the specified TimesheetSubmission IDs, including from canceled and rejected reports. Give multiple report IDs in a comma separated list.

    **Note**: Time entries are only associated with the most recent TimesheetSubmission (see `recent_submission`).
    If you re-submit time from a canceled or rejected timesheet, a new `TimesheetSubmission` object is created,
    and the time entries will only be returned in association with the new `TimesheetSubmission` from then on,
    instead of with the canceled or rejected `TimesheetSubmission`.

    Also note that there can only be 1 project per TimesheetSubmission. When a timesheet is submitted through the application frontend with
    time entries for multiple projects, separate TimesheetSubmission objects are created for each project in the backend.
with_timesheet_id
integer <int32>

Filter for time entries from a specified TimesheetSubmission ID. If the timesheet was canceled or rejected, no result is returned.

with_user_ids
string

Filter for time entries associated with the specified user IDs. Give multiple user IDs in a comma separated list. For example, '1,2,3'.

without_external_reference_service_name
string

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

workspace_id
integer <int32>

Filter for time entries from the specified project.

workspace_ids
string

Filter for time entries associated with the specified project IDs. Give multiple project IDs in a comma separated list. For example, '1,2,3'.

Responses
200

A list of Time Entries have been retrieved.

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

Creating a new Time Entry

This endpoint returns structured Time Entry 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 time_entries 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.

  • active_submission (TimesheetSubmission) - Retrieves the active timesheet (i.e. approved or pending) the time entry was submitted on, if any. The response will include active_submission_id, which references the data in the timesheet_submissions top-level key.
  • external_references (ExternalReference) - Includes references to external integrations for this object.
  • invoice (Invoice) - Retrieves the invoice the time entry was added to, if any. The response will include invoice_id, which references the data in the invoices top-level key.
  • recent_submission (TimesheetSubmission) - Retrieves the most recent timesheet the time entry was submitted on, if any, including any rejected or cancelled timesheets. The response will include recent_submission_id, which references the data in the timesheet_submissions top-level key.
  • role (Role) - Retrieves the project role of the user who performed the work for the time entry, if any. The response will include role_id, which references the data in the roles top-level key.
  • story (Story) - Retrieves the task the time entry is tracked to, if any. The response will include story_id, which references the data in the stories top-level key.
  • user (User) - Retrieves the user the time entry belongs to. The response will include user_id, which references the data in the users top-level key.
  • workspace (Workspace) - Retrieves the project the time entry is tracked to. The response will include workspace_id, which references the data in the workspaces top-level key.
optional_fields
Array of strings

Allows you to request one or more optional fields as an array.

Items Enum: "location_id" "user_can_edit"
Request Body schema: application/json
required
object
workspace_id
required
integer <int32>

The ID of the project the time entry is logging work in.

date_performed
required
string <date>

The date the activity for which the time is being entered was performed, format: YYYY-MM-DD. The date must be in ISO 8601 format.

time_in_minutes
required
integer <int32>

The amount of time in minutes that the activity was worked on.

billable
boolean

Whether this Time Entry is billable time. If you don't provide this parameter, billable will be defaulted to the value of the billable flag of its associated Story if any, otherwise to true.

rate_in_cents
integer <int32>

The hourly rate for the time entry in cents.

notes
string

Any notes added to the time entry.

role_id
integer <int32>

The ID of the default Role or user assigned Role for the time entry.

story_id
integer <int32>

The ID of the task (story) this time entry is associated with.

user_id
integer <int32>

This is set to the current_user ID by default. This parameter is ignored unless the authorizing user has financial access in the project and is on the consultants team (or if the authorizing user is an account administrator and has proxy permissions via an account member with those permissions).

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

location
string

The location of the time entry. Must match the name of an existing account location.

Responses
200

Time Entry has been created.

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

Delete multiple time entries

The IDs of the time entries to delete can be provided in the ids query parameter or via the request body.

Request body example:

{ "ids": "1,2,3" }

If any specified time entries cannot be deleted, the entire request will fail and an error message will be returned that specifies which ones could not be deleted and why.

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

Request
query Parameters
ids
string

A comma-separated list of IDs of time entries. You can provide up to 100 IDs. The IDs can be provided in this query parameter or via the request body.

Responses
204

Time Entry has been deleted.

400

Bad Request

401

Unauthorized request

403

Forbidden request

404

Page Not Found

422

Unprocessable Entity

503

Service is unavailable

delete/time_entries
Request samples
Response samples
application/json
{
  • "errors": [
    ]
}

Fetching a single Time Entry

This endpoint returns structured Time Entry 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 time_entries 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.

  • active_submission (TimesheetSubmission) - Retrieves the active timesheet (i.e. approved or pending) the time entry was submitted on, if any. The response will include active_submission_id, which references the data in the timesheet_submissions top-level key.
  • external_references (ExternalReference) - Includes references to external integrations for this object.
  • invoice (Invoice) - Retrieves the invoice the time entry was added to, if any. The response will include invoice_id, which references the data in the invoices top-level key.
  • recent_submission (TimesheetSubmission) - Retrieves the most recent timesheet the time entry was submitted on, if any, including any rejected or cancelled timesheets. The response will include recent_submission_id, which references the data in the timesheet_submissions top-level key.
  • role (Role) - Retrieves the project role of the user who performed the work for the time entry, if any. The response will include role_id, which references the data in the roles top-level key.
  • story (Story) - Retrieves the task the time entry is tracked to, if any. The response will include story_id, which references the data in the stories top-level key.
  • user (User) - Retrieves the user the time entry belongs to. The response will include user_id, which references the data in the users top-level key.
  • workspace (Workspace) - Retrieves the project the time entry is tracked to. The response will include workspace_id, which references the data in the workspaces top-level key.
optional_fields
Array of strings

Allows you to request one or more optional fields as an array.

Items Enum: "location_id" "user_can_edit"
Responses
200

The Time Entry has been retrieved.

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

Updating an existing Time Entry

This endpoint returns structured Time Entry 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 time_entries 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.

  • active_submission (TimesheetSubmission) - Retrieves the active timesheet (i.e. approved or pending) the time entry was submitted on, if any. The response will include active_submission_id, which references the data in the timesheet_submissions top-level key.
  • external_references (ExternalReference) - Includes references to external integrations for this object.
  • invoice (Invoice) - Retrieves the invoice the time entry was added to, if any. The response will include invoice_id, which references the data in the invoices top-level key.
  • recent_submission (TimesheetSubmission) - Retrieves the most recent timesheet the time entry was submitted on, if any, including any rejected or cancelled timesheets. The response will include recent_submission_id, which references the data in the timesheet_submissions top-level key.
  • role (Role) - Retrieves the project role of the user who performed the work for the time entry, if any. The response will include role_id, which references the data in the roles top-level key.
  • story (Story) - Retrieves the task the time entry is tracked to, if any. The response will include story_id, which references the data in the stories top-level key.
  • user (User) - Retrieves the user the time entry belongs to. The response will include user_id, which references the data in the users top-level key.
  • workspace (Workspace) - Retrieves the project the time entry is tracked to. The response will include workspace_id, which references the data in the workspaces top-level key.
optional_fields
Array of strings

Allows you to request one or more optional fields as an array.

Items Enum: "location_id" "user_can_edit"
Request Body schema: application/json
required
object
workspace_id
integer <int32>

The ID of the project (workspace) the time entry is logging work in. This can be updated by administrators on the account or users who can edit the time entry in the current project and the new project.

date_performed
string <date>

The date the activity for which the time is being entered was performed, format: YYYY-MM-DD. The date must be in ISO 8601 format.

time_in_minutes
integer <int32>

The amount of time in minutes that the activity was worked on.

billable
boolean

Whether this Time Entry is billable time. If you don't provide this parameter, billable will be defaulted to the value of the billable flag of its associated Story if any, otherwise to true.

rate_in_cents
integer <int32>

The hourly rate for the time entry in cents.

notes
string

Any notes added to the time entry.

role_id
integer <int32>

The ID of the default Role or user assigned Role for the time entry.

story_id
integer <int32>

The ID of the task (story) this time entry is associated with.

user_id
integer <int32>

This sets the entry user for a specified ID. This parameter is ignored unless the authorizing user has financial access in the project and is on the provider team (or if the authorizing user is an account administrator and has proxy permissions via an account member with those permissions).

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

location
string

The location of the time entry. Must match the name of an existing account location.

Responses
200

Time Entry has been updated.

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