KontoCloud
TypeScript SDK / Operation reference

Journal entries and accounts

26 operations

Example values illustrate the structure. Replace them with your identifiers and data; business validation still applies to these examples.

GET

/api/t/{tid}/accounts

#

get_t_tid_accounts

Access

User session or the account owner's kc_key_… API key, for reading accessible books only.

Path parameters

FieldTypeRequired
tidstring · UUIDRequired

Request body

No request body.

Successful response

200 · application/json

Array<Account>

Call example

TypeScript SDK

const result = await client.json("get_t_tid_accounts", {
params: {
  "tid": "00000000-0000-4000-8000-000000000001"
}
});

Errors and constraints

Listed codes are explicit handler checks. Validation, access, locked-period and external-service errors also apply. After a network failure, check the state before retrying a write.

Errors and constraints →

Contract source: crates/kc-api/src/lib.rs · list_accounts

POST

/api/t/{tid}/accounts

#

post_t_tid_accounts

Access

User session: Authorization: Bearer <token>. API keys are not accepted on this route. Permissions and email verification depend on the operation; verification itself and logout are available before verification.

Path parameters

FieldTypeRequired
tidstring · UUIDRequired

Request body

FieldTypeRequired
codestringRequired
namestringRequired
request.json
{
  "code": "example",
  "name": "example"
}

Successful response

201 · application/json

Account

Call example

TypeScript SDK

const result = await client.json("post_t_tid_accounts", {
params: {
  "tid": "00000000-0000-4000-8000-000000000001"
},
body: {
  "code": "example",
  "name": "example"
}
});

Errors and constraints

Listed codes are explicit handler checks. Validation, access, locked-period and external-service errors also apply. After a network failure, check the state before retrying a write.

Errors and constraints →

Contract source: crates/kc-api/src/lib.rs · create_account

GET

/api/t/{tid}/accounts/{code}/card

#

get_t_tid_accounts_code_card

Access

User session: Authorization: Bearer <token>. API keys are not accepted on this route. Permissions and email verification depend on the operation; verification itself and logout are available before verification.

Path parameters

FieldTypeRequired
tidstring · UUIDRequired
codestringRequired

Query parameters

FieldTypeRequired
from
string · YYYY-MM-DDnull
Optional
to
string · YYYY-MM-DDnull
Optional
cost_center
string · UUIDnull
Server default: null
Optional

Request body

No request body.

Successful response

200 · application/json

Array<CardRow>

Call example

TypeScript SDK

const result = await client.json("get_t_tid_accounts_code_card", {
params: {
  "tid": "00000000-0000-4000-8000-000000000001",
  "code": "example"
}
});

Errors and constraints

Listed codes are explicit handler checks. Validation, access, locked-period and external-service errors also apply. After a network failure, check the state before retrying a write.

Errors and constraints →

Contract source: crates/kc-api/src/lib.rs · account_card

GET

/api/t/{tid}/cash-book

#

get_t_tid_cash_book

Access

User session: Authorization: Bearer <token>. API keys are not accepted on this route. Permissions and email verification depend on the operation; verification itself and logout are available before verification.

Path parameters

FieldTypeRequired
tidstring · UUIDRequired

Query parameters

FieldTypeRequired
accountstringRequired
from
string · YYYY-MM-DDnull
Optional
to
string · YYYY-MM-DDnull
Optional

Request body

No request body.

Successful response

200 · application/json

CashBook

Call example

TypeScript SDK

const result = await client.json("get_t_tid_cash_book", {
params: {
  "tid": "00000000-0000-4000-8000-000000000001"
},
query: {
  "account": "example"
}
});

Errors and constraints

not_cash_account

Listed codes are explicit handler checks. Validation, access, locked-period and external-service errors also apply. After a network failure, check the state before retrying a write.

Errors and constraints →

Contract source: crates/kc-api/src/lib.rs · cash_book

GET

/api/t/{tid}/cost-center-rules

#

get_t_tid_cost_center_rules

Access

User session: Authorization: Bearer <token>. API keys are not accepted on this route. Permissions and email verification depend on the operation; verification itself and logout are available before verification.

Path parameters

FieldTypeRequired
tidstring · UUIDRequired

Request body

No request body.

Successful response

200 · application/json

Call example

TypeScript SDK

const result = await client.json("get_t_tid_cost_center_rules", {
params: {
  "tid": "00000000-0000-4000-8000-000000000001"
}
});

Errors and constraints

Listed codes are explicit handler checks. Validation, access, locked-period and external-service errors also apply. After a network failure, check the state before retrying a write.

