Clienvy API documentation

List time entries

GET
https://api.clienvy.io/employee/v1
/time-entries

Returns the time entries of every employee, newest first. The result is paginated unless filtered by date, in which case the full matching set is returned as a bare array. Employees list their own entries through GET /time-entries/own.

List time entries › query Parameters

search
​string

Full-text search across the description and company name.

employee_ids
​string

Only return time entries of these employees. Accepts a comma-separated list of UUIDs.

date
​string · date

Only return time entries on this date (Y-m-d). Returns the full set (not paginated).

from
​string · date

Only return time entries on or after this date (Y-m-d).

to
​string · date

Only return time entries on or before this date (Y-m-d).

page
​integer

Page number of the paginated result set.

per_page
​integer

Number of items per page. Defaults to the endpoint's own page size; capped at 500.

List time entries › Headers

X-Organization-Id
​string · uuid · required

UUID of the organization (tenant) the request operates on.

List time entries › Responses

Array of TimeEntryResource

​object

Create a time entry

POST
https://api.clienvy.io/employee/v1
/time-entries

Logs a time entry for an employee, on the given entry_date. Provide the worked time either as a duration (mode duration with duration_value and duration_unit) or as a period (mode period with period_started_at and period_ended_at). The entry is created pending, so it still has to be processed. Logging time on a project also adds the employee to that project. Employees logging their own time use POST /time-entries/own.

On a recurring project the entry_date has to fall within the project's run: a date after it extends the project when the authenticated employee has the project.edit permission and is refused otherwise, a date before it is always refused.

Create a time entry › Headers

X-Organization-Id
​string · uuid · required

UUID of the organization (tenant) the request operates on.

Create a time entry › Request Body

employee_id
​string · uuid · required

UUID of the employee the time is logged for.

description
​string · maxLength: 5000 · required
mode
​string · required

How the worked time is provided: duration or period.

entry_date
​string · date · required

Date the time is logged on.

duration_value
​number

Amount of worked time, 0 or more. Required when mode is duration.

duration_unit
​string

Unit of duration_value: hours or minutes. Required when mode is duration.

period_started_at
​string · date-time

Start of the worked period. Required when mode is period.

period_ended_at
​string · date-time

End of the worked period, after period_started_at. Required when mode is period.

company_id
​string | null · uuid

UUID of the company the time is logged for.

project_id
​string | null · uuid

UUID of the project the time is logged on.

project_phase_id
​string | null · uuid

UUID of a phase of the project. Required on a fixed project, left out on a recurring one.

ticket_id
​string | null · uuid

UUID of the ticket the time is logged on.

website_id
​string | null · uuid

UUID of the website the time is logged on.

category_id
​string | null · uuid

UUID of the time category.

Create a time entry › Responses

TimeEntryResource

id
​string · uuid
description
​string
minutes
​integer
mode
​TimeEntryMode · enum
Enum values:
timer
duration
period
duration_value
​number | null
duration_unit
​string | null · enum
Enum values:
hours
minutes
entry_date
​string · date
period_started_at
​string | null · date-time
period_ended_at
​string | null · date-time
​TimeCategoryResource | null
status
​TimeEntryStatus · enum
Enum values:
pending
processed
processed_at
​string | null · date-time
​EmployeeReferenceResource | null
​CompanyReferenceResource | null
​ProjectReferenceResource | null
​ProjectPhaseReferenceResource | null
​TicketReferenceResource | null
​WebsiteReferenceResource | null
​CreditTransactionReferenceResource | null
created_at
​string · date-time
updated_at
​string · date-time

List time entries for the timeline

GET
https://api.clienvy.io/employee/v1
/time-entries/timeline

Returns the time entries within the given date range, in a compact form. Without the time-tracking.view-all permission only the authenticated employee's entries are returned. The result is not paginated. The range can span at most 366 days.

List time entries for the timeline › query Parameters

from
​string · date · required

Start of the range (Y-m-d).

to
​string · date · required

End of the range (Y-m-d).

List time entries for the timeline › Headers

X-Organization-Id
​string · uuid · required

UUID of the organization (tenant) the request operates on.

List time entries for the timeline › Responses

​TimeEntryListResource[] · required

Get a time entry

GET
https://api.clienvy.io/employee/v1
/time-entries/{timeEntry}

Returns a single time entry by ID. Without the time-tracking.view-all permission only the authenticated employee's own entries can be read.

Get a time entry › path Parameters

