Clienvy API documentation

List invoices

GET
https://api.clienvy.io/employee/v1
/invoices

Returns a paginated list of invoices, newest first.

List invoices › query Parameters

search
​string

Full-text search across the reference, invoice number and company name.

company_ids
​string

Only return invoices for these companies. Accepts a comma-separated list of UUIDs.

statuses
​string

Only return invoices in these statuses. Accepts a comma-separated list of concept, open, expired, paid.

subscription_ids
​string

Only return invoices that bill these subscriptions. Accepts a comma-separated list of UUIDs.

website_ids
​string

Only return invoices that bill a subscription of these websites. Accepts a comma-separated list of UUIDs.

sort_field
​string

Field to sort by: number, sent_at, total_including_tax or status.

sort_direction
​string

Sort direction: asc or desc.

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 invoices › Headers

X-Organization-Id
​string · uuid · required

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

List invoices › Responses

Array of InvoiceListResource

​object

Create an invoice

POST
https://api.clienvy.io/employee/v1
/invoices

Creates a new concept invoice for a company and contact, optionally with line items.

Create an invoice › Headers

X-Organization-Id
​string · uuid · required

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

Create an invoice › Request Body

company_id
​string · uuid · required

UUID of the company the invoice is for.

contact_id
​string · uuid · required

UUID of the contact the invoice is addressed to.

reference
​string · maxLength: 128 · required

Reference/title of the invoice.

flow_id
​string · uuid

UUID of the invoice flow to use.

style_id
​string · uuid

UUID of the invoice style to use.

po_number
​string | null · maxLength: 128

Purchase-order number.

expires_after_days
​integer

Payment term in days (minimum 7).

​object[]

Invoice line items. The price of a line, the amount of a line and the total of all lines are each limited to 10,000,000 excluding tax.

Create an invoice › Responses

InvoiceResource

id
​string · uuid
reference
​string
po_number
​string | null
number
​integer | null
formatted_number
​string | null
document_title
​string
total_excluding_tax
​number
total_including_tax
​number
total_paid
​number
total_unpaid
​number
currency
​string
sent_at
​string | null · date-time
paid_at
​string | null · date-time
expires_on
​string | null · date
payment_conditions
​string
expires_after_days
​integer
status
​InvoiceStatus · enum
Enum values:
concept
proforma
open
expired
paid
accounting_synchronization_status
​string | null · enum
Enum values:
synchronizing
synchronized
synchronization-failed
accounting_last_synchronization
​string | null · date-time
​IntegrationInstanceReferenceResource | null
accounting_external_url
​string | null
​array
receiver_details_changed
​boolean
​array
sender_details_changed
​boolean
view_url
​string
​object
​InvoiceReferenceResource | null
​FileResource[]
updated_at
​string · date-time
created_at
​string · date-time

Get an invoice

GET
https://api.clienvy.io/employee/v1
/invoices/{invoice}

Returns a single invoice by ID, including its line items, payments, reminders and attachments.

Get an invoice › path Parameters

invoice
​string · uuid · required

The invoice UUID

Get an invoice › Headers

X-Organization-Id
​string · uuid · required

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

Get an invoice › Responses

InvoiceResource

id
​string · uuid
reference
​string
po_number
​string | null
number
​integer | null
formatted_number
​string | null
document_title
​string
total_excluding_tax
​number
total_including_tax
​number
total_paid
​number
total_unpaid
​number
currency
​string
sent_at
​string | null · date-time
paid_at
​string | null · date-time
expires_on
​string | null · date
payment_conditions
​string
expires_after_days
​integer
status
​InvoiceStatus · enum
Enum values:
concept
proforma
open
expired
paid
accounting_synchronization_status
​string | null · enum
Enum values:
synchronizing
synchronized
synchronization-failed
accounting_last_synchronization
​string | null · date-time
​IntegrationInstanceReferenceResource | null
accounting_external_url
​string | null
​array
receiver_details_changed
​boolean
​array
sender_details_changed
​boolean
view_url
​string
​object
​InvoiceReferenceResource | null
​FileResource[]
updated_at
​string · date-time
created_at
​string · date-time