Errors and constraints →

Contract source: crates/kc-api/src/cost_centers.rs · cost_centers::rules

POST

/api/t/{tid}/cost-center-rules

#

post_t_tid_cost_center_rules

Access

User session: Authorization: Bearer <token>. API keys are not accepted on this route. Permissions and email verification depend on the operation; verification itself and logout are available before verification.

Path parameters

FieldTypeRequired
tidstring · UUIDRequired

Request body

FieldTypeRequired
account_prefixstringRequired
requiredbooleanRequired
valid_fromstring · YYYY-MM-DDRequired
reason
stringnull
Server default: null
Optional
request.json
{
  "account_prefix": "example",
  "required": true,
  "valid_from": "2026-01-01"
}

Successful response

201 · application/json

CostCenterRule

Call example

TypeScript SDK

const result = await client.json("post_t_tid_cost_center_rules", {
params: {
  "tid": "00000000-0000-4000-8000-000000000001"
},
body: {
  "account_prefix": "example",
  "required": true,
  "valid_from": "2026-01-01"
}
});

Errors and constraints

Listed codes are explicit handler checks. Validation, access, locked-period and external-service errors also apply. After a network failure, check the state before retrying a write.

Errors and constraints →

Contract source: crates/kc-api/src/cost_centers.rs · cost_centers::add_rule

GET

/api/t/{tid}/cost-centers

#

get_t_tid_cost_centers

Access

User session: Authorization: Bearer <token>. API keys are not accepted on this route. Permissions and email verification depend on the operation; verification itself and logout are available before verification.

Path parameters

FieldTypeRequired
tidstring · UUIDRequired

Request body

No request body.

Successful response

200 · application/json

Array<CostCenter>

Call example

TypeScript SDK

const result = await client.json("get_t_tid_cost_centers", {
params: {
  "tid": "00000000-0000-4000-8000-000000000001"
}
});

Errors and constraints

Listed codes are explicit handler checks. Validation, access, locked-period and external-service errors also apply. After a network failure, check the state before retrying a write.

Errors and constraints →

Contract source: crates/kc-api/src/cost_centers.rs · cost_centers::list

POST

/api/t/{tid}/cost-centers

#

post_t_tid_cost_centers

Access

User session: Authorization: Bearer <token>. API keys are not accepted on this route. Permissions and email verification depend on the operation; verification itself and logout are available before verification.

Path parameters

FieldTypeRequired
tidstring · UUIDRequired

Request body

FieldTypeRequired
codestringRequired
namestringRequired
parentServer default: nullOptional
request.json
{
  "code": "example",
  "name": "example"
}

Successful response

201 · application/json

CostCenter

Call example

TypeScript SDK

const result = await client.json("post_t_tid_cost_centers", {
params: {
  "tid": "00000000-0000-4000-8000-000000000001"
},
body: {
  "code": "example",
  "name": "example"
}
});

Errors and constraints

Listed codes are explicit handler checks. Validation, access, locked-period and external-service errors also apply. After a network failure, check the state before retrying a write.

Errors and constraints →

Contract source: crates/kc-api/src/cost_centers.rs · cost_centers::create

POST

/api/t/{tid}/cost-centers/{id}

#

post_t_tid_cost_centers_id

Access

User session: Authorization: Bearer <token>. API keys are not accepted on this route. Permissions and email verification depend on the operation; verification itself and logout are available before verification.

Path parameters

FieldTypeRequired
tidstring · UUIDRequired
idstring · UUIDRequired

Request body

FieldTypeRequired
namestringRequired
parentServer default: nullOptional
activebooleanRequired
reasonstringRequired
request.json
{
  "name": "example",
  "active": true,
  "reason": "example"
}

Successful response

201 · application/json

CostCenter

Call example

TypeScript SDK

const result = await client.json("post_t_tid_cost_centers_id", {
params: {
  "tid": "00000000-0000-4000-8000-000000000001",
  "id": "00000000-0000-4000-8000-000000000001"
},
body: {
  "name": "example",
  "active": true,
  "reason": "example"
}
});

Errors and constraints

Listed codes are explicit handler checks. Validation, access, locked-period and external-service errors also apply. After a network failure, check the state before retrying a write.

Errors and constraints →

Contract source: crates/kc-api/src/cost_centers.rs · cost_centers::change

POST

/api/t/{tid}/entries

#

post_t_tid_entries

Access

User session: Authorization: Bearer <token>. API keys are not accepted on this route. Permissions and email verification depend on the operation; verification itself and logout are available before verification.