timeEntry
​string · uuid · required

The time entry UUID

Get a time entry › Headers

X-Organization-Id
​string · uuid · required

UUID of the organization (tenant) the request operates on.

Get a time entry › Responses

TimeEntryResource

id
​string · uuid
description
​string
minutes
​integer
mode
​TimeEntryMode · enum
Enum values:
timer
duration
period
duration_value
​number | null
duration_unit
​string | null · enum
Enum values:
hours
minutes
entry_date
​string · date
period_started_at
​string | null · date-time
period_ended_at
​string | null · date-time
​TimeCategoryResource | null
status
​TimeEntryStatus · enum
Enum values:
pending
processed
processed_at
​string | null · date-time
​EmployeeReferenceResource | null
​CompanyReferenceResource | null
​ProjectReferenceResource | null
​ProjectPhaseReferenceResource | null
​TicketReferenceResource | null
​WebsiteReferenceResource | null
​CreditTransactionReferenceResource | null
created_at
​string · date-time
updated_at
​string · date-time

Update a time entry

PUT
https://api.clienvy.io/employee/v1
/time-entries/{timeEntry}

Updates an existing time entry. Only the fields present in the request are changed. Without the time-tracking.manage-all permission only the authenticated employee's own entries can be updated. The same project rules as for creating an entry apply.

Update a time entry › path Parameters

timeEntry
​string · uuid · required

The time entry UUID

Update a time entry › Headers

X-Organization-Id
​string · uuid · required

UUID of the organization (tenant) the request operates on.

Update a time entry › Request Body

description
​string · maxLength: 5000
mode
​string

How the worked time is provided: duration or period.

duration_value
​number

Amount of worked time, 0 or more. Required when mode is duration.

duration_unit
​string

Unit of duration_value: hours or minutes. Required when mode is duration.

period_started_at
​string · date-time

Start of the worked period. Required when mode is period.

period_ended_at
​string · date-time

End of the worked period, after period_started_at. Required when mode is period.

entry_date
​string · date

Date the time is logged on.

company_id
​string | null · uuid

UUID of the company the time is logged for.

project_id
​string | null · uuid

UUID of the project the time is logged on.

project_phase_id
​string | null · uuid

UUID of a phase of the project. Left out on a recurring project. On a fixed project it is required when project_id is sent, otherwise leave it out to keep the current phase.

ticket_id
​string | null · uuid

UUID of the ticket the time is logged on.

website_id
​string | null · uuid

UUID of the website the time is logged on.

category_id
​string | null · uuid

UUID of the time category.

Update a time entry › Responses

TimeEntryResource

id
​string · uuid
description
​string
minutes
​integer
mode
​TimeEntryMode · enum
Enum values:
timer
duration
period
duration_value
​number | null
duration_unit
​string | null · enum
Enum values:
hours
minutes
entry_date
​string · date
period_started_at
​string | null · date-time
period_ended_at
​string | null · date-time
​TimeCategoryResource | null
status
​TimeEntryStatus · enum
Enum values:
pending
processed
processed_at
​string | null · date-time
​EmployeeReferenceResource | null
​CompanyReferenceResource | null
​ProjectReferenceResource | null
​ProjectPhaseReferenceResource | null
​TicketReferenceResource | null
​WebsiteReferenceResource | null
​CreditTransactionReferenceResource | null
created_at
​string · date-time
updated_at
​string · date-time

Delete a time entry

DELETE
https://api.clienvy.io/employee/v1
/time-entries/{timeEntry}

Deletes a time entry.

Delete a time entry › path Parameters

timeEntry
​string · uuid · required

The time entry UUID

Delete a time entry › Headers

X-Organization-Id
​string · uuid · required

UUID of the organization (tenant) the request operates on.

Delete a time entry › Responses

TimeEntryResource

id
​string · uuid
description
​string
minutes
​integer
mode
​TimeEntryMode · enum
Enum values:
timer
duration
period
duration_value
​number | null
duration_unit
​string | null · enum
Enum values:
hours
minutes
entry_date
​string · date
period_started_at
​string | null · date-time
period_ended_at
​string | null · date-time
​TimeCategoryResource | null
status
​TimeEntryStatus · enum
Enum values:
pending
processed
processed_at
​string | null · date-time
​EmployeeReferenceResource | null
​CompanyReferenceResource | null
​ProjectReferenceResource | null
​ProjectPhaseReferenceResource | null
​TicketReferenceResource | null
​WebsiteReferenceResource | null
​CreditTransactionReferenceResource | null
created_at
​string · date-time
updated_at
​string · date-time

