KontoCloud
Rust SDK / Operation reference

Review and deadlines

31 operations

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

GET

/api/board/{period}

#

get_board_period

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
periodstringRequired

Request body

No request body.

Successful response

200 · application/json

Board

Call example

Rust SDK

use kc_sdk::{Client, Download, kc_types::*};
use chrono::NaiveDate;

async fn example(
    client: &Client,
    period: NaiveDate,
) -> kc_sdk::Result <Board> {
    client.board(period).await
}

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/close.rs · close::board

GET

/api/bureau-work

#

get_bureau_work

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.

Request body

No request body.

Successful response

200 · application/json

Call example

Rust SDK

use kc_sdk::{Client, Download, kc_types::*};
use chrono::NaiveDate;

async fn example(
    client: &Client,
) -> kc_sdk::Result <Vec <MyDocumentWork>> {
    client.my_document_work().await
}

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/bureau.rs · bureau::my_work

POST

/api/bureau-work-requests/{id}

#

post_bureau_work_requests_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
idstring · UUIDRequired

Request body

string
request.json
"example"

Successful response

200 · application/json

null

Call example

Rust SDK

use kc_sdk::{Client, Download, kc_types::*};
use chrono::NaiveDate;

async fn example(
    client: &Client,
    w: DocumentWorkId,
    email: &str,
) -> kc_sdk::Result <()> {
    client.request_work_access(w, email).await
}

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/bureau.rs · bureau::request_access

POST

/api/bureau-work/{id}

#

post_bureau_work_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
idstring · UUIDRequired

Request body

object · 1
FieldTypeRequired
versioninteger · i64Required
WorkDecision
request.json
{
  "version": 1,
  "email": "[email protected]",
  "action": "offer"
}

Successful response

200 · application/json

null

Call example

Rust SDK

use kc_sdk::{Client, Download, kc_types::*};
use chrono::NaiveDate;

async fn example(
    client: &Client,
    id: DocumentWorkId,
    change: &ChangeDocumentWork,
) -> kc_sdk::Result <()> {
    client.change_document_work(id, change).await
}

Errors and constraints

handoff_message

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/bureau.rs · bureau::change_work

GET

/api/bureau-work/{id}/{key}

#

get_bureau_work_id_key

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
idstring · UUIDRequired
keystringRequired

Request body

No request body.

Successful response

200 · application/json

Call example

Rust SDK

use kc_sdk::{Client, Download, kc_types::*};
use chrono::NaiveDate;

async fn example(
    client: &Client,
    scope: BureauId,
    key: &str,
) -> kc_sdk::Result <Option <DocumentWork>> {
    client.document_work(scope, key).await
}

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/bureau.rs · bureau::work_info

GET

/api/calendar/{year}

#

get_calendar_year

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
yearinteger · i32Required

Request body

No request body.

Successful response

200 · application/json

WorkCalendar

Call example

Rust SDK

use kc_sdk::{Client, Download, kc_types::*};
use chrono::NaiveDate;

async fn example(
    client: &Client,
    year: i32,
) -> kc_sdk::Result <WorkCalendar> {
    client.calendar(year).await
}

Errors and constraints

bad_periodinternal

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/control.rs · control::calendar

GET

/api/t/{tid}/activity

#

get_t_tid_activity

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
before
integer · i64null
Optional
limit
integer · i32null
Optional

Request body

No request body.

Successful response

200 · application/json

Call example

Rust SDK

use kc_sdk::{Client, Download, kc_types::*};
use chrono::NaiveDate;

async fn example(
    client: &Client,
    tid: TenantId,
    before: Option <i64>,
) -> kc_sdk::Result <Vec <ActivityEntry>> {
    client.tenant_activity(tid, before).await
}

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/security.rs · security::tenant_activity

GET

/api/t/{tid}/approval

#

get_t_tid_approval

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

ApprovalSetting

Call example

Rust SDK