Path parameters

FieldTypeRequired
tidstring · UUIDRequired

Request body

FieldTypeRequired
posting_datestring · YYYY-MM-DDRequired
event_date
string · YYYY-MM-DDnull
Server default: null
Optional
documentDocumentRefRequired
descriptionstringRequired
lines
Array<NewLine>
Required
attachmentsServer default: []Optional
vatServer default: []Optional
request.json
{
  "posting_date": "2026-01-01",
  "document": {
    "number": "example",
    "date": "2026-01-01",
    "issuer": "example"
  },
  "description": "example",
  "lines": []
}

Successful response

201 · application/json

Entry

Call example

TypeScript SDK

const result = await client.json("post_t_tid_entries", {
params: {
  "tid": "00000000-0000-4000-8000-000000000001"
},
body: {
  "posting_date": "2026-01-01",
  "document": {
    "number": "example",
    "date": "2026-01-01",
    "issuer": "example"
  },
  "description": "example",
  "lines": []
}
});

Errors and constraints

Listed codes are explicit handler checks. Validation, access, locked-period and external-service errors also apply. After a network failure, check the state before retrying a write.

Errors and constraints →

Contract source: crates/kc-api/src/lib.rs · post_entry

GET

/api/t/{tid}/entries/{id}

#

get_t_tid_entries_id

Access

User session: Authorization: Bearer <token>. API keys are not accepted on this route. Permissions and email verification depend on the operation; verification itself and logout are available before verification.

Path parameters

FieldTypeRequired
tidstring · UUIDRequired
idinteger · i64Required

Query parameters

FieldTypeRequired
summary_onlybooleanServer default: falseOptional

Request body

No request body.

Successful response

200 · application/json

Entry

Call example

TypeScript SDK

const result = await client.json("get_t_tid_entries_id", {
params: {
  "tid": "00000000-0000-4000-8000-000000000001",
  "id": "1"
}
});

Errors and constraints

Listed codes are explicit handler checks. Validation, access, locked-period and external-service errors also apply. After a network failure, check the state before retrying a write.

Errors and constraints →

Contract source: crates/kc-api/src/lib.rs · get_entry

POST

/api/t/{tid}/entries/{id}/attachments

#

post_t_tid_entries_id_attachments

Access

User session: Authorization: Bearer <token>. API keys are not accepted on this route. Permissions and email verification depend on the operation; verification itself and logout are available before verification.

Path parameters

FieldTypeRequired
tidstring · UUIDRequired
idinteger · i64Required

Query parameters

FieldTypeRequired
export_proofbooleanServer default: falseOptional

Request body

FieldTypeRequired
attachment_idAttachmentIdRequired
request.json
{
  "attachment_id": "00000000-0000-4000-8000-000000000001"
}

Successful response

201 · application/json

Entry

Call example

TypeScript SDK

const result = await client.json("post_t_tid_entries_id_attachments", {
params: {
  "tid": "00000000-0000-4000-8000-000000000001",
  "id": "1"
},
body: {
  "attachment_id": "00000000-0000-4000-8000-000000000001"
}
});

Errors and constraints

Listed codes are explicit handler checks. Validation, access, locked-period and external-service errors also apply. After a network failure, check the state before retrying a write.

Errors and constraints →

Contract source: crates/kc-api/src/lib.rs · link_attachment_route

POST

/api/t/{tid}/entries/{id}/storno

#

post_t_tid_entries_id_storno

Access

User session: Authorization: Bearer <token>. API keys are not accepted on this route. Permissions and email verification depend on the operation; verification itself and logout are available before verification.

Path parameters

FieldTypeRequired
tidstring · UUIDRequired
idinteger · i64Required

Request body

FieldTypeRequired
posting_datestring · YYYY-MM-DDRequired
reasonstringRequired
request.json
{
  "posting_date": "2026-01-01",
  "reason": "example"
}

Successful response

201 · application/json

Entry

Call example

TypeScript SDK

const result = await client.json("post_t_tid_entries_id_storno", {
params: {
  "tid": "00000000-0000-4000-8000-000000000001",
  "id": "1"
},
body: {
  "posting_date": "2026-01-01",
  "reason": "example"
}
});

Errors and constraints

Listed codes are explicit handler checks. Validation, access, locked-period and external-service errors also apply. After a network failure, check the state before retrying a write.

Errors and constraints →

Contract source: crates/kc-api/src/lib.rs · storno

GET

/api/t/{tid}/journal

#

get_t_tid_journal

Access

