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 Page
GET https://cubicl.io/api/v1/bookkeeping/page
Fetches current account, activities and statistics required for bookkeeping.
{
activities : BookkeepingActivity[],
entries : BookkeepingEntry[],
payables : {
total : number,
outstanding : number,
overdue : number,
currency : string
},
receivables : {
total : number,
outstanding : number,
overdue : number,
currency : string
}
}{ code : 4 }Fetch Entry Activities
GET https://cubicl.io/api/v1/bookkeeping/activities
Query Parameters
entry*
String
Entry id
BookkeepingActivity[]{ code : 4 }{ code : 1501 }Fetch Entry Details
GET https://cubicl.io/api/v1/bookkeeping/entries/{entry}
Path Parameters
entry*
String
Entry id
BookkeepingEntry{ code : 4 }{ code : 1501 }Add Entry
POST https://cubicl.io/api/v1/bookkeeping/entries
Adds a receivable or payable entry for a client.
Request Body
customer*
String
Client id
dueAt
Number
Due date. Payment is expected to be made before this date.
paidAmount
Number
How much of the total is paid? It must be greater than 0 and less than the total amount.
desc
String
Receivable or payable entry description.
name*
String
Receivable or payable entry name.
currency*
String
Currency. 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, PLN, THB, IDR, HUF, CZK, ILS, PHP, AED, COP, SAR, MYR, RON
amount*
Number
Current account balance. It must be greater than 0.
type*
String
receivable || payable receivable: The payment you will receive from your clients. payable: The payment you will pay to your clients.
{
entry : BookkeepingEntry
entryActivity : BookkeepingActivity,
payment? : BookkeepingPayment // Exists if paidAmount is given
paymentActivity? : BookkeepingActivity // Exists if paidAmount is given
}{ code : 4 }{ code : 303 }{ code : 1201 }{ code : 1504 }Update Entry Details
PUT https://cubicl.io/api/v1/bookkeeping/entries/{entry}
Path Parameters
entry*
String
Entry id
Request Body
type*
String
receivable || payable receivable: The payment you will receive from your clients. payable: The payment you will pay to your clients.
currency*
String
Currency. 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, PLN, THB, IDR, HUF, CZK, ILS, PHP, AED, COP, SAR, MYR, RON
name*
String
Receivable or payable entry name.
desc
String
Receivable or payable entry description.
dueAt
Number
Due date. Payment is expected to be made before this date.
BookkeepingEntry{ code : 4 }{ code : 1503 }{ code : 1201 }{ code: 1504 }{ code: 1501 }Delete Entry
DELETE https://cubicl.io/api/v1/bookkeeping/entries/{entry}
All activity and payment records related to this entry is deleted.
Path Parameters
entry*
String
Entry id
{ code : 4 }{ code : 1201 }{ code: 1501 }Add Payment
POST https://cubicl.io/api/v1/bookkeeping/payment/{entry}
Path Parameters
entry*
String
Entry id
Request Body
paidAmount*
Number
How much of the total is paid? It must be greater than 0 and less than the total amount.
note
String
{
payment : BookkeepingPayment,
activity : BookkeepingActivity
}{ code : 4 }{ code : 1501 }{ code: 1503 }{ code : 1201 }Delete Payment
DELETE https://cubicl.io/api/v1/bookkeeping/payments/{payment}
Path Parameters
payment*
String
Payment id
BookkeepingActivity{ code : 4 }{ code : 1502 }{ code : 1201 }Data
BookkeepingEntry
{
org : string, // Organization id
customer : string, // Client id
/* receivable: The payment you will receive from your clients.
* payable: The payment you will pay to your clients.
*/
type : 'receivable' | 'payable',
amount : number, // Current account balance. It must be greater than 0.
/* Currency. 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, // Due date. Payment is expected to be made before this date.
createdBy : string, // Id of the user who created the entry.
createdAt : number,
}BookkeepingPayment
{
org : string, // Organization id
customer : string, // Client 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, // Client 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.
/* Currency. 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,
}Last updated
Was this helpful?