use kc_sdk::{Client, Download, kc_types::*};
use chrono::NaiveDate;

async fn example(
    client: &Client,
    tid: TenantId,
) -> kc_sdk::Result <ApprovalSetting> {
    client.approval(tid).await
}

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/control.rs · control::approval

POST

/api/t/{tid}/approval

#

post_t_tid_approval

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
enabledbooleanRequired
reasonstringRequired
request.json
{
  "enabled": true,
  "reason": "example"
}

Successful response

200 · application/json

ApprovalSetting

Call example

Rust SDK

use kc_sdk::{Client, Download, kc_types::*};
use chrono::NaiveDate;

async fn example(
    client: &Client,
    tid: TenantId,
    enabled: bool,
    reason: &str,
) -> kc_sdk::Result <ApprovalSetting> {
    client.set_approval(tid, enabled, reason).await
}

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/control.rs · control::set_approval

GET

/api/t/{tid}/audit

#

get_t_tid_audit

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
limit
integer · i64null
Optional

Request body

No request body.

Successful response

200 · application/json

Array<AuditEvent>

Call example

Rust SDK

use kc_sdk::{Client, Download, kc_types::*};
use chrono::NaiveDate;

async fn example(
    client: &Client,
    tid: TenantId,
    limit: usize,
) -> kc_sdk::Result <Vec <AuditEvent>> {
    client.audit(tid, limit).await
}

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 · audit

GET

/api/t/{tid}/close/{period}

#

get_t_tid_close_period

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
periodstringRequired

Request body

No request body.

Successful response

200 · application/json

MonthClose

Call example

Rust SDK

use kc_sdk::{Client, Download, kc_types::*};
use chrono::NaiveDate;

async fn example(
    client: &Client,
    tid: TenantId,
    period: NaiveDate,
) -> kc_sdk::Result <MonthClose> {
    client.month_close(tid, period).await
}

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/close.rs · close::month_close

POST

/api/t/{tid}/close/{period}/{task}

#

post_t_tid_close_period_task

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
periodstringRequired
taskstringRequired

Request body

FieldTypeRequired
stateCloseMarkStateRequired
notestringServer default: ""Optional
request.json
{
  "state": "done"
}

Successful response

200 · application/json

MonthClose

Call example

Rust SDK

use kc_sdk::{Client, Download, kc_types::*};
use chrono::NaiveDate;

async fn example(
    client: &Client,
    tid: TenantId,
    period: NaiveDate,
    task: CloseTask,
    state: CloseMarkState,
    note: &str,
) -> kc_sdk::Result <MonthClose> {
    client.mark_close_step(tid, period, task, state, note).await
}

Errors and constraints

bad_close_tasknote_required

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/close.rs · close::mark_step

GET

/api/t/{tid}/deadline-rules

#

get_t_tid_deadline_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

Rust SDK

use kc_sdk::{Client, Download, kc_types::*};
use chrono::NaiveDate;

async fn example(
    client: &Client,
    tid: TenantId,
) -> kc_sdk::Result <Vec <DeadlineRule>> {
    client.deadline_rules(tid).await
}

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/control.rs · control::deadline_rules

POST

/api/t/{tid}/deadline-rules/{code}

#

post_t_tid_deadline_rules_code

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

Request body

FieldTypeRequired
enabledbooleanRequired
reasonstringRequired
request.json
{
  "enabled": true,
  "reason": "example"
}

Successful response

200 · application/json

Call example

Rust SDK

use kc_sdk::{Client, Download, kc_types::*};
use chrono::NaiveDate;

async fn example(
    client: &Client,
    tid: TenantId,
    code: &str,
    enabled: bool,
    reason: &str,
) -> kc_sdk::Result <Vec <DeadlineRule>> {
    client.set_deadline_rule(tid, code, enabled, reason).await
}

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/control.rs · control::set_deadline_rule

GET

/api/t/{tid}/deadlines