User session or the account owner's kc_key_… API key, for reading accessible books only.

Path parameters

FieldTypeRequired
tidstring · UUIDRequired

Query parameters

FieldTypeRequired
year
integer · i32null
Optional
limit
integer · i64null
Optional
order
stringnull
Optional

Request body

No request body.

Successful response

200 · application/json

Array<JournalRow>

Call example

TypeScript SDK

const result = await client.json("get_t_tid_journal", {
params: {
  "tid": "00000000-0000-4000-8000-000000000001"
}
});

Errors and constraints

Listed codes are explicit handler checks. Validation, access, locked-period and external-service errors also apply. After a network failure, check the state before retrying a write.

Errors and constraints →

Contract source: crates/kc-api/src/lib.rs · journal

GET

/api/t/{tid}/journal.csv

#

get_t_tid_journal_csv

Access

User session or the account owner's kc_key_… API key, for reading accessible books only.

Path parameters

FieldTypeRequired
tidstring · UUIDRequired

Query parameters

FieldTypeRequired
year
integer · i32null
Optional
limit
integer · i64null
Optional
order
stringnull
Optional

Request body

No request body.

Successful response

200 · text/csv

Call example

TypeScript SDK

const result = await client.request("get_t_tid_journal_csv", {
params: {
  "tid": "00000000-0000-4000-8000-000000000001"
}
});

Errors and constraints

Listed codes are explicit handler checks. Validation, access, locked-period and external-service errors also apply. After a network failure, check the state before retrying a write.

Errors and constraints →

Contract source: crates/kc-api/src/lib.rs · journal_csv

GET

/api/t/{tid}/opening-balances

#

get_t_tid_opening_balances

Access

User session: Authorization: Bearer <token>. API keys are not accepted on this route. Permissions and email verification depend on the operation; verification itself and logout are available before verification.

Path parameters

FieldTypeRequired
tidstring · UUIDRequired

Request body

No request body.

Successful response

200 · application/json

Call example

TypeScript SDK

const result = await client.json("get_t_tid_opening_balances", {
params: {
  "tid": "00000000-0000-4000-8000-000000000001"
}
});

Errors and constraints

Listed codes are explicit handler checks. Validation, access, locked-period and external-service errors also apply. After a network failure, check the state before retrying a write.

Errors and constraints →

Contract source: crates/kc-api/src/opening.rs · opening::list

POST

/api/t/{tid}/opening-balances

#

post_t_tid_opening_balances

Access

User session: Authorization: Bearer <token>. API keys are not accepted on this route. Permissions and email verification depend on the operation; verification itself and logout are available before verification.

Path parameters

FieldTypeRequired
tidstring · UUIDRequired

Request body

FieldTypeRequired
as_ofstring · YYYY-MM-DDRequired
sourcestringRequired
csvstringRequired
previewbooleanServer default: falseOptional
request.json
{
  "as_of": "2026-01-01",
  "source": "example",
  "csv": "example"
}

Successful response

201 · application/json

OpeningBalanceResult

Call example

TypeScript SDK

const result = await client.json("post_t_tid_opening_balances", {
params: {
  "tid": "00000000-0000-4000-8000-000000000001"
},
body: {
  "as_of": "2026-01-01",
  "source": "example",
  "csv": "example"
}
});

Errors and constraints

forbiddenmissing_sourceopening_balance_existsopening_balance_invalid

Listed codes are explicit handler checks. Validation, access, locked-period and external-service errors also apply. After a network failure, check the state before retrying a write.

Errors and constraints →

Contract source: crates/kc-api/src/opening.rs · opening::import

GET

/api/t/{tid}/period-lock

#

get_t_tid_period_lock

Access

User session: Authorization: Bearer <token>. API keys are not accepted on this route. Permissions and email verification depend on the operation; verification itself and logout are available before verification.

Path parameters

FieldTypeRequired
tidstring · UUIDRequired

Request body

No request body.

Successful response

200 · application/json

PeriodLock

Call example

TypeScript SDK

const result = await client.json("get_t_tid_period_lock", {
params: {
  "tid": "00000000-0000-4000-8000-000000000001"
}
});

Errors and constraints

Listed codes are explicit handler checks. Validation, access, locked-period and external-service errors also apply. After a network failure, check the state before retrying a write.

Errors and constraints →

Contract source: crates/kc-api/src/lib.rs · get_period_lock

POST

/api/t/{tid}/period-lock

#

post_t_tid_period_lock

Access

User session: Authorization: Bearer <token>. API keys are not accepted on this route. Permissions and email verification depend on the operation; verification itself and logout are available before verification.

