Clienvy API documentation

Accounting relations


PUT
https://api.clienvy.io/employee/v1
/relation/companies/{company}/accounting/link

Points the company at an existing relation in the accounting package, so the next synchronization does not create a new one. A company holds one link per accounting integration, and linking again replaces the existing link. Returns the company including its links.

company
​string · uuid · required

The company UUID

X-Organization-Id
​string · uuid · required

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

external_id
​string · required

Identifier of the relation in the accounting package.

integration_instance_id
​string · uuid · required

Accounting integration to link at.

CompanyResource

id
​string · uuid
name
​string
legal_name
​string | null
invoice_email
​string | null
​ContactReferenceResource | null
bundle_invoices
​boolean
​TaxRateResource
default_mandate_id
​string | null
active_credits
​integer
auto_bill_credits
​boolean
​ContactReferenceResource | null
auto_bill_credits_threshold
​integer
price_per_credit
​number
​TaxRateResource | null
​InvoiceFlowResource | null
coc_number
​string | null
tax_number
​string | null
address
​string | null
postal_code
​string | null
city
​string | null
country
​string · ISO 3166-1 alpha-2
type
​CompanyType · enum
Enum values:
customer
supplier
remark
​string | null
​object
​object[]
​object[]
​AccountingLinkResource[]
updated_at
​string · date-time
created_at
​string · date-time

PUT
https://api.clienvy.io/employee/v1
/relation/companies/{company}/accounting/unlink

Removes the company's link at the given accounting integration. The next synchronization creates a new relation in the accounting package. Returns the company including its links.

company
​string · uuid · required

The company UUID

X-Organization-Id
​string · uuid · required

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

integration_instance_id
​string · uuid · required

Accounting integration to unlink at.

CompanyResource

id
​string · uuid
name
​string
legal_name
​string | null
invoice_email
​string | null
​ContactReferenceResource | null
bundle_invoices
​boolean
​TaxRateResource
default_mandate_id
​string | null
active_credits
​integer
auto_bill_credits
​boolean
​ContactReferenceResource | null
auto_bill_credits_threshold
​integer
price_per_credit
​number
​TaxRateResource | null
​InvoiceFlowResource | null
coc_number
​string | null
tax_number
​string | null
address
​string | null
postal_code
​string | null
city
​string | null
country
​string · ISO 3166-1 alpha-2
type
​CompanyType · enum
Enum values:
customer
supplier
remark
​string | null
​object
​object[]
​object[]
​AccountingLinkResource[]
updated_at
​string · date-time
created_at
​string · date-time

List relations in the accounting package

GET
https://api.clienvy.io/employee/v1
/accounting/companies

Returns the relations known to the accounting provider, optionally narrowed by a free-text search term. Use this to find the relation a company should be linked to. List the organization's integrations to find the accounting integration to read from.

The relations come from the accounting provider, which reports no total, so meta.total and meta.last_page are an estimate: as long as a page comes back full they count the items fetched so far plus one, and they only settle once a page is no longer full. Keep requesting the next page until you get a page that is not full, rather than reading the total as a count.

List relations in the accounting package › query Parameters

integration_instance_id
​string · uuid · required

Accounting integration to read from.

search
​string

Free-text search term, matched by the provider on name, email and reference.

page
​integer

Page number of the paginated result set.

List relations in the accounting package › Headers

X-Organization-Id
​string · uuid · required

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

List relations in the accounting package › Responses

Array of AccountingRemoteCompanyResource