#

get_t_tid_deadlines

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
from
string · YYYY-MM-DDnull
Optional
to
string · YYYY-MM-DDnull
Optional
status
stringnull
Optional

Request body

No request body.

Successful response

200 · application/json

Array<Deadline>

Call example

Rust SDK

use kc_sdk::{Client, Download, kc_types::*};
use chrono::NaiveDate;

async fn example(
    client: &Client,
    tid: TenantId,
    from: Option <NaiveDate>,
    to: Option <NaiveDate>,
    status: Option <&str>,
) -> kc_sdk::Result <Vec <Deadline>> {
    client.deadlines(tid, from, to, status).await
}

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/control.rs · control::deadlines

POST

/api/t/{tid}/deadlines/generate

#

post_t_tid_deadlines_generate

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
fromstring · YYYY-MM-DDRequired
tostring · YYYY-MM-DDRequired
request.json
{
  "from": "2026-01-01",
  "to": "2026-01-01"
}

Successful response

200 · application/json

GeneratedDeadlines

Call example

Rust SDK

use kc_sdk::{Client, Download, kc_types::*};
use chrono::NaiveDate;

async fn example(
    client: &Client,
    tid: TenantId,
    from: NaiveDate,
    to: NaiveDate,
) -> kc_sdk::Result <GeneratedDeadlines> {
    client.generate_deadlines(tid, from, to).await
}

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/control.rs · control::generate_deadlines

POST

/api/t/{tid}/deadlines/{id}/mark

#

post_t_tid_deadlines_id_mark

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
idDeadlineIdRequired

Request body

FieldTypeRequired
donebooleanRequired
notestringServer default: ""Optional
request.json
{
  "done": true
}

Successful response

200 · application/json

Deadline

Call example

Rust SDK

use kc_sdk::{Client, Download, kc_types::*};
use chrono::NaiveDate;

async fn example(
    client: &Client,
    tid: TenantId,
    id: DeadlineId,
    done: bool,
    note: &str,
) -> kc_sdk::Result <Deadline> {
    client.mark_deadline(tid, id, done, note).await
}

Errors and constraints

note_required

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/control.rs · control::mark_deadline

GET

/api/t/{tid}/drafts

#

get_t_tid_drafts

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
status
stringnull
Optional
limit
integer · i64null
Optional
before_id
DraftIdnull
Optional

Request body

No request body.

Successful response

200 · application/json

Call example

Rust SDK

use kc_sdk::{Client, Download, kc_types::*};
use chrono::NaiveDate;

async fn example(
    client: &Client,
    tid: TenantId,
    status: Option <&str>,
) -> kc_sdk::Result <Vec <DraftSummary>> {
    client.drafts(tid, status).await
}

pending_drafts

use kc_sdk::{Client, Download, kc_types::*};
use chrono::NaiveDate;

async fn example(
    client: &Client,
    tid: TenantId,
) -> kc_sdk::Result <Vec <DraftSummary>> {
    client.pending_drafts(tid).await
}

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/control.rs · control::drafts

POST

/api/t/{tid}/drafts

#

post_t_tid_drafts

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

Draft

Call example

Rust SDK

use kc_sdk::{Client, Download, kc_types::*};
use chrono::NaiveDate;

async fn example(
    client: &Client,
    tid: TenantId,
    e: &NewEntry,
) -> kc_sdk::Result <Draft> {
    client.create_draft(tid, e).await
}

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/control.rs · control::create_draft

POST

/api/t/{tid}/drafts/approve-selected

#

post_t_tid_drafts_approve_selected

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

request.json
[]

Successful response

200 · application/json

integer · usize

Call example

Rust SDK

use kc_sdk::{Client, Download, kc_types::*};
use chrono::NaiveDate;

async fn example(
    client: &Client,
    tid: TenantId,
    v: &[DraftSelection],
) -> kc_sdk::Result <usize> {
    client.approve_selected(tid, v).await
}