Path parameters

FieldTypeRequired
tidstring · UUIDRequired

Query parameters

FieldTypeRequired
confirmed_pending_sales
integer · i64null
Optional

Request body

FieldTypeRequired
locked_until
string · YYYY-MM-DDnull
Optional
reasonstringRequired
request.json
{
  "reason": "example"
}

Successful response

200 · application/json

PeriodLock

Call example

TypeScript SDK

const result = await client.json("post_t_tid_period_lock", {
params: {
  "tid": "00000000-0000-4000-8000-000000000001"
},
body: {
  "reason": "example"
}
});

Errors and constraints

Listed codes are explicit handler checks. Validation, access, locked-period and external-service errors also apply. After a network failure, check the state before retrying a write.

Errors and constraints →

Contract source: crates/kc-api/src/lib.rs · set_period_lock

GET

/api/t/{tid}/schemes

#

get_t_tid_schemes

Access

User session: Authorization: Bearer <token>. API keys are not accepted on this route. Permissions and email verification depend on the operation; verification itself and logout are available before verification.

Path parameters

FieldTypeRequired
tidstring · UUIDRequired

Request body

No request body.

Successful response

200 · application/json

Array<Scheme>

Call example

TypeScript SDK

const result = await client.json("get_t_tid_schemes", {
params: {
  "tid": "00000000-0000-4000-8000-000000000001"
}
});

Errors and constraints

Listed codes are explicit handler checks. Validation, access, locked-period and external-service errors also apply. After a network failure, check the state before retrying a write.

Errors and constraints →

Contract source: crates/kc-api/src/schemes.rs · schemes::list

POST

/api/t/{tid}/schemes

#

post_t_tid_schemes

Access

User session: Authorization: Bearer <token>. API keys are not accepted on this route. Permissions and email verification depend on the operation; verification itself and logout are available before verification.

Path parameters

FieldTypeRequired
tidstring · UUIDRequired

Request body

FieldTypeRequired
codestringServer default: ""Optional
namestringRequired
descriptionstringServer default: ""Optional
amount_basisBasisRequired
vat_rate
integer · i32null
Server default: null
Optional
valid_fromstring · YYYY-MM-DDRequired
lines
Array<SchemeLine>
Required
reasonstringServer default: ""Optional
request.json
{
  "name": "example",
  "amount_basis": "net",
  "valid_from": "2026-01-01",
  "lines": []
}

Successful response

201 · application/json

Scheme

Call example

TypeScript SDK

const result = await client.json("post_t_tid_schemes", {
params: {
  "tid": "00000000-0000-4000-8000-000000000001"
},
body: {
  "name": "example",
  "amount_basis": "net",
  "valid_from": "2026-01-01",
  "lines": []
}
});

Errors and constraints

Listed codes are explicit handler checks. Validation, access, locked-period and external-service errors also apply. After a network failure, check the state before retrying a write.

Errors and constraints →

Contract source: crates/kc-api/src/schemes.rs · schemes::create

GET

/api/t/{tid}/schemes/{id}

#

get_t_tid_schemes_id

Access

User session: Authorization: Bearer <token>. API keys are not accepted on this route. Permissions and email verification depend on the operation; verification itself and logout are available before verification.

Path parameters

FieldTypeRequired
tidstring · UUIDRequired
idSchemeIdRequired

Request body

No request body.

Successful response

200 · application/json

Scheme

Call example

TypeScript SDK

const result = await client.json("get_t_tid_schemes_id", {
params: {
  "tid": "00000000-0000-4000-8000-000000000001",
  "id": "00000000-0000-4000-8000-000000000001"
}
});

Errors and constraints

Listed codes are explicit handler checks. Validation, access, locked-period and external-service errors also apply. After a network failure, check the state before retrying a write.

Errors and constraints →

Contract source: crates/kc-api/src/schemes.rs · schemes::get_one

POST

/api/t/{tid}/schemes/{id}/deactivate

#

post_t_tid_schemes_id_deactivate

Access

User session: Authorization: Bearer <token>. API keys are not accepted on this route. Permissions and email verification depend on the operation; verification itself and logout are available before verification.

Path parameters

FieldTypeRequired
tidstring · UUIDRequired
idSchemeIdRequired

Request body

FieldTypeRequired
valid_fromstring · YYYY-MM-DDRequired
reasonstringRequired
request.json
{
  "valid_from": "2026-01-01",
  "reason": "example"
}

Successful response

201 · application/json

Scheme

Call example

TypeScript SDK

