4. Set up accounting & invoice templates
Observed — UI flow /admin/accounting → operations → /admin/accounting/invoice-configs.
Why
Without a chart of accounts + operations + an invoice template, unit rents and rental-folder invoicing cannot be wired correctly.
4.1 Chart of accounts (createOrUpdateAccountingConfig)
note
In the admin UI, the GraphQL document may use a different operation name.
- GraphQL
- Node.js
- curl
mutation createOrUpdateAccountingConfig($accountingConfig: AccountingConfigInput!) {
createOrUpdateAccountingConfig(accountingConfig: $accountingConfig) {
openingDate
accounts {
id
accountNumber
label
category
}
}
}
{
"accountingConfig": {
"openingDate": "2026-07-27",
"accounts": [
{
"accountNumber": "165",
"label": "Security deposit",
"category": "warranty_deposits_account"
},
{
"accountNumber": "411",
"label": "Tenant accounts",
"category": "tenant_account"
},
{
"accountNumber": "512",
"label": "Bank",
"category": "bank"
},
{
"accountNumber": "708",
"label": "Charges",
"category": "rental_charges_account"
},
{
"accountNumber": "622",
"label": "Fees",
"category": "fee_account"
},
{
"accountNumber": "706",
"label": "Rent",
"category": "rent_account"
}
]
}
}
const { createOrUpdateAccountingConfig: cfg } = await ublo(
`mutation createOrUpdateAccountingConfig($accountingConfig: AccountingConfigInput!) {
createOrUpdateAccountingConfig(accountingConfig: $accountingConfig) {
accounts { id accountNumber category }
}
}`,
{ accountingConfig: { /* … */ } },
);
const rentAccount = cfg.accounts.find((a) => a.category === 'rent_account');
- Bearer
- Cookie session
# payload.json = query + variables.accountingConfig (AccountingConfigInput) from the GraphQL tab
curl -sS -X POST "$UBLO_GRAPHQL_URL" \
-H "Authorization: Bearer $UBLO_API_TOKEN" \
-H 'Content-Type: application/json' \
-d @payload.json
# payload.json = query + variables.accountingConfig (AccountingConfigInput) from the GraphQL tab
curl -sS -X POST "$UBLO_GRAPHQL_URL" \
-H 'Content-Type: application/json' \
-b cookies.txt \
-d @payload.json
4.2 Accounting operations
mutation createOrUpdateAccountingOperation(
$accountingOperations: [AccountingOperationInput!]!
) {
createOrUpdateAccountingOperation(
accountingOperations: $accountingOperations
) {
id
label
type
usage
destinationAccountId
}
}
{
"accountingOperations": [
{
"type": "credit",
"usage": "invoicing",
"label": "Rent",
"destinationAccountId": "00000000-0000-4000-8000-000000000041",
"vatRate": 0,
"vatMention": "not_applicable",
"vatSpecific": "accounting",
"isProrated": false
},
{
"type": "credit",
"usage": "invoicing",
"label": "Charges",
"destinationAccountId": "00000000-0000-4000-8000-000000000042",
"vatRate": 0,
"vatMention": "not_applicable",
"vatSpecific": "accounting",
"isProrated": false
}
]
}
- Bearer
- Cookie session
# payload.json = GraphQL query + variables shown above
curl -sS -X POST "$UBLO_GRAPHQL_URL" \
-H "Authorization: Bearer $UBLO_API_TOKEN" \
-H 'Content-Type: application/json' \
-d @payload.json
# payload.json = GraphQL query + variables shown above
curl -sS -X POST "$UBLO_GRAPHQL_URL" \
-H 'Content-Type: application/json' \
-b cookies.txt \
-d @payload.json
Keep the returned id values for the unit’s rentItems.operationId.
4.3 Invoice / notice template
mutation createOrUpdateAccountingInvoiceConfig($accountingInvoiceConfig: AccountingInvoiceConfigInput!) {
createOrUpdateAccountingInvoiceConfig(accountingInvoiceConfig: $accountingInvoiceConfig) {
id
name
type
state
referencePattern
}
}
{
"accountingInvoiceConfig": {
"name": "Rent invoice template",
"type": "invoice",
"referencePattern": "[invoice_number]",
"accountingAccountId": "00000000-0000-4000-8000-000000000041",
"noticeDisplayBalance": true,
"receiptDisplayBalance": true,
"noticeDisplayBanking": true,
"receiptDisplayBanking": true,
"noticeDisplayRepresentative": true,
"receiptDisplayRepresentative": true,
"noticeDisplayAgency": false,
"receiptDisplayAgency": false,
"noticeDisplayDocumentAsTitle": false,
"receiptDisplayDocumentAsTitle": false,
"noticeDisplayDebitDateInfo": false,
"receiptDisplayDebitDateInfo": false,
"signatureFile": null
}
}
- Bearer
- Cookie session
# payload.json = GraphQL query + variables shown above
curl -sS -X POST "$UBLO_GRAPHQL_URL" \
-H "Authorization: Bearer $UBLO_API_TOKEN" \
-H 'Content-Type: application/json' \
-d @payload.json
# payload.json = GraphQL query + variables shown above
curl -sS -X POST "$UBLO_GRAPHQL_URL" \
-H 'Content-Type: application/json' \
-b cookies.txt \
-d @payload.json
The template id can feed a rental folder’s accountingInvoiceConfigId.