Errors and constraints

draft_changedinvalid_selection

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/control.rs · control::approve_selected

POST

/api/t/{tid}/drafts/offline

#

post_t_tid_drafts_offline

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
keystring · UUIDRequired
created_atstring · ISO 8601Required
based_at
string · ISO 8601null
Server default: null
Optional
devicestringServer default: ""Optional
postbooleanServer default: falseOptional
entryNewEntryRequired
request.json
{
  "key": "00000000-0000-4000-8000-000000000001",
  "created_at": "2026-01-01T00:00:00Z",
  "entry": {
    "posting_date": "2026-01-01",
    "document": {
      "number": "example",
      "date": "2026-01-01",
      "issuer": "example"
    },
    "description": "example",
    "lines": []
  }
}

Successful response

201 · application/json

OfflineDraftSynced

Call example

Rust SDK

use kc_sdk::{Client, Download, kc_types::*};
use chrono::NaiveDate;

async fn example(
    client: &Client,
    tid: TenantId,
    o: &OfflineDraft,
) -> kc_sdk::Result <OfflineDraftSynced> {
    client.sync_offline_draft(tid, o).await
}

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/control.rs · control::offline_draft

GET

/api/t/{tid}/drafts/{id}

#

get_t_tid_drafts_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
idDraftIdRequired

Request body

No request body.

Successful response

200 · application/json

Draft

Call example

Rust SDK

use kc_sdk::{Client, Download, kc_types::*};
use chrono::NaiveDate;

async fn example(
    client: &Client,
    tid: TenantId,
    id: DraftId,
) -> kc_sdk::Result <Draft> {
    client.draft(tid, id).await
}

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/control.rs · control::draft

POST

/api/t/{tid}/drafts/{id}

#

post_t_tid_drafts_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
idDraftIdRequired

Request body

FieldTypeRequired
versioninteger · i32Required
reasonstringRequired
entryNewEntryRequired
request.json
{
  "version": 1,
  "reason": "example",
  "entry": {
    "posting_date": "2026-01-01",
    "document": {
      "number": "example",
      "date": "2026-01-01",
      "issuer": "example"
    },
    "description": "example",
    "lines": []
  }
}

Successful response

200 · application/json

Draft

Call example

Rust SDK

use kc_sdk::{Client, Download, kc_types::*};
use chrono::NaiveDate;

async fn example(
    client: &Client,
    tid: TenantId,
    id: DraftId,
    ch: &DraftChange,
) -> kc_sdk::Result <Draft> {
    client.change_draft(tid, id, ch).await
}

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/control.rs · control::change_draft

POST

/api/t/{tid}/drafts/{id}/cancel

#

post_t_tid_drafts_id_cancel

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
idDraftIdRequired

Request body

FieldTypeRequired
reasonstringRequired
request.json
{
  "reason": "example"
}

Successful response

200 · application/json

Draft

Call example

Rust SDK

use kc_sdk::{Client, Download, kc_types::*};
use chrono::NaiveDate;

async fn example(
    client: &Client,
    tid: TenantId,
    id: DraftId,
    reason: &str,
) -> kc_sdk::Result <Draft> {
    client.cancel_draft(tid, id, reason).await
}

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/control.rs · control::cancel_draft

POST

/api/t/{tid}/drafts/{id}/post

#

post_t_tid_drafts_id_post

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
idDraftIdRequired

Request body

FieldTypeRequired
versioninteger · i32Required
request.json
{
  "version": 1
}

Successful response

201 · application/json

Entry

Call example

Rust SDK

use kc_sdk::{Client, Download, kc_types::*};
use chrono::NaiveDate;

async fn example(
    client: &Client,
    tid: TenantId,
    id: DraftId,
    version: i32,
) -> kc_sdk::Result <Entry> {
    client.post_draft(tid, id, version).await
}

Errors and constraints