Process a time entry

POST
https://api.clienvy.io/employee/v1
/time-entries/{timeEntry}/process

Marks a time entry as processed, optionally deducting credits from the linked company by creating a credit transaction. Deducting credits requires the credits module, the relation.place-transaction permission and a time entry that is linked to a company.

Process a time entry › path Parameters

timeEntry
​string · uuid · required

The time entry UUID

Process a time entry › Headers

X-Organization-Id
​string · uuid · required

UUID of the organization (tenant) the request operates on.

Process a time entry › Request Body

​object · required

When present, deducts credits by creating a credit transaction on the linked company.

Process a time entry › Responses

TimeEntryResource

id
​string · uuid
description
​string
minutes
​integer
mode
​TimeEntryMode · enum
Enum values:
timer
duration
period
duration_value
​number | null
duration_unit
​string | null · enum
Enum values:
hours
minutes
entry_date
​string · date
period_started_at
​string | null · date-time
period_ended_at
​string | null · date-time
​TimeCategoryResource | null
status
​TimeEntryStatus · enum
Enum values:
pending
processed
processed_at
​string | null · date-time
​EmployeeReferenceResource | null
​CompanyReferenceResource | null
​ProjectReferenceResource | null
​ProjectPhaseReferenceResource | null
​TicketReferenceResource | null
​WebsiteReferenceResource | null
​CreditTransactionReferenceResource | null
created_at
​string · date-time
updated_at
​string · date-time

List own time entries

GET
https://api.clienvy.io/employee/v1
/time-entries/own

Returns the authenticated employee's own time entries, newest first.

List own time entries › query Parameters

page
​integer

Page number of the paginated result set.

per_page
​integer

Number of items per page. Defaults to the endpoint's own page size; capped at 500.

List own time entries › Headers

X-Organization-Id
​string · uuid · required

UUID of the organization (tenant) the request operates on.

List own time entries › Responses

Array of TimeEntryResource

​object

Log own time

POST
https://api.clienvy.io/employee/v1
/time-entries/own

Logs a time entry for the authenticated employee. Provide the worked time either as a duration (mode duration with duration_value and duration_unit) or as a period (mode period with period_started_at and period_ended_at). The entry is created pending, so it still has to be processed. Logging time on a project also adds the employee to that project. Logging time for someone else goes through POST /time-entries instead.

On a recurring project the entry_date has to fall within the project's run: a date after it extends the project when the authenticated employee has the project.edit permission and is refused otherwise, a date before it is always refused.

Log own time › Headers

X-Organization-Id
​string · uuid · required

UUID of the organization (tenant) the request operates on.

Log own time › Request Body

description
​string · maxLength: 5000 · required
mode
​string · required

How the worked time is provided: duration or period.

duration_value
​number

Amount of worked time, 0 or more. Required when mode is duration.

duration_unit
​string

Unit of duration_value: hours or minutes. Required when mode is duration.

period_started_at
​string · date-time

Start of the worked period. Required when mode is period.

period_ended_at
​string · date-time

End of the worked period, after period_started_at. Required when mode is period.

entry_date
​string · date

Date the time is logged on. Defaults to the day period_started_at falls on, or today.

company_id
​string | null · uuid

UUID of the company the time is logged for.

project_id
​string | null · uuid

UUID of the project the time is logged on.

project_phase_id
​string | null · uuid

UUID of a phase of the project. Required on a fixed project, left out on a recurring one.

ticket_id
​string | null · uuid

UUID of the ticket the time is logged on.

website_id
​string | null · uuid

UUID of the website the time is logged on.

category_id
​string | null · uuid

UUID of the time category.

Log own time › Responses

TimeEntryResource

id
​string · uuid
description
​string
minutes
​integer
mode
​TimeEntryMode · enum
Enum values:
timer
duration
period
duration_value
​number | null
duration_unit
​string | null · enum
Enum values:
hours
minutes
entry_date
​string · date
period_started_at
​string | null · date-time
period_ended_at
​string | null · date-time
​TimeCategoryResource | null
status
​TimeEntryStatus · enum
Enum values:
pending
processed
processed_at
​string | null · date-time
​EmployeeReferenceResource | null
​CompanyReferenceResource | null
​ProjectReferenceResource | null
​ProjectPhaseReferenceResource | null
​TicketReferenceResource | null
​WebsiteReferenceResource | null
​CreditTransactionReferenceResource | null
created_at
​string · date-time
updated_at
​string · date-time