const result = await client.json("post_t_tid_schemes_id_deactivate", {
params: {
  "tid": "00000000-0000-4000-8000-000000000001",
  "id": "00000000-0000-4000-8000-000000000001"
},
body: {
  "valid_from": "2026-01-01",
  "reason": "example"
}
});

Errors and constraints

Listed codes are explicit handler checks. Validation, access, locked-period and external-service errors also apply. After a network failure, check the state before retrying a write.

Errors and constraints →

Contract source: crates/kc-api/src/schemes.rs · schemes::deactivate

POST

/api/t/{tid}/schemes/{id}/preview

#

post_t_tid_schemes_id_preview

Access

User session: Authorization: Bearer <token>. API keys are not accepted on this route. Permissions and email verification depend on the operation; verification itself and logout are available before verification.

Path parameters

FieldTypeRequired
tidstring · UUIDRequired
idSchemeIdRequired

Request body

FieldTypeRequired
datestring · YYYY-MM-DDRequired
amountMoneyRequired
partnerServer default: nullOptional
request.json
{
  "date": "2026-01-01",
  "amount": 1
}

Successful response

200 · application/json

SchemePreview

Call example

TypeScript SDK

const result = await client.json("post_t_tid_schemes_id_preview", {
params: {
  "tid": "00000000-0000-4000-8000-000000000001",
  "id": "00000000-0000-4000-8000-000000000001"
},
body: {
  "date": "2026-01-01",
  "amount": 1
}
});

Errors and constraints

Listed codes are explicit handler checks. Validation, access, locked-period and external-service errors also apply. After a network failure, check the state before retrying a write.

Errors and constraints →

Contract source: crates/kc-api/src/schemes.rs · schemes::preview

POST

/api/t/{tid}/schemes/{id}/versions

#

post_t_tid_schemes_id_versions

Access

User session: Authorization: Bearer <token>. API keys are not accepted on this route. Permissions and email verification depend on the operation; verification itself and logout are available before verification.

Path parameters

FieldTypeRequired
tidstring · UUIDRequired
idSchemeIdRequired

Request body

FieldTypeRequired
codestringServer default: ""Optional
namestringRequired
descriptionstringServer default: ""Optional
amount_basisBasisRequired
vat_rate
integer · i32null
Server default: null
Optional
valid_fromstring · YYYY-MM-DDRequired
lines
Array<SchemeLine>
Required
reasonstringServer default: ""Optional
request.json
{
  "name": "example",
  "amount_basis": "net",
  "valid_from": "2026-01-01",
  "lines": []
}

Successful response

201 · application/json

Scheme

Call example

TypeScript SDK

const result = await client.json("post_t_tid_schemes_id_versions", {
params: {
  "tid": "00000000-0000-4000-8000-000000000001",
  "id": "00000000-0000-4000-8000-000000000001"
},
body: {
  "name": "example",
  "amount_basis": "net",
  "valid_from": "2026-01-01",
  "lines": []
}
});

Errors and constraints

Listed codes are explicit handler checks. Validation, access, locked-period and external-service errors also apply. After a network failure, check the state before retrying a write.

Errors and constraints →

Contract source: crates/kc-api/src/schemes.rs · schemes::new_version

GET

/api/t/{tid}/trial-balance

#

get_t_tid_trial_balance

Access

User session or the account owner's kc_key_… API key, for reading accessible books only.

Path parameters

FieldTypeRequired
tidstring · UUIDRequired

Query parameters

FieldTypeRequired
from
string · YYYY-MM-DDnull
Optional
to
string · YYYY-MM-DDnull
Optional
cost_center
string · UUIDnull
Server default: null
Optional

Request body

No request body.

Successful response

200 · application/json

Call example

TypeScript SDK

const result = await client.json("get_t_tid_trial_balance", {
params: {
  "tid": "00000000-0000-4000-8000-000000000001"
}
});

Errors and constraints

Listed codes are explicit handler checks. Validation, access, locked-period and external-service errors also apply. After a network failure, check the state before retrying a write.

Errors and constraints →

Contract source: crates/kc-api/src/lib.rs · trial_balance

Complete JSON types

The types below include every nested field for this area. Requiredness describes deserialization; business validation can require additional values.

Account

FieldTypeRequired
codestringRequired
namestringRequired
syntheticbooleanRequired
kindAccountKindServer defaultOptional

AccountKind

"general""cash""fixed_asset""fixed_asset_depr""partner"

ApplyScheme

FieldTypeRequired
datestring · YYYY-MM-DDRequired
amountMoneyRequired
partnerServer default: nullOptional

