Clienvy API documentation

List planned work

GET
https://api.clienvy.io/employee/v1
/planning/allocations

Returns every allocation that overlaps the given date range, ordered by start date, in a compact form. The result is not paginated. When project_id is given, only that project's allocations are returned and the date range may be left out; without it the range can span at most 366 days. Without the time-tracking.view-all permission only the authenticated employee's allocations are returned.

List planned work › query Parameters

from
​string · date

Start of the range (Y-m-d). Required unless project_id is given, and always together with to.

to
​string · date

End of the range (Y-m-d). Required unless project_id is given, and always together with from.

employee_ids
​string

Only return the allocations of these employees. Accepts a comma-separated list of UUIDs.

project_id
​string · uuid

Only return the allocations planned on this project.

project_phase_id
​string · uuid

Only return the allocations planned on this phase.

List planned work › Headers

X-Organization-Id
​string · uuid · required

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

List planned work › Responses

​PlanningAllocationListResource[] · required

Plan work

POST
https://api.clienvy.io/employee/v1
/planning/allocations

Plans a block of work for an employee. minutes_per_day is the time the employee spends on it on each day between starts_on and ends_on, not the total of the block. A block spans at most 30 days. Planning work on a project also adds the employee to that project.

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

Plan work › Headers

X-Organization-Id
​string · uuid · required

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

Plan work › Request Body

employee_id
​string · uuid · required

UUID of the employee the work is planned for.

description
​string · maxLength: 255 · required

Description of the planned work.

starts_on
​string · date · required

First day of the block (Y-m-d).

ends_on
​string · date · required

Last day of the block (Y-m-d).

minutes_per_day
​integer · required

Planned minutes per day, from 1 to 1440.

project_id
​string | null · uuid

UUID of the project the work belongs to.

project_phase_id
​string · uuid

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

time_category_id
​string | null · uuid

UUID of the time category the work falls under.

Plan work › Responses

PlanningAllocationResource

id
​string · uuid
description
​string
starts_on
​string · date
ends_on
​string · date
minutes_per_day
​integer

Scheduled minutes for every day in the range, not the total of the block.

scheduled_minutes
​integer

What the block adds up to: the minutes per day on every day in the range.

​ProjectReferenceResource | null
​ProjectPhaseReferenceResource | null
​TimeCategoryResource | null
created_at
​string · date-time
updated_at
​string · date-time

Get planned work

GET
https://api.clienvy.io/employee/v1
/planning/allocations/{planningAllocation}

Returns a single allocation by ID, with the phases of its project. Without the time-tracking.view-all permission only the authenticated employee's own allocations can be read.

Get planned work › path Parameters

planningAllocation
​string · uuid · required

The planning allocation UUID

Get planned work › Headers

X-Organization-Id
​string · uuid · required

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

Get planned work › Responses

PlanningAllocationResource

id
​string · uuid
description
​string
starts_on
​string · date
ends_on
​string · date
minutes_per_day
​integer

Scheduled minutes for every day in the range, not the total of the block.

scheduled_minutes
​integer

What the block adds up to: the minutes per day on every day in the range.

​ProjectReferenceResource | null
​ProjectPhaseReferenceResource | null
​TimeCategoryResource | null
created_at
​string · date-time
updated_at
​string · date-time

Update planned work

PUT
https://api.clienvy.io/employee/v1
/planning/allocations/{planningAllocation}

Updates an allocation. Only the fields present in the request are changed. Send starts_on and ends_on together. The same rules as for planning work apply: at most 30 days, and on a recurring project within (or extending) the project's run.

Update planned work › path Parameters

planningAllocation
​string · uuid · required

The planning allocation UUID

Update planned work › Headers

X-Organization-Id
​string · uuid · required

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

Update planned work › Request Body

employee_id
​string · uuid

UUID of the employee the work is planned for.

description
​string · maxLength: 255

Description of the planned work.

starts_on
​string · date

First day of the block (Y-m-d).

ends_on
​string · date

Last day of the block (Y-m-d).

minutes_per_day
​integer

Planned minutes per day, from 1 to 1440.

project_id
​string | null · uuid

UUID of the project the work belongs to. null takes the block off its project and phase.

project_phase_id
​string · uuid

UUID of a phase of that project. Left out on a recurring project. On a fixed project it is required when the block moves to another project, otherwise leave it out to keep the current phase.

time_category_id
​string | null · uuid

UUID of the time category the work falls under.

Update planned work › Responses

PlanningAllocationResource

id
​string · uuid
description
​string
starts_on
​string · date
ends_on
​string · date
minutes_per_day
​integer