already_postedbad_draft_versiondraft_closedreview_stale

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/control.rs · control::post_draft

POST

/api/t/{tid}/drafts/{id}/review

#

post_t_tid_drafts_id_review

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
idDraftIdRequired

Request body

FieldTypeRequired
versioninteger · i32Required
decisionReviewDecisionRequired
notestringServer default: ""Optional
request.json
{
  "version": 1,
  "decision": "approved"
}

Successful response

200 · application/json

Draft

Call example

Rust SDK

use kc_sdk::{Client, Download, kc_types::*};
use chrono::NaiveDate;

async fn example(
    client: &Client,
    tid: TenantId,
    id: DraftId,
    r: &ReviewRequest,
) -> kc_sdk::Result <Draft> {
    client.review_draft(tid, id, r).await
}

Errors and constraints

note_required

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/control.rs · control::review

GET

/api/t/{tid}/messages

#

get_t_tid_messages

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
box
stringnull
Optional

Request body

No request body.

Successful response

200 · application/json

Call example

Rust SDK

use kc_sdk::{Client, Download, kc_types::*};
use chrono::NaiveDate;

async fn example(
    client: &Client,
    tid: TenantId,
    mailbox: MessageBox,
) -> kc_sdk::Result <Vec <InternalMessage>> {
    client.messages(tid, mailbox).await
}

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/messages.rs · messages::list

POST

/api/t/{tid}/messages

#

post_t_tid_messages

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
to
Array<string>
Server default: []
Optional
subjectstringServer default: ""Optional
bodystringRequired
reply_toServer default: nullOptional
linkServer default: nullOptional
request.json
{
  "body": "example"
}

Successful response

201 · application/json

InternalMessage

Call example

Rust SDK

use kc_sdk::{Client, Download, kc_types::*};
use chrono::NaiveDate;

async fn example(
    client: &Client,
    tid: TenantId,
    m: &NewInternalMessage,
) -> kc_sdk::Result <InternalMessage> {
    client.send_message(tid, m).await
}

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/messages.rs · messages::send

GET

/api/t/{tid}/messages/unread

#

get_t_tid_messages_unread

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

UnreadMessages

Call example

Rust SDK

use kc_sdk::{Client, Download, kc_types::*};
use chrono::NaiveDate;

async fn example(
    client: &Client,
    tid: TenantId,
) -> kc_sdk::Result <UnreadMessages> {
    client.unread_messages(tid).await
}

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/messages.rs · messages::unread

GET

/api/t/{tid}/messages/{id}

#

get_t_tid_messages_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

Request body

No request body.

Successful response

200 · application/json

Call example

Rust SDK

use kc_sdk::{Client, Download, kc_types::*};
use chrono::NaiveDate;

async fn example(
    client: &Client,
    tid: TenantId,
    id: InternalMessageId,
) -> kc_sdk::Result <Vec <InternalMessage>> {
    client.message_thread(tid, id).await
}

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/messages.rs · messages::thread

POST

/api/t/{tid}/messages/{id}/read

#

post_t_tid_messages_id_read

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
readbooleanRequired
request.json
{
  "read": true
}

Successful response

200 · application/json

InternalMessage

Call example

Rust SDK

use kc_sdk::{Client, Download, kc_types::*};
use chrono::NaiveDate;

async fn example(
    client: &Client,
    tid: TenantId,
    id: InternalMessageId,
    read: bool,
) -> kc_sdk::Result <InternalMessage> {
    client.mark_message(tid, id, read).await
}

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/messages.rs · messages::mark

Complete JSON types

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

ActivityEntry

FieldTypeRequired
idinteger · i64Required
atstring · ISO 8601Required
email
stringnull
Optional
tenant_id
string · UUIDnull
Optional
methodstringRequired
routestringRequired
statusinteger · i16Required
ip
stringnull
Optional
user_agent
stringnull
Optional
duration_msinteger · i32Required