List time entries on a project

GET
https://api.clienvy.io/employee/v1
/projects/{project}/time-entries

Returns the time entries every employee logged on the project, newest first. The result is not paginated. Filter on a phase or a date range to read only part of the project.

List time entries on a project › path Parameters

project
​string · uuid · required

The project UUID

List time entries on a project › query Parameters

project_phase_id
​string · uuid

Only return the entries logged on this phase.

from
​string · date

Only return entries on or after this date (Y-m-d).

to
​string · date

Only return entries on or before this date (Y-m-d).

List time entries on a project › Headers

X-Organization-Id
​string · uuid · required

UUID of the organization (tenant) the request operates on.

List time entries on a project › Responses

Array of TimeEntryResource

id
​string · uuid
description
​string
minutes
​integer
mode
​TimeEntryMode · enum
Enum values:
timer
duration
period
duration_value
​number | null
duration_unit
​string | null · enum
Enum values:
hours
minutes
entry_date
​string · date
period_started_at
​string | null · date-time
period_ended_at
​string | null · date-time
​TimeCategoryResource | null
status
​TimeEntryStatus · enum
Enum values:
pending
processed
processed_at
​string | null · date-time
​EmployeeReferenceResource | null
​CompanyReferenceResource | null
​ProjectReferenceResource | null
​ProjectPhaseReferenceResource | null
​TicketReferenceResource | null
​WebsiteReferenceResource | null
​CreditTransactionReferenceResource | null
created_at
​string · date-time
updated_at
​string · date-time

Get a time entry on a project

GET
https://api.clienvy.io/employee/v1
/projects/{project}/time-entries/{timeEntryId}

Returns a single time entry logged on the project. Every employee who may read the hours of the project can read it, also when another employee logged it.

Get a time entry on a project › path Parameters

project
​string · uuid · required

The project UUID

timeEntryId
​string · required

UUID of the time entry.

Get a time entry on a project › Headers

X-Organization-Id
​string · uuid · required

UUID of the organization (tenant) the request operates on.

Get a time entry on a project › Responses

TimeEntryResource

id
​string · uuid
description
​string
minutes
​integer
mode
​TimeEntryMode · enum
Enum values:
timer
duration
period
duration_value
​number | null
duration_unit
​string | null · enum
Enum values:
hours
minutes
entry_date
​string · date
period_started_at
​string | null · date-time
period_ended_at
​string | null · date-time
​TimeCategoryResource | null
status
​TimeEntryStatus · enum
Enum values:
pending
processed
processed_at
​string | null · date-time
​EmployeeReferenceResource | null
​CompanyReferenceResource | null
​ProjectReferenceResource | null
​ProjectPhaseReferenceResource | null
​TicketReferenceResource | null
​WebsiteReferenceResource | null
​CreditTransactionReferenceResource | null
created_at
​string · date-time
updated_at
​string · date-time

Get a time entry on a ticket

GET
https://api.clienvy.io/employee/v1
/tickets/{ticket}/time-entries/{timeEntryId}

Returns a single time entry logged on the ticket. Every employee who may read the ticket can read it, also when another employee logged it.

Get a time entry on a ticket › path Parameters

ticket
​string · uuid · required

The ticket UUID

timeEntryId
​string · required

UUID of the time entry.

Get a time entry on a ticket › Headers

X-Organization-Id
​string · uuid · required

UUID of the organization (tenant) the request operates on.

Get a time entry on a ticket › Responses

TimeEntryResource

id
​string · uuid
description
​string
minutes
​integer
mode
​TimeEntryMode · enum
Enum values:
timer
duration
period
duration_value
​number | null
duration_unit
​string | null · enum
Enum values:
hours
minutes
entry_date
​string · date
period_started_at
​string | null · date-time
period_ended_at
​string | null · date-time
​TimeCategoryResource | null
status
​TimeEntryStatus · enum
Enum values:
pending
processed
processed_at
​string | null · date-time
​EmployeeReferenceResource | null
​CompanyReferenceResource | null
​ProjectReferenceResource | null
​ProjectPhaseReferenceResource | null
​TicketReferenceResource | null
​WebsiteReferenceResource | null
​CreditTransactionReferenceResource | null
created_at
​string · date-time
updated_at
​string · date-time