Cubicl Docs
Search
K
Comment on page

Bookkeeping

Definitions of the types and formats of the data used in the endpoints can be found at the bottom of the page.

Endpoints

get
https://cubicl.io/api/v1/bookkeeping
/page
Get Page
get
https://cubicl.io/api/v1/bookkeeping
/activities
Fetch Entry Activities
get
https://cubicl.io/api/v1/bookkeeping
/entries/{entry}
Fetch Entry Details
post
https://cubicl.io/api/v1/bookkeeping
/entries
Add Entry
put
https://cubicl.io/api/v1/bookkeeping
/entries/{entry}
Update Entry Details
delete
https://cubicl.io/api/v1/bookkeeping
/entries/{entry}
Delete Entry
post
https://cubicl.io/api/v1/bookkeeping
/payment/{entry}
Add Payment
delete
https://cubicl.io/api/v1/bookkeeping
/payments/{payment}
Delete Payment

Data

BookkeepingEntry

{
org : string, // Organization id
customer : string, // Customer id
/* receivable: Current account credit balance. The payment received by Cubicl user from their customers in exchange for a product or service.
* payable: Current account debit balance. The payment made by Cubicl user to a customer in return for a product or service.
*/
type : 'receivable' | 'payable',
amount : number, // Current account balance. It must be greater than 0
/* Money unit. It must contain one of the following values:
* TRY, USD, EUR, GBP, AUD, CAD, CHF, CNY, HKD, NZD, SEK,
* KRW, SGD, NOK, MXN, INR, ZAR, RUB, BRL, JPY, TWD, DKK,
* THB, IDR, HUF, CZK, ILS, PHP, AED, COP, SAR, MYR, RON
*/
currency : string,
name : string,
desc : string | null,
paidAmount : number, // How much of the total is paid? It must be greater than zero and less than total amount.
isPaid : boolean, // Is completely paid off?
dueAt : number | null, // Date of last payment. Expected to be paid before this date.
createdBy : string, // Id of the user who created the entry
createdAt : number,
}

BookkeepingPayment

{
org : string, // Organization id
customer : string, // Customer id
amount : number, // Current account balance. It must be greater than 0.
entry : string, // Bookkeeping Entry id
note : string | null, // Optional note about the payment
createdBy : string, // Id of the user who created the entry
createdAt : number
}

BookkeepingActivity

{
org : string, // Organization id
customer : string, // Customer id
entry : string, // // Bookkeeping Entry id. Always exists
payment? : string, // Exists if type is 'payment-received', 'payment-sent' or 'payment-deleted'
type : 'receivable-created' | 'payable-created' | 'payment-received' | 'payment-sent' | 'payment-deleted',
data : {
entryName : string,
entryDueAt? : number, // Exists if entry dueAt defined
amount : number, // Current account balance. It must be greater than 0
/* Money unit. It must contain one of the following values:
* TRY, USD, EUR, GBP, AUD, CAD, CHF, CNY, HKD, NZD, SEK,
* KRW, SGD, NOK, MXN, INR, ZAR, RUB, BRL, JPY, TWD, DKK,
* THB, IDR, HUF, CZK, ILS, PHP, AED, COP, SAR, MYR, RON
*/
currency : string,
paidAmount? : number, // Exists if type is receivable/payable-created. How much of the total is paid? It must be greater than zero
},
createdBy : string // Id of the user who created the entry
createdAt : number,
}