Clienvy API documentation

List credit transactions

GET
https://api.clienvy.io/employee/v1
/relation/companies/{company}/credits/transactions

Returns a paginated list of the company's credit transactions, newest first.

List credit transactions › path Parameters

company
​string · uuid · required

The company UUID

List credit transactions › query Parameters

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 credit transactions › Headers

X-Organization-Id
​string · uuid · required

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

List credit transactions › Responses

Array of CreditTransactionResource

​object

Create a credit transaction

POST
https://api.clienvy.io/employee/v1
/relation/companies/{company}/credits/transactions

Manually adds or deducts credits for the company. Use a positive credits value to add credits and a negative value to deduct them.

Create a credit transaction › path Parameters

company
​string · uuid · required

The company UUID

Create a credit transaction › Headers

X-Organization-Id
​string · uuid · required

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

Create a credit transaction › Request Body

title
​string · maxLength: 64 · required
credits
​integer · required

Number of credits to add (positive) or deduct (negative).

description
​string · maxLength: 2000
website_id
​string · uuid

UUID of the website the transaction relates to.

Create a credit transaction › Responses

CreditTransactionResource

id
​string · uuid
title
​string
description
​string | null
credits
​integer
manual
​boolean
​WebsiteReferenceResource | null
​EmployeeReferenceResource | null
updated_at
​string · date-time
created_at
​string · date-time

Update a credit transaction

PUT
https://api.clienvy.io/employee/v1
/relation/companies/{company}/credits/transactions/{creditTransaction}

Updates an existing credit transaction. The credit amount can only be changed on manual transactions within 24 hours of creation.

Update a credit transaction › path Parameters

company
​string · uuid · required

The company UUID

creditTransaction
​string · uuid · required

The credit transaction UUID

Update a credit transaction › Headers

X-Organization-Id
​string · uuid · required

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

Update a credit transaction › Request Body

title
​string · maxLength: 64
credits
​integer

Number of credits (positive to add, negative to deduct).

description
​string · maxLength: 2000
website_id
​string · uuid

UUID of the website the transaction relates to.

Update a credit transaction › Responses

CreditTransactionResource

id
​string · uuid
title
​string
description
​string | null
credits
​integer
manual
​boolean
​WebsiteReferenceResource | null
​EmployeeReferenceResource | null
updated_at
​string · date-time
created_at
​string · date-time

List credit payments

GET
https://api.clienvy.io/employee/v1
/relation/companies/{company}/credits/payments

Returns a paginated list of the company's credit payments (invoiced credit purchases), newest first.

List credit payments › path Parameters

company
​string · uuid · required

The company UUID

List credit payments › query Parameters

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 credit payments › Headers

X-Organization-Id
​string · uuid · required

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

List credit payments › Responses

Array of CreditPaymentResource

​object

Create a credit payment

POST
https://api.clienvy.io/employee/v1
/relation/companies/{company}/credits/payments

Creates a credit purchase for the company: it generates an invoice for the given number of credits addressed to the chosen contact, and credits are added directly to the balance.

Create a credit payment › path Parameters

company
​string · uuid · required

The company UUID

Create a credit payment › Headers

X-Organization-Id
​string · uuid · required

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

Create a credit payment › Request Body

name
​string · maxLength: 64 · required

Description of the credit purchase, shown on the invoice.

contact_id
​string · uuid · required

UUID of the company contact the invoice is addressed to.

credits
​integer · required

Number of credits purchased.

price_excluding_tax
​number · decimal · required

Total price excluding tax.

tax_rate_id
​string · uuid · required

UUID of the tax rate applied to the invoice.

Create a credit payment › Responses

CreditPaymentResource

id
​string · uuid
credits
​integer
status
​CreditPaymentStatus · enum
Enum values:
open
paid
credited
updated_at
​string · date-time
created_at
​string · date-time