Clienvy API documentation

List the views of a list

GET
https://api.clienvy.io/employee/v1
/list-views

Returns the views of one list, ordered by their position. Views that filter on something the employee is not allowed to see, such as all projects, are left out.

List the views of a list › query Parameters

list
​string · required

The list: projects, companies, deals, websites, invoices or subscriptions.

List the views of a list › Headers

X-Organization-Id
​string · uuid · required

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

List the views of a list › Responses

Array of ListViewResource

id
​string · uuid
list
​ListViewList · enum

The lists that can have views. The filter keys and sort fields mirror what the endpoint of each list accepts, under the keys the front-end store uses.

Enum values:
projects
companies
deals
websites
invoices
subscriptions
marketing-mailings
name
​string
​object

Filter key => value, the way the list's filter bar keeps it: records as {id, <label>}. An object also when empty, which a plain empty array would not be.

sort
​object | null
position
​integer

Create a view

POST
https://api.clienvy.io/employee/v1
/list-views

Adds a view to the end of a list's views.

Create a view › Headers

X-Organization-Id
​string · uuid · required

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

Create a view › Request Body

list
​string · required

The list: projects, companies, deals, websites, invoices or subscriptions.

name
​string · maxLength: 64 · required
filters
​object · required

Filters as key => value, using the filter keys of the list. A record may be given as a UUID or as {id}.

sort
​object | null · required

The sort order of the view. Null uses the default order of the list.

Create a view › Responses

ListViewResource

id
​string · uuid
list
​ListViewList · enum

The lists that can have views. The filter keys and sort fields mirror what the endpoint of each list accepts, under the keys the front-end store uses.

Enum values:
projects
companies
deals
websites
invoices
subscriptions
marketing-mailings
name
​string
​object

Filter key => value, the way the list's filter bar keeps it: records as {id, <label>}. An object also when empty, which a plain empty array would not be.

sort
​object | null
position
​integer

Reorder views

PUT
https://api.clienvy.io/employee/v1
/list-views/reorder

Sets the position of every view of one list and returns that list's views in their new order.

Reorder views › Headers

X-Organization-Id
​string · uuid · required

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

Reorder views › Request Body

​object[] · required

Every view of one list, each once, with its new position.

Reorder views › Responses

Array of ListViewResource

id
​string · uuid
list
​ListViewList · enum

The lists that can have views. The filter keys and sort fields mirror what the endpoint of each list accepts, under the keys the front-end store uses.

Enum values:
projects
companies
deals
websites
invoices
subscriptions
marketing-mailings
name
​string
​object

Filter key => value, the way the list's filter bar keeps it: records as {id, <label>}. An object also when empty, which a plain empty array would not be.

sort
​object | null
position
​integer

Update a view

PUT
https://api.clienvy.io/employee/v1
/list-views/{listView}

Updates a view. Only the fields present in the request are changed. The list a view belongs to cannot be changed.

Update a view › path Parameters

listView
​string · uuid · required

The list view UUID

Update a view › Headers

X-Organization-Id
​string · uuid · required

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

Update a view › Request Body

sort
​object | null · required

The sort order of the view. Null uses the default order of the list.

name
​string · maxLength: 64
filters
​object

Filters as key => value, using the filter keys of the list. A record may be given as a UUID or as {id}.

Update a view › Responses

ListViewResource

id
​string · uuid
list
​ListViewList · enum

The lists that can have views. The filter keys and sort fields mirror what the endpoint of each list accepts, under the keys the front-end store uses.

Enum values:
projects
companies
deals
websites
invoices
subscriptions
marketing-mailings
name
​string
​object

Filter key => value, the way the list's filter bar keeps it: records as {id, <label>}. An object also when empty, which a plain empty array would not be.

sort
​object | null
position
​integer

Delete a view

DELETE
https://api.clienvy.io/employee/v1
/list-views/{listView}

Deletes a view. The last view of a list cannot be deleted.

Delete a view › path Parameters

listView
​string · uuid · required

The list view UUID

Delete a view › Headers

X-Organization-Id
​string · uuid · required

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

Delete a view › Responses

ListViewResource

id
​string · uuid
list
​ListViewList · enum

The lists that can have views. The filter keys and sort fields mirror what the endpoint of each list accepts, under the keys the front-end store uses.

Enum values:
projects
companies
deals
websites
invoices
subscriptions
marketing-mailings
name
​string
​object

Filter key => value, the way the list's filter bar keeps it: records as {id, <label>}. An object also when empty, which a plain empty array would not be.

sort
​object | null
position
​integer