Update an invoice

PUT
https://api.clienvy.io/employee/v1
/invoices/{invoice}

Updates an invoice. Only the fields present in the request are changed. When items is present, it replaces the full set of line items. The flow and style can only be changed while the invoice is unsent, and sent invoices in a locked period cannot be changed.

Update an invoice › path Parameters

invoice
​string · uuid · required

The invoice UUID

Update an invoice › Headers

X-Organization-Id
​string · uuid · required

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

Update an invoice › Request Body

company_id
​string · uuid

UUID of the company the invoice is for.

contact_id
​string · uuid

UUID of the contact the invoice is addressed to.

reference
​string · maxLength: 128

Reference/title of the invoice.

flow_id
​string · uuid

UUID of the invoice flow to use.

style_id
​string · uuid

UUID of the invoice style to use.

po_number
​string | null · maxLength: 128

Purchase-order number.

expires_after_days
​integer

Payment term in days (minimum 7).

update_receiver_details
​boolean

Refresh the stored receiver (customer) address from the company.

update_sender_details
​boolean

Refresh the stored sender (own) address.

​object[]

Invoice line items. Replaces the current items. The price of a line, the amount of a line and the total of all lines are each limited to 10,000,000 excluding tax.

Update an invoice › Responses

InvoiceResource

id
​string · uuid
reference
​string
po_number
​string | null
number
​integer | null
formatted_number
​string | null
document_title
​string
total_excluding_tax
​number
total_including_tax
​number
total_paid
​number
total_unpaid
​number
currency
​string
sent_at
​string | null · date-time
paid_at
​string | null · date-time
expires_on
​string | null · date
payment_conditions
​string
expires_after_days
​integer
status
​InvoiceStatus · enum
Enum values:
concept
proforma
open
expired
paid
accounting_synchronization_status
​string | null · enum
Enum values:
synchronizing
synchronized
synchronization-failed
accounting_last_synchronization
​string | null · date-time
​IntegrationInstanceReferenceResource | null
accounting_external_url
​string | null
​array
receiver_details_changed
​boolean
​array
sender_details_changed
​boolean
view_url
​string
​object
​InvoiceReferenceResource | null
​FileResource[]
updated_at
​string · date-time
created_at
​string · date-time

Delete an invoice

DELETE
https://api.clienvy.io/employee/v1
/invoices/{invoice}

Deletes an invoice. Only concept (unsent) invoices can be deleted.

Delete an invoice › path Parameters

invoice
​string · uuid · required

The invoice UUID

Delete an invoice › Headers

X-Organization-Id
​string · uuid · required

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

Delete an invoice › Responses

InvoiceResource

id
​string · uuid
reference
​string
po_number
​string | null
number
​integer | null
formatted_number
​string | null
document_title
​string
total_excluding_tax
​number
total_including_tax
​number
total_paid
​number
total_unpaid
​number
currency
​string
sent_at
​string | null · date-time
paid_at
​string | null · date-time
expires_on
​string | null · date
payment_conditions
​string
expires_after_days
​integer
status
​InvoiceStatus · enum
Enum values:
concept
proforma
open
expired
paid
accounting_synchronization_status
​string | null · enum
Enum values:
synchronizing
synchronized
synchronization-failed
accounting_last_synchronization
​string | null · date-time
​IntegrationInstanceReferenceResource | null
accounting_external_url
​string | null
​array
receiver_details_changed
​boolean
​array
sender_details_changed
​boolean
view_url
​string
​object
​InvoiceReferenceResource | null
​FileResource[]
updated_at
​string · date-time
created_at
​string · date-time

Send an invoice

POST
https://api.clienvy.io/employee/v1
/invoices/{invoice}/send

Finalises and sends the invoice. With type mail it is e-mailed to the given contact. With type manual it is only marked as sent.

Send an invoice › path Parameters

invoice
​string · uuid · required

The invoice UUID

Send an invoice › Headers

X-Organization-Id
​string · uuid · required

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

Send an invoice › Request Body

type
​string · required

How the invoice is sent: mail or manual.