AttachmentMeta

FieldTypeRequired
idAttachmentIdRequired
filenamestringRequired
content_typestringRequired
sizeinteger · i64Required
sha256stringRequired
created_atstring · ISO 8601Required
created_bystringRequired

CardRow

FieldTypeRequired
posting_datestring · YYYY-MM-DDRequired
entry_idEntryIdRequired
yearinteger · i32Required
numberinteger · i32Required
doc_numberstringRequired
descriptionstringRequired
debitMoneyRequired
creditMoneyRequired
running_balanceMoneyRequired

CashBook

FieldTypeRequired
accountstringRequired
fromstring · YYYY-MM-DDRequired
tostring · YYYY-MM-DDRequired
openingMoneyRequired
itemsRequired
closingMoneyRequired

CashBookItem

FieldTypeRequired
posting_datestring · YYYY-MM-DDRequired
entry_idEntryIdRequired
yearinteger · i32Required
numberinteger · i32Required
doc_numberstringRequired
descriptionstringRequired
receiptMoneyRequired
paymentMoneyRequired
balanceMoneyRequired

CostCenter

FieldTypeRequired
idCostCenterIdRequired
codestringRequired
versioninteger · i32Required
namestringRequired
parentServer default: nullOptional
activebooleanRequired
created_atstring · ISO 8601Required
created_bystringRequired
changed_atstring · ISO 8601Required
changed_bystringRequired

CostCenterChange

FieldTypeRequired
namestringRequired
parentServer default: nullOptional
activebooleanRequired
reasonstringRequired

CostCenterRule

FieldTypeRequired
idCostCenterRuleIdRequired
account_prefixstringRequired
requiredbooleanRequired
valid_fromstring · YYYY-MM-DDRequired
reason
stringnull
Server default: null
Optional
created_atstring · ISO 8601Required
created_bystringRequired

DeactivateScheme

FieldTypeRequired
valid_fromstring · YYYY-MM-DDRequired
reasonstringRequired

DocumentRef

FieldTypeRequired
numberstringRequired
datestring · YYYY-MM-DDRequired
issuerstringRequired

Entry

FieldTypeRequired
idEntryIdRequired
yearinteger · i32Required
numberinteger · i32Required
posting_datestring · YYYY-MM-DDRequired
event_datestring · YYYY-MM-DDRequired
documentDocumentRefRequired
descriptionstringRequired
kindEntryKindRequired
reverses
EntryIdnull
Optional
reversed_by
EntryIdnull
Optional
created_atstring · ISO 8601Required
created_bystringRequired
lines
Array<Line>
Required
attachmentsServer default: []Optional
vat
Array<VatRecord>
Server default: []
Optional

Fx

FieldTypeRequired
currencystringRequired
amountMoneyRequired
rate_microinteger · i64Required

JournalRow

FieldTypeRequired
entry_idEntryIdRequired
yearinteger · i32Required
numberinteger · i32Required
line_nointeger · i32Required
posting_datestring · YYYY-MM-DDRequired
doc_numberstringRequired
descriptionstringRequired
kindEntryKindRequired
accountstringRequired
debitMoneyRequired
creditMoneyRequired
event_datestring · YYYY-MM-DDRequired
doc_datestring · YYYY-MM-DDRequired
doc_issuerstringRequired
fx
Fxnull
Server default: null
Optional

Line

FieldTypeRequired
line_nointeger · i32Required
accountstringRequired
debitMoneyRequired
creditMoneyRequired
asset
AssetIdnull
Server default: null
Optional
partnerServer default: nullOptional
due_date
string · YYYY-MM-DDnull
Server default: null
Optional
fx
Fxnull
Server default: null
Optional
cost_centerServer default: nullOptional

NewAccount

FieldTypeRequired
codestringRequired
namestringRequired

NewCostCenterRule

FieldTypeRequired
account_prefixstringRequired
requiredbooleanRequired
valid_fromstring · YYYY-MM-DDRequired
reason
stringnull
Server default: null
Optional

NewEntry

FieldTypeRequired
posting_datestring · YYYY-MM-DDRequired
event_date
string · YYYY-MM-DDnull
Server default: null
Optional
documentDocumentRefRequired
descriptionstringRequired
lines
Array<NewLine>
Required
attachmentsServer default: []Optional
vatServer default: []Optional

NewLine