ApprovalSetting

FieldTypeRequired
enabledbooleanRequired
reason
stringnull
Server default: null
Optional
changed_at
string · ISO 8601null
Server default: null
Optional
changed_by
stringnull
Server default: null
Optional

AttachmentMeta

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

AuditEvent

FieldTypeRequired
idinteger · i64Required
atstring · ISO 8601Required
actorstringRequired
actionstringRequired
entitystringRequired
entity_idstringRequired
detailsArbitrary JSONRequired

Board

FieldTypeRequired
periodstring · YYYY-MM-DDRequired
rows
Array<BoardRow>
Required

BoardCell

FieldTypeRequired
taskCloseTaskRequired
statusCloseStatusRequired
open_countinteger · i64Required
due_date
string · YYYY-MM-DDnull
Server default: null
Optional

BoardRow

FieldTypeRequired
tenant_idTenantIdRequired
namestringRequired
edbstringRequired
roleRoleRequired
bureau
stringnull
Server default: null
Optional
cells
Array<BoardCell>
Required

CloseStatus

"not_started""in_progress""done""overdue""not_applicable"

CloseStep

FieldTypeRequired
taskCloseTaskRequired
statusCloseStatusRequired
auto_statusCloseStatusRequired
open_countinteger · i64Required
total_countinteger · i64Required
due_date
string · YYYY-MM-DDnull
Server default: null
Optional
markServer default: nullOptional
note
stringnull
Server default: null
Optional
marked_by
stringnull
Server default: null
Optional
marked_at
string · ISO 8601null
Server default: null
Optional

CloseTask

"bank""open_items""drafts""fx""payroll""vat""lock"

Community

"orthodox""catholic""muslim""jewish""albanian""turkish""serbian""roma""vlach""bosniak"

Deadline

FieldTypeRequired
idDeadlineIdRequired
rule_codestringRequired
namestringRequired
sourcestringRequired
verifiedbooleanRequired
period_startstring · YYYY-MM-DDRequired
period_endstring · YYYY-MM-DDRequired
due_datestring · YYYY-MM-DDRequired
statusDeadlineStatusRequired
note
stringnull
Server default: null
Optional
marked_at
string · ISO 8601null
Server default: null
Optional
marked_by
stringnull
Server default: null
Optional
due_non_workingbooleanServer default: falseOptional

DeadlineRule

FieldTypeRequired
codestringRequired
namestringRequired
period_kindstringRequired
applies_tostringRequired
days_after
integer · i32null
Server default: null
Optional
months_after
integer · i32null
Server default: null
Optional
day_of_month
integer · i32null
Server default: null
Optional
sourcestringRequired
verifiedbooleanRequired
notestringRequired
enabledbooleanRequired
version_from
string · YYYY-MM-DDnull
Server default: null
Optional

DocumentRef

FieldTypeRequired
numberstringRequired
datestring · YYYY-MM-DDRequired
issuerstringRequired

DocumentWork

FieldTypeRequired
idstring · UUIDRequired
versioninteger · i64Required
worker
stringnull
Optional
offered_to
stringnull
Optional
messagestringRequired
decisionstringRequired
can_offerbooleanRequired
can_replybooleanRequired
staffRequired

DraftCancellation

FieldTypeRequired
reasonstringRequired
created_atstring · ISO 8601Required
created_bystringRequired

DraftChange

FieldTypeRequired
versioninteger · i32Required
reasonstringRequired
entryNewEntryRequired

DraftReview

FieldTypeRequired
idinteger · i64Required
versioninteger · i32Required
decisionReviewDecisionRequired
notestringRequired
created_atstring · ISO 8601Required
created_bystringRequired

DraftStatus

"draft""approved""rejected""posted""cancelled"

DraftSummary