contact_id
​string · uuid

UUID of the contact to e-mail. Required when type is mail.

subject
​string · maxLength: 128

E-mail subject. Required when type is mail.

message
​string · maxLength: 10000

E-mail message. Required when type is mail.

use_company_email_when_available
​boolean

Send to the company invoice e-mail instead of the contact when set. Required when type is mail.

Send an invoice › Responses

InvoiceResource

id
​string · uuid
reference
​string
po_number
​string | null
number
​integer | null
formatted_number
​string | null
document_title
​string
total_excluding_tax
​number
total_including_tax
​number
total_paid
​number
total_unpaid
​number
currency
​string
sent_at
​string | null · date-time
paid_at
​string | null · date-time
expires_on
​string | null · date
payment_conditions
​string
expires_after_days
​integer
status
​InvoiceStatus · enum
Enum values:
concept
proforma
open
expired
paid
accounting_synchronization_status
​string | null · enum
Enum values:
synchronizing
synchronized
synchronization-failed
accounting_last_synchronization
​string | null · date-time
​IntegrationInstanceReferenceResource | null
accounting_external_url
​string | null
​array
receiver_details_changed
​boolean
​array
sender_details_changed
​boolean
view_url
​string
​object
​InvoiceReferenceResource | null
​FileResource[]
updated_at
​string · date-time
created_at
​string · date-time

Download an invoice PDF

GET
https://api.clienvy.io/employee/v1
/invoices/{invoice}/download

Returns the invoice as a PDF document.

Download an invoice PDF › path Parameters

invoice
​string · uuid · required

The invoice UUID

Download an invoice PDF › Headers

X-Organization-Id
​string · uuid · required

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

Download an invoice PDF › Responses


Credit an invoice

POST
https://api.clienvy.io/employee/v1
/invoices/{invoice}/credit

Creates a credit note for the invoice and returns the new credit invoice.

Credit an invoice › path Parameters

invoice
​string · uuid · required

The invoice UUID

Credit an invoice › Headers

X-Organization-Id
​string · uuid · required

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

Credit an invoice › Responses

InvoiceResource

id
​string · uuid
reference
​string
po_number
​string | null
number
​integer | null
formatted_number
​string | null
document_title
​string
total_excluding_tax
​number
total_including_tax
​number
total_paid
​number
total_unpaid
​number
currency
​string
sent_at
​string | null · date-time
paid_at
​string | null · date-time
expires_on
​string | null · date
payment_conditions
​string
expires_after_days
​integer
status
​InvoiceStatus · enum
Enum values:
concept
proforma
open
expired
paid
accounting_synchronization_status
​string | null · enum
Enum values:
synchronizing
synchronized
synchronization-failed
accounting_last_synchronization
​string | null · date-time
​IntegrationInstanceReferenceResource | null
accounting_external_url
​string | null
​array
receiver_details_changed
​boolean
​array
sender_details_changed
​boolean
view_url
​string
​object
​InvoiceReferenceResource | null
​FileResource[]
updated_at
​string · date-time
created_at
​string · date-time

Duplicate an invoice

POST
https://api.clienvy.io/employee/v1
/invoices/{invoice}/duplicate

Creates a copy of the invoice as a new concept and returns it.

Duplicate an invoice › path Parameters

invoice
​string · uuid · required

The invoice UUID

Duplicate an invoice › Headers

X-Organization-Id
​string · uuid · required

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

Duplicate an invoice › Responses

InvoiceResource

id
​string · uuid
reference
​string
po_number
​string | null
number
​integer | null
formatted_number
​string | null
document_title
​string
total_excluding_tax
​number
total_including_tax
​number
total_paid
​number
total_unpaid
​number
currency
​string
sent_at
​string | null · date-time
paid_at
​string | null · date-time
expires_on
​string | null · date
payment_conditions
​string
expires_after_days
​integer
status
​InvoiceStatus · enum
Enum values:
concept
proforma
open
expired
paid
accounting_synchronization_status
​string | null · enum
Enum values:
synchronizing
synchronized
synchronization-failed
accounting_last_synchronization
​string | null · date-time
​IntegrationInstanceReferenceResource | null
accounting_external_url
​string | null
​array
receiver_details_changed
​boolean
​array
sender_details_changed
​boolean
view_url
​string
​object
​InvoiceReferenceResource | null
​FileResource[]
updated_at
​string · date-time
created_at
​string · date-time