FieldTypeRequired
accountstringRequired
debitMoneyRequired
creditMoneyRequired
asset
AssetIdnull
Server default: null
Optional
partnerServer default: nullOptional
due_date
string · YYYY-MM-DDnull
Server default: null
Optional
fx
Fxnull
Server default: null
Optional
cost_centerServer default: nullOptional

NewScheme

FieldTypeRequired
codestringServer default: ""Optional
namestringRequired
descriptionstringServer default: ""Optional
amount_basisBasisRequired
vat_rate
integer · i32null
Server default: null
Optional
valid_fromstring · YYYY-MM-DDRequired
lines
Array<SchemeLine>
Required
reasonstringServer default: ""Optional

NewVatRecord

FieldTypeRequired
directionVatDirectionRequired
treatmentVatTreatmentRequired
advancebooleanServer default: falseOptional
doc_kindVatDocKindRequired
doc_numberstringRequired
doc_datestring · YYYY-MM-DDRequired
counterpartystringRequired
counterparty_vat
stringnull
Server default: null
Optional
baseMoneyRequired
rateinteger · i32Required
vatMoneyRequired
corrects_period
string · YYYY-MM-DDnull
Server default: null
Optional

OpeningBalanceImport

FieldTypeRequired
idinteger · i64Required
as_ofstring · YYYY-MM-DDRequired
sourcestringRequired
file_sha256stringRequired
rowsinteger · i32Required
total_debitMoneyRequired
total_creditMoneyRequired
entry_idEntryIdRequired
entry_numberinteger · i32Required
entry_yearinteger · i32Required
reversedbooleanRequired
created_atstring · ISO 8601Required
created_bystringRequired

OpeningBalanceRequest

FieldTypeRequired
as_ofstring · YYYY-MM-DDRequired
sourcestringRequired
csvstringRequired
previewbooleanServer default: falseOptional

OpeningBalanceRow

FieldTypeRequired
lineinteger · u32Required
accountstringRequired
account_name
stringnull
Server default: null
Optional
partner
stringnull
Server default: null
Optional
partner_name
stringnull
Server default: null
Optional
due_date
string · YYYY-MM-DDnull
Server default: null
Optional
debitMoneyRequired
creditMoneyRequired

PeriodLock

FieldTypeRequired
locked_until
string · YYYY-MM-DDnull
Optional
changed_at
string · ISO 8601null
Optional
changed_by
stringnull
Optional
reason
stringnull
Optional

SchemeVersion

FieldTypeRequired
versioninteger · i32Required
namestringRequired
descriptionstringRequired
amount_basisBasisRequired
vat_rate
integer · i32null
Server default: null
Optional
valid_fromstring · YYYY-MM-DDRequired
activebooleanRequired
reasonstringRequired
lines
Array<SchemeLine>
Required
created_atstring · ISO 8601Required
created_bystringRequired

SetPeriodLock

FieldTypeRequired
locked_until
string · YYYY-MM-DDnull
Optional
reasonstringRequired

StornoRequest

FieldTypeRequired
posting_datestring · YYYY-MM-DDRequired
reasonstringRequired

VatDocKind

"invoice""calculation""customs""fiscal_receipt""other"

VatRecord

FieldTypeRequired
line_nointeger · i32Required
directionVatDirectionRequired
treatmentVatTreatmentRequired
advancebooleanServer default: falseOptional
doc_kindVatDocKindRequired
doc_numberstringRequired
doc_datestring · YYYY-MM-DDRequired
counterpartystringRequired
counterparty_vat
stringnull
Server default: null
Optional
baseMoneyRequired
rateinteger · i32Required
vatMoneyRequired
corrects_period
string · YYYY-MM-DDnull
Server default: null
Optional
period_startstring · YYYY-MM-DDRequired
period_endstring · YYYY-MM-DDRequired

VatTreatment

"taxable""exempt_deductible""exempt_nondeductible""not_taxable""reverse_charge""reverse_charge_nondeductible""deductible""nondeductible"

CashBookQ

FieldTypeRequired
accountstringRequired
from
string · YYYY-MM-DDnull
Optional
to
string · YYYY-MM-DDnull
Optional

EntryQuery

FieldTypeRequired
summary_onlybooleanServer default: falseOptional

JournalQ

FieldTypeRequired
year
integer · i32null
Optional
limit
integer · i64null
Optional
order
stringnull
Optional

LedgerQ

FieldTypeRequired
from
string · YYYY-MM-DDnull
Optional
to
string · YYYY-MM-DDnull
Optional
cost_center
string · UUIDnull
Server default: null
Optional

LockConfirmation

FieldTypeRequired
confirmed_pending_sales
integer · i64null
Optional