FieldTypeRequired
idDraftIdRequired
versioninteger · i32Required
statusDraftStatusRequired
posting_datestring · YYYY-MM-DDRequired
doc_numberstringRequired
descriptionstringRequired
totalMoneyRequired
balancedbooleanRequired
entry_id
EntryIdnull
Server default: null
Optional
created_atstring · ISO 8601Required
created_bystringRequired
updated_atstring · ISO 8601Required
updated_bystringRequired
offlineServer default: nullOptional
offline_note
stringnull
Server default: null
Optional

DraftVersion

FieldTypeRequired
versioninteger · i32Required
entryNewEntryRequired
totalMoneyRequired
balancedbooleanRequired
reason
stringnull
Server default: null
Optional
created_atstring · ISO 8601Required
created_bystringRequired

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

GenerateDeadlines

FieldTypeRequired
fromstring · YYYY-MM-DDRequired
tostring · YYYY-MM-DDRequired

Holiday

FieldTypeRequired
datestring · YYYY-MM-DDRequired
namestringRequired
kindHolidayKindServer defaultOptional
communityServer default: nullOptional
articlestringServer default: ""Optional
sourcestringRequired
verifiedbooleanRequired
notestringServer default: ""Optional

InternalMessage

FieldTypeRequired
idInternalMessageIdRequired
thread_idInternalMessageIdRequired
reply_toServer default: nullOptional
senderstringRequired
recipients
Array<string>
Required
subjectstringRequired
bodystringRequired
linkServer default: nullOptional
link_label
stringnull
Server default: null
Optional
to_mebooleanRequired
readbooleanRequired
created_atstring · ISO 8601Required

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

MarkDeadline

FieldTypeRequired
donebooleanRequired
notestringServer default: ""Optional

MyDocumentWork

FieldTypeRequired
scope_idstring · UUIDRequired
sourcestringRequired
titlestringRequired
client_namestringRequired
incomingbooleanRequired

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

NewInternalMessage

FieldTypeRequired
to
Array<string>
Server default: []
Optional
subjectstringServer default: ""Optional
bodystringRequired
reply_toServer default: nullOptional
linkServer default: nullOptional

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

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

OfflineConflict

FieldTypeRequired
codestringRequired
messagestringRequired
duplicate_entry_id
EntryIdnull
Server default: null
Optional
duplicate_draft_id
DraftIdnull
Server default: null
Optional

OfflineDraft

FieldTypeRequired
keystring · UUIDRequired
created_atstring · ISO 8601Required
based_at
string · ISO 8601null
Server default: null
Optional
devicestringServer default: ""Optional
postbooleanServer default: falseOptional
entryNewEntryRequired

PostDraft

FieldTypeRequired
versioninteger · i32Required

Role

"super_admin""admin""accountant""sales""operator""reviewer""viewer"

SetApproval

FieldTypeRequired
enabledbooleanRequired
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"

WorkCalendar

FieldTypeRequired
yearinteger · i32Required
holidays
Array<Holiday>
Required
working_daysinteger · i32Required
coveredbooleanRequired
program
stringnull
Server default: null
Optional

WorkDecision

object · 3
FieldTypeRequired
emailstringRequired
messagestringServer default: ""Optional
action"offer"Required
object · 1
FieldTypeRequired
action"accept"Required
object · 2
FieldTypeRequired
reasonstringRequired
action"decline"Required

WorkRecipient

FieldTypeRequired
emailstringRequired
namestringRequired
eligiblebooleanRequired

LimitQ

FieldTypeRequired
limit
integer · i64null
Optional

control::DeadlinesQ

FieldTypeRequired
from
string · YYYY-MM-DDnull
Optional
to
string · YYYY-MM-DDnull
Optional
status
stringnull
Optional

control::DraftsQ

FieldTypeRequired
status
stringnull
Optional
limit
integer · i64null
Optional
before_id
DraftIdnull
Optional

security::Page

FieldTypeRequired
before
integer · i64null
Optional
limit
integer · i32null
Optional