Merge an invoice

POST
https://api.clienvy.io/employee/v1
/invoices/{invoice}/merge

Merges the invoice identified by merge_invoice_id into this invoice (combining their line items) and returns the resulting invoice.

Merge an invoice › path Parameters

invoice
​string · uuid · required

The invoice UUID

Merge an invoice › Headers

X-Organization-Id
​string · uuid · required

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

Merge an invoice › Request Body

merge_invoice_id
​string · uuid · required

UUID of the invoice to merge into this one.

Merge an invoice › Responses

InvoiceResource

id
​string · uuid
reference
​string
po_number
​string | null
number
​integer | null
formatted_number
​string | null
document_title
​string
total_excluding_tax
​number
total_including_tax
​number
total_paid
​number
total_unpaid
​number
currency
​string
sent_at
​string | null · date-time
paid_at
​string | null · date-time
expires_on
​string | null · date
payment_conditions
​string
expires_after_days
​integer
status
​InvoiceStatus · enum
Enum values:
concept
proforma
open
expired
paid
accounting_synchronization_status
​string | null · enum
Enum values:
synchronizing
synchronized
synchronization-failed
accounting_last_synchronization
​string | null · date-time
​IntegrationInstanceReferenceResource | null
accounting_external_url
​string | null
​array
receiver_details_changed
​boolean
​array
sender_details_changed
​boolean
view_url
​string
​object
​InvoiceReferenceResource | null
​FileResource[]
updated_at
​string · date-time
created_at
​string · date-time

Synchronise to accounting

POST
https://api.clienvy.io/employee/v1
/invoices/{invoice}/accounting/synchronize

Schedules synchronisation of the invoice to the connected accounting integration. Requires an authenticated accounting integration.

Synchronise to accounting › path Parameters

invoice
​string · uuid · required

The invoice UUID

Synchronise to accounting › Headers

X-Organization-Id
​string · uuid · required

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

Synchronise to accounting › Responses

InvoiceResource

id
​string · uuid
reference
​string
po_number
​string | null
number
​integer | null
formatted_number
​string | null
document_title
​string
total_excluding_tax
​number
total_including_tax
​number
total_paid
​number
total_unpaid
​number
currency
​string
sent_at
​string | null · date-time
paid_at
​string | null · date-time
expires_on
​string | null · date
payment_conditions
​string
expires_after_days
​integer
status
​InvoiceStatus · enum
Enum values:
concept
proforma
open
expired
paid
accounting_synchronization_status
​string | null · enum
Enum values:
synchronizing
synchronized
synchronization-failed
accounting_last_synchronization
​string | null · date-time
​IntegrationInstanceReferenceResource | null
accounting_external_url
​string | null
​array
receiver_details_changed
​boolean
​array
sender_details_changed
​boolean
view_url
​string
​object
​InvoiceReferenceResource | null
​FileResource[]
updated_at
​string · date-time
created_at
​string · date-time

Attach a file to an invoice

POST
https://api.clienvy.io/employee/v1
/invoices/{invoice}/attachments/{file}

Attaches an uploaded file (identified in the path) to the invoice.

Attach a file to an invoice › path Parameters

invoice
​string · uuid · required

The invoice UUID

file
​string · uuid · required

The file UUID

Attach a file to an invoice › Headers

X-Organization-Id
​string · uuid · required

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

Attach a file to an invoice › Responses

InvoiceResource