Scheduled minutes for every day in the range, not the total of the block.

scheduled_minutes
​integer

What the block adds up to: the minutes per day on every day in the range.

​ProjectReferenceResource | null
​ProjectPhaseReferenceResource | null
​TimeCategoryResource | null
created_at
​string · date-time
updated_at
​string · date-time

Delete planned work

DELETE
https://api.clienvy.io/employee/v1
/planning/allocations/{planningAllocation}

Deletes an allocation.

Delete planned work › path Parameters

planningAllocation
​string · uuid · required

The planning allocation UUID

Delete planned work › Headers

X-Organization-Id
​string · uuid · required

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

Delete planned work › Responses

PlanningAllocationResource

id
​string · uuid
description
​string
starts_on
​string · date
ends_on
​string · date
minutes_per_day
​integer

Scheduled minutes for every day in the range, not the total of the block.

scheduled_minutes
​integer

What the block adds up to: the minutes per day on every day in the range.

​ProjectReferenceResource | null
​ProjectPhaseReferenceResource | null
​TimeCategoryResource | null
created_at
​string · date-time
updated_at
​string · date-time

List the employees on the schedule

GET
https://api.clienvy.io/employee/v1
/planning/employees

Returns every employee that can be planned, with the minutes they are available per weekday. Without the time-tracking.view-all permission only the authenticated employee is returned.

List the employees on the schedule › Headers

X-Organization-Id
​string · uuid · required

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

List the employees on the schedule › Responses

Array of PlanningEmployeeResource

id
​string · uuid
first_name
​string
last_name
​string
full_name
​string
deactivated_at
​string | null · date-time

Set when the employee is deactivated: no sign in, no subscription slot, not selectable.

function
​string | null
is_service_account
​boolean

Service accounts are for machine to machine API access

​
​object

Available minutes per weekday, keyed monday through sunday. It is the capacity a day's planned work is weighed against.


List planning on a project

GET
https://api.clienvy.io/employee/v1
/projects/{project}/planning-allocations

Returns the planned blocks on the project, earliest first. The result is not paginated. Filter on a phase or a date range to read only part of the project; a block is in a range when it touches it.

List planning on a project › path Parameters

project
​string · uuid · required

The project UUID

List planning on a project › query Parameters

project_phase_id
​string · uuid

Only return the blocks planned on this phase.

from
​string · date

Only return blocks that end on or after this date (Y-m-d).

to
​string · date

Only return blocks that start on or before this date (Y-m-d).

List planning on a project › Headers

X-Organization-Id
​string · uuid · required

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

List planning on a project › Responses

Array of PlanningAllocationListResource

id
​string · uuid
description
​string
starts_on
​string · date
ends_on
​string · date
minutes_per_day
​integer

Scheduled minutes for every day in the range, not the total of the block.

scheduled_minutes
​integer

What the block adds up to: the minutes per day on every day in the range.

​ProjectReferenceResource | null
​ProjectPhaseReferenceResource | null

Get planning on a project

GET
https://api.clienvy.io/employee/v1
/projects/{project}/planning-allocations/{planningAllocationId}

Returns a single planned block on the project. Every employee who may read the hours of the project can read it, also when it is planned for another employee.

Get planning on a project › path Parameters

project
​string · uuid · required

The project UUID

planningAllocationId
​string · required

UUID of the planned block.

Get planning on a project › Headers

X-Organization-Id
​string · uuid · required

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

Get planning on a project › Responses

PlanningAllocationResource

id
​string · uuid
description
​string
starts_on
​string · date
ends_on
​string · date
minutes_per_day
​integer

Scheduled minutes for every day in the range, not the total of the block.

scheduled_minutes
​integer

What the block adds up to: the minutes per day on every day in the range.

​ProjectReferenceResource | null
​ProjectPhaseReferenceResource | null
​TimeCategoryResource | null
created_at
​string · date-time
updated_at
​string · date-time

List the projects on the schedule

GET
https://api.clienvy.io/employee/v1
/planning/projects

Returns a paginated list of the one-off projects for the project planning. Projects without planned phases come first, followed by the planned projects ordered by their last planned day, latest first. Planning a phase can change that day, so a project may move between pages while the planning changes. Recurring projects run in periods instead of phases and are not included.

List the projects on the schedule › query Parameters

search
​string

Search across the project name and company name.

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 the projects on the schedule › Headers

X-Organization-Id
​string · uuid · required

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

List the projects on the schedule › Responses

Array of PlanningProjectResource

​object