Clienvy API documentation

List invoice flows

GET
https://api.clienvy.io/employee/v1
/invoice-flows

Returns all invoice flows. An invoice flow defines how invoices are sent and reminded, and is referenced by companies and invoices via their flow_id / invoice_flow_id.

List invoice flows › query Parameters

search
​string

Filter invoice flows by name.

List invoice flows › Headers

X-Organization-Id
​string · uuid · required

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

List invoice flows › Responses

Array of InvoiceFlowResource

id
​string · uuid
name
​string
send_mail_subject
​string
send_mail_body
​string
payment_conditions
​string
expires_after_days
​integer
subscription_invoice_days_before_renewal
​integer
automatic_collection_enabled
​boolean
updated_at
​string · date-time
created_at
​string · date-time

Create an invoice flow

POST
https://api.clienvy.io/employee/v1
/invoice-flows

Creates a new invoice flow with a default version and two default reminders. Use the update endpoint to customise the mail templates, payment conditions and reminders.

Create an invoice flow › Headers

X-Organization-Id
​string · uuid · required

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

Create an invoice flow › Request Body

name
​string · maxLength: 64 · required

Create an invoice flow › Responses

InvoiceFlowResource

id
​string · uuid
name
​string
send_mail_subject
​string
send_mail_body
​string
payment_conditions
​string
expires_after_days
​integer
subscription_invoice_days_before_renewal
​integer
automatic_collection_enabled
​boolean
updated_at
​string · date-time
created_at
​string · date-time

Get an invoice flow

GET
https://api.clienvy.io/employee/v1
/invoice-flows/{invoiceFlow}

Returns a single invoice flow by ID, including its current version (mail templates, payment conditions and reminder schedule).

Get an invoice flow › path Parameters

invoiceFlow
​string · uuid · required

The invoice flow UUID

Get an invoice flow › Headers

X-Organization-Id
​string · uuid · required

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

Get an invoice flow › Responses

InvoiceFlowResource

id
​string · uuid
name
​string
send_mail_subject
​string
send_mail_body
​string
payment_conditions
​string
expires_after_days
​integer
subscription_invoice_days_before_renewal
​integer
automatic_collection_enabled
​boolean
updated_at
​string · date-time
created_at
​string · date-time

Update an invoice flow

PUT
https://api.clienvy.io/employee/v1
/invoice-flows/{invoiceFlow}

Updates an invoice flow by creating a new version. Send the full reminders array to replace the reminder schedule. Automatic-collection retries on a reminder only take effect when automatic_collection_enabled is on and every earlier reminder also retries.

Update an invoice flow › path Parameters

invoiceFlow
​string · uuid · required

The invoice flow UUID

Update an invoice flow › Headers

X-Organization-Id
​string · uuid · required

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

Update an invoice flow › Request Body

name
​string · maxLength: 64
payment_conditions
​string · maxLength: 2000
send_mail_subject
​string · maxLength: 2000
send_mail_body
​string · maxLength: 10000
expires_after_days
​integer · min: 7
subscription_invoice_days_before_renewal
​integer · min: 0
automatic_collection_enabled
​boolean
​object[]

Update an invoice flow › Responses

InvoiceFlowResource

id
​string · uuid
name
​string
send_mail_subject
​string
send_mail_body
​string
payment_conditions
​string
expires_after_days
​integer
subscription_invoice_days_before_renewal
​integer
automatic_collection_enabled
​boolean
updated_at
​string · date-time
created_at
​string · date-time

Delete an invoice flow

DELETE
https://api.clienvy.io/employee/v1
/invoice-flows/{invoiceFlow}

Deletes an invoice flow. A flow that is still used by invoices or subscriptions cannot be deleted, and at least one flow must always remain.

Delete an invoice flow › path Parameters

invoiceFlow
​string · uuid · required

The invoice flow UUID

Delete an invoice flow › Headers

X-Organization-Id
​string · uuid · required

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

Delete an invoice flow › Responses

InvoiceFlowResource

id
​string · uuid
name
​string
send_mail_subject
​string
send_mail_body
​string
payment_conditions
​string
expires_after_days
​integer
subscription_invoice_days_before_renewal
​integer
automatic_collection_enabled
​boolean
updated_at
​string · date-time
created_at
​string · date-time