id
​string · uuid
reference
​string
po_number
​string | null
number
​integer | null
formatted_number
​string | null
document_title
​string
total_excluding_tax
​number
total_including_tax
​number
total_paid
​number
total_unpaid
​number
currency
​string
sent_at
​string | null · date-time
paid_at
​string | null · date-time
expires_on
​string | null · date
payment_conditions
​string
expires_after_days
​integer
status
​InvoiceStatus · enum
Enum values:
concept
proforma
open
expired
paid
accounting_synchronization_status
​string | null · enum
Enum values:
synchronizing
synchronized
synchronization-failed
accounting_last_synchronization
​string | null · date-time
​IntegrationInstanceReferenceResource | null
accounting_external_url
​string | null
​array
receiver_details_changed
​boolean
​array
sender_details_changed
​boolean
view_url
​string
​object
​InvoiceReferenceResource | null
​FileResource[]
updated_at
​string · date-time
created_at
​string · date-time

Remove a file from an invoice

DELETE
https://api.clienvy.io/employee/v1
/invoices/{invoice}/attachments/{file}

Detaches an attached file (identified in the path) from the invoice.

Remove a file from an invoice › path Parameters

invoice
​string · uuid · required

The invoice UUID

file
​string · uuid · required

The file UUID

Remove a file from an invoice › Headers

X-Organization-Id
​string · uuid · required

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

Remove a file from an invoice › Responses

InvoiceResource

id
​string · uuid
reference
​string
po_number
​string | null
number
​integer | null
formatted_number
​string | null
document_title
​string
total_excluding_tax
​number
total_including_tax
​number
total_paid
​number
total_unpaid
​number
currency
​string
sent_at
​string | null · date-time
paid_at
​string | null · date-time
expires_on
​string | null · date
payment_conditions
​string
expires_after_days
​integer
status
​InvoiceStatus · enum
Enum values:
concept
proforma
open
expired
paid
accounting_synchronization_status
​string | null · enum
Enum values:
synchronizing
synchronized
synchronization-failed
accounting_last_synchronization
​string | null · date-time
​IntegrationInstanceReferenceResource | null
accounting_external_url
​string | null
​array
receiver_details_changed
​boolean
​array
sender_details_changed
​boolean
view_url
​string
​object
​InvoiceReferenceResource | null
​FileResource[]
updated_at
​string · date-time
created_at
​string · date-time

List activities

GET
https://api.clienvy.io/employee/v1
/invoices/{invoice}/activities

Returns a paginated list of activities logged on the parent resource, newest first. Activities cover both system-generated events and manually logged remarks.

With include_related the list is the timeline of the resource: its own activities together with those of the records that belong to it, such as the domain names, applications and mailbox domains of a website. Each activity then names the record it belongs to in subject.

List activities › path Parameters

invoice
​string · uuid · required

The invoice UUID

List activities › query Parameters

type
​string

Only return activities of this type (for example remark).

include_related
​boolean

Also return the activities of the records that belong to the resource, each naming its record in subject.

source
​string

With include_related: only return the activities of one record, as <type>:<id>, for example domain:<uuid>. The record has to be the resource itself or belong to it.

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 activities › Headers

X-Organization-Id
​string · uuid · required

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

List activities › Responses

Array of ActivityWithSubjectResource

Array of ActivityResource

​
​object

Log a remark

POST
https://api.clienvy.io/employee/v1
/invoices/{invoice}/activities

Logs a manual remark as an activity on the parent resource. The remark may contain basic HTML (p, br, b, strong, i, em, u, s, ul, ol, li, a, span). Other tags and attributes are stripped and line breaks become <br>. To mention an employee and notify them, add a span with a data-employee-id attribute holding the employee's UUID, for example <span data-employee-id="…">@Jan</span>. The answer names the record in subject, like the timeline does.

Log a remark › path Parameters

invoice
​string · uuid · required

The invoice UUID

Log a remark › Headers

X-Organization-Id
​string · uuid · required

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

Log a remark › Request Body

remark
​string · maxLength: 20000 · required

Log a remark › Responses

ActivityWithSubjectResource

id
​string · uuid
type
​string
title
​string
data
​string
​ContactReferenceResource | null

The contact who did it in the customer portal, if any.

​OAuthConnectionReferenceResource | null

The AI connection the activity was done through, if any.

updated_at
​string · date-time
created_at
​string · date-time
​ActivitySubjectResource | null

null when the record is gone