Fixed assets
Assets, depreciation books, disposals and book-tax differences.
| Operation | Summary | Scope | Idempotency-Key |
|---|---|---|---|
POST /v1/assets |
Register a fixed asset | draft |
required |
GET /v1/assets/{asset} |
Get a fixed asset | read |
|
GET /v1/assets/{asset}/books |
List the books of a fixed asset | read |
|
POST /v1/assets/{asset}/books |
Add a fixed asset to a tax book | draft |
required |
GET /v1/assets/{asset}/books/{book}/schedule |
Get an asset's depreciation schedule in one book | read |
|
POST /v1/assets/{asset}/dispose |
Dispose of a fixed asset | draft |
required |
GET /v1/assets/{asset}/history |
Get the history of a fixed asset | read |
|
POST /v1/assets/{asset}/impairment |
Write down a fixed asset (impairment) | draft |
required |
POST /v1/assets/{asset}/impairment-reversal |
Reverse an impairment of a fixed asset | draft |
required |
POST /v1/assets/{asset}/partial-retirement |
Retire a part of a fixed asset | draft |
required |
POST /v1/assets/{asset}/revaluation |
Revalue a fixed asset to fair value | draft |
required |
POST /v1/assets/{asset}/reverse-acquisition |
Reverse the acquisition of a fixed asset | post |
required |
POST /v1/assets/{asset}/sale |
Sell a fixed asset to a customer on an invoice | draft |
required |
GET /v1/entities/{entity}/assets |
List the fixed asset register | read |
|
GET /v1/entities/{entity}/book-tax-differences |
Get book-tax differences | read |
|
GET /v1/entities/{entity}/depreciation-books |
List depreciation books | read |
|
POST /v1/entities/{entity}/depreciation-books |
Create a tax depreciation book | admin |
required |
PATCH /v1/entities/{entity}/depreciation-books/{code} |
Update a tax depreciation book | admin |
|
GET /v1/entities/{entity}/leases |
List leases | read |
|
POST /v1/leases |
Enter a lease | draft |
required |
GET /v1/leases/{lease} |
Get a lease and its schedule | read |
|
POST /v1/leases/{lease}/activate |
Activate a lease | draft |
required |
POST /v1/leases/{lease}/changes |
Change a lease's payments | draft |
required |
POST /v1/leases/{lease}/terminate |
End a lease | draft |
required |
POST /v1/periods/{period_id}/leases |
Post lease entries for a period | draft |
POST /v1/assets
Register a fixed asset
Register an asset; the depreciation schedule comes from data-vNext.
The yearly schedule of the accounting book is computed from the method, useful life and
convention (and from tax_asset_class for the older single tax memo, and from books
for tax books); the response returns it. post_acquisition also posts Dr asset cost /
Cr credit_account through the approval policy; acquisition_status says whether that
entry is posted or waits for approval. A purchase bill given as source_document is
linked instead. Accounts default to the entity's asset roles. The credit_account follows
the rule for the accounts of documents: not a control account (receivables, payables, bank,
the asset accounts), not a tax account, neither revenue nor expense; an acquisition paid or
owed goes to a clearing account. A wrong acquisition is undone with
POST /v1/assets/{asset}/reverse-acquisition. Refused: 409 when the code exists in the
entity; 422 when the source document is not a purchase bill, the residual value is not
below the cost (salvage_not_below_cost), the asset goes into service before it is acquired
(in_service_before_acquisition), post_acquisition has no credit_account, the credit
account is one the rule refuses (control_account_on_document, tax_account_on_document,
document_account_type), or a tax book needs an asset class or method.
| Required scope | draft (admin implies every scope) |
| Idempotency-Key | required |
| Operation id | register_asset_v1_assets_post |
Request body
application/json (required): AssetInput
| Field | Type | Required | Description |
|---|---|---|---|
entity |
string | yes | Entity code (or id) that owns the asset, e.g. CH01. |
code |
string or null | Left out: the company's next asset number (FA-00001, counted without gaps). Give one (up to 40 characters, e.g. an asset tag) only to keep it; unique in the entity. (min length 1; max length 40) |
|
name |
string | yes | Asset name or description, e.g. Server rack. |
acquisition_date |
string (date) | yes | Date the asset was acquired, ISO 8601 (YYYY-MM-DD). |
in_service_date |
string (date) or null | Date depreciation starts, ISO 8601. Default: the acquisition date. | |
cost |
decimal string | yes | Acquisition cost as a positive decimal string in the entity's functional currency, e.g. "12000.00". (greater than 0) |
salvage |
decimal string | Residual value at the end of the life, a decimal string, e.g. "1000.00". Default "0". (min 0; default "0") |
|
method |
"declining_balance" | "straight_line" | "sum_of_years_digits" |
Depreciation method: straight_line, declining_balance or sum_of_years_digits. Default straight_line. (default "straight_line") |
|
useful_life_years |
decimal string | yes | Useful life in years as a positive decimal string, e.g. "5". (greater than 0) |
rate_percent |
decimal string or null | Declining balance only: the yearly rate in percent (above 0, up to 100). Omitted: the double-declining rate. (max 100; greater than 0) | |
convention |
"full_year" | "half_year" | "mid_month" | "pro_rata_months" |
How the first and last year are prorated: full_year, half_year, mid_month or pro_rata_months (months in service). Default pro_rata_months. (default "pro_rata_months") |
|
tax_asset_class |
string or null | data-vNext tax asset class, e.g. 'de.afa.computer_hardware'. | |
cost_account |
string or null | GL account code of the asset cost, e.g. 1500. Default: the entity's fixed-asset cost account. An asset class with accounts of its own (Swiss KMU chart: IT hardware 1520 and 1529) names both accounts; naming one without the other is refused. |
|
accumulated_account |
string or null | GL account code of the accumulated depreciation, e.g. 1509. Default: the entity's accumulated-depreciation account. Named together with cost_account or not at all. |
|
expense_account |
string or null | GL account code of the depreciation expense. Default: the entity's depreciation-expense account. | |
source_document |
string or null | Purchase bill (id or number) that capitalised the cost. | |
post_acquisition |
boolean | Post Dr asset cost / Cr credit_account (when not bought via a bill). (default false) |
|
credit_account |
string or null | GL account code credited by post_acquisition, e.g. 1020. Required when post_acquisition is true. |
|
books |
array of AssetBookInput |
Tax books to depreciate the asset in as well. |
Example request
curl -X POST "$ERP_URL/v1/assets" \
-H "Authorization: Bearer $ERP_KEY" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{
"acquisition_date": "2026-09-01",
"code": "FA-001",
"cost": "12000.00",
"entity": "CH01",
"name": "Server rack",
"useful_life_years": "5"
}'
Responses
| Status | Meaning | Body |
|---|---|---|
| 201 | Created | AssetRegistered |
| 401 | Missing or invalid API key (unauthorized). |
ErrorEnvelope |
| 403 | The caller lacks the required scope (missing_right, with scope), the key belongs to no person where a person is needed (forbidden), or the approval policy denies the action (policy_denied, with action and rule_id). |
ErrorEnvelope |
| 409 | The request conflicts with the data: an Idempotency-Key reused with a different request, a closed period, or an integrity rule of the database (conflict, integrity_violation). |
ErrorEnvelope |
| 422 | Validation failed: the error envelope (validation_failed). For a malformed body or parameter its message is in sentences ("Line 2: the quantity must be above zero") and fields lists each error with pydantic's loc, type and msg beside its sentence (message) and its parts, to word it in another language: items (name and number from 1: line 2), field (its name as sent) and the rule it breaks with its limit, count and choices (none for a validator's own sentence); FastAPI's own detail list stays beside the envelope. |
HTTPValidationError |
Example response (shape)
{
"id": "string",
"code": "string",
"schedule": {},
"tax_schedule": {},
"acquisition_status": "string",
"acquisition_number": "string"
}
GET /v1/assets/{asset}
Get a fixed asset
One asset with its terms, accounts (by code), source bill and the books it is in.
Cost and salvage are in the entity's functional currency. Position and schedules per
book are in GET /v1/assets/{asset}/books. Refused with 404 for an unknown asset.
| Required scope | read (admin implies every scope) |
| Operation id | get_asset_v1_assets__asset__get |
Parameters
| In | Name | Type | Required | Description |
|---|---|---|---|---|
| path | asset |
string | yes | Asset code, e.g. FA-001 (or its id). |
Example request
curl "$ERP_URL/v1/assets/FA-001" \
-H "Authorization: Bearer $ERP_KEY"
Responses
| Status | Meaning | Body |
|---|---|---|
| 200 | OK | AssetOut |
| 401 | Missing or invalid API key (unauthorized). |
ErrorEnvelope |
| 403 | The caller lacks the required scope (missing_right, with scope), the key belongs to no person where a person is needed (forbidden), or the approval policy denies the action (policy_denied, with action and rule_id). |
ErrorEnvelope |
| 404 | The resource does not exist, or belongs to another organization (not_found). |
ErrorEnvelope |
| 422 | Validation failed: the error envelope (validation_failed). For a malformed body or parameter its message is in sentences ("Line 2: the quantity must be above zero") and fields lists each error with pydantic's loc, type and msg beside its sentence (message) and its parts, to word it in another language: items (name and number from 1: line 2), field (its name as sent) and the rule it breaks with its limit, count and choices (none for a validator's own sentence); FastAPI's own detail list stays beside the envelope. |
HTTPValidationError |
Example response (shape)
{
"id": "string",
"code": "string",
"name": "string",
"entity": "string",
"status": "string",
"acquisition_date": "2026-09-21",
"in_service_date": "2026-09-21",
"disposal_date": "2026-09-21",
"cost": "string",
"salvage": "string",
"method": "string",
"useful_life_years": "string",
"rate_percent": "string",
"convention": "string",
"cost_account": "string",
"accumulated_account": "string",
"expense_account": "string",
"source_bill": "string",
"source_bill_id": "string",
"books": [
"string"
],
"value_changes": [
"string"
]
}
GET /v1/assets/{asset}/books
List the books of a fixed asset
Every book the asset is depreciated in, with its schedule and position at as_of.
The accounting book BOOK comes first (accumulated depreciation as posted), then MEMO
when the asset has a tax memo, then the tax books by code. For tax books the response
also gives the temporary difference against the accounting book and, for the book that
carries deferred tax, the deferred tax amount. Refused with 404 for an unknown asset.
| Required scope | read (admin implies every scope) |
| Operation id | list_asset_books_v1_assets__asset__books_get |
Parameters
| In | Name | Type | Required | Description |
|---|---|---|---|---|
| path | asset |
string | yes | Asset code, e.g. FA-001 (or its id). |
| query | as_of |
string (date) or null | Position date, ISO 8601 (YYYY-MM-DD). Default: today. |
Example request
curl "$ERP_URL/v1/assets/FA-001/books" \
-H "Authorization: Bearer $ERP_KEY"
Responses
| Status | Meaning | Body |
|---|---|---|
| 200 | OK | array of AssetBookOut |
| 401 | Missing or invalid API key (unauthorized). |
ErrorEnvelope |
| 403 | The caller lacks the required scope (missing_right, with scope), the key belongs to no person where a person is needed (forbidden), or the approval policy denies the action (policy_denied, with action and rule_id). |
ErrorEnvelope |
| 404 | The resource does not exist, or belongs to another organization (not_found). |
ErrorEnvelope |
| 422 | Validation failed: the error envelope (validation_failed). For a malformed body or parameter its message is in sentences ("Line 2: the quantity must be above zero") and fields lists each error with pydantic's loc, type and msg beside its sentence (message) and its parts, to word it in another language: items (name and number from 1: line 2), field (its name as sent) and the rule it breaks with its limit, count and choices (none for a validator's own sentence); FastAPI's own detail list stays beside the envelope. |
HTTPValidationError |
Example response (shape)
[
{
"book": "string",
"name": "string",
"kind": "string",
"standard": "string",
"posts_to_gl": true,
"deferred_tax": true,
"asset_class": "string",
"asset_class_name": "string",
"method": "string",
"dataset_version": "string",
"as_of": "2026-09-21",
"accumulated": "string",
"carrying_amount": "string",
"temporary_difference": "string",
"tax_rate_percent": "string",
"deferred_tax_amount": "string",
"schedule": [
{
"fiscal_year": 1,
"opening_book_value": "string",
"depreciation": "string",
"accumulated": "string",
"closing_book_value": "string",
"book_value": null,
"difference": null
}
],
"notes": [
"string"
],
"note_reasons": [
{
"words": "string",
"code": "string",
"details": null,
"text": "string"
}
]
}
]
POST /v1/assets/{asset}/books
Add a fixed asset to a tax book
Depreciate the asset in a tax book too; the schedule comes from data-vNext.
Give an asset_class (which fills method, life, rate and convention) or at least a
method; the schedule is computed from the asset's cost and in-service date and
returned with the position as of today. Nothing is posted. Refused: 404 for an unknown
asset or tax book; 409 when the asset is already in the book; 422 when neither
asset_class nor method is given or the class is from another jurisdiction than the
book's regime.
| Required scope | draft (admin implies every scope) |
| Idempotency-Key | required |
| Operation id | add_asset_book_v1_assets__asset__books_post |
Parameters
| In | Name | Type | Required | Description |
|---|---|---|---|---|
| path | asset |
string | yes | Asset code, e.g. FA-001 (or its id). |
Request body
application/json (required): AssetBookInput
| Field | Type | Required | Description |
|---|---|---|---|
book |
string | yes | Tax book code of the entity, e.g. 'TAX-CH'. |
asset_class |
string or null | data-vNext asset class, e.g. 'ch.estv.it_hardware_software' or 'us.macrs.gds.5y'; fills method, life, rate and convention. | |
method |
"declining_balance" | "straight_line" | "sum_of_years_digits" or null |
Depreciation method: straight_line, declining_balance or sum_of_years_digits. Required when no asset_class is given; a class fills it. |
|
useful_life_years |
decimal string or null | Useful life in years, a positive decimal string, e.g. "5". (greater than 0) | |
rate_percent |
decimal string or null | Yearly rate in percent (above 0, up to 100), for declining balance. Omitted: from the asset class or the engine's default. (max 100; greater than 0) | |
convention |
"full_year" | "half_year" | "mid_month" | "pro_rata_months" or null |
How the first and last year are prorated: full_year, half_year, mid_month or pro_rata_months (months in service). Omitted: from the asset class or the engine's default. |
|
periods |
integer or null | Years to show. Omitted, a declining balance without a life ends with the asset's accounting schedule, what is left written off in its last year (a pooling regime such as UK capital allowances shows 30 years). (max 100; greater than 0) |
Example request
curl -X POST "$ERP_URL/v1/assets/FA-001/books" \
-H "Authorization: Bearer $ERP_KEY" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{
"asset_class": "ch.estv.it_hardware_software",
"book": "TAX-CH"
}'
Responses
| Status | Meaning | Body |
|---|---|---|
| 201 | Created | AssetBookOut |
| 401 | Missing or invalid API key (unauthorized). |
ErrorEnvelope |
| 403 | The caller lacks the required scope (missing_right, with scope), the key belongs to no person where a person is needed (forbidden), or the approval policy denies the action (policy_denied, with action and rule_id). |
ErrorEnvelope |
| 404 | The resource does not exist, or belongs to another organization (not_found). |
ErrorEnvelope |
| 409 | The request conflicts with the data: an Idempotency-Key reused with a different request, a closed period, or an integrity rule of the database (conflict, integrity_violation). |
ErrorEnvelope |
| 422 | Validation failed: the error envelope (validation_failed). For a malformed body or parameter its message is in sentences ("Line 2: the quantity must be above zero") and fields lists each error with pydantic's loc, type and msg beside its sentence (message) and its parts, to word it in another language: items (name and number from 1: line 2), field (its name as sent) and the rule it breaks with its limit, count and choices (none for a validator's own sentence); FastAPI's own detail list stays beside the envelope. |
HTTPValidationError |
Example response (shape)
{
"book": "string",
"name": "string",
"kind": "string",
"standard": "string",
"posts_to_gl": true,
"deferred_tax": true,
"asset_class": "string",
"asset_class_name": "string",
"method": "string",
"dataset_version": "string",
"as_of": "2026-09-21",
"accumulated": "string",
"carrying_amount": "string",
"temporary_difference": "string",
"tax_rate_percent": "string",
"deferred_tax_amount": "string",
"schedule": [
{
"fiscal_year": 1,
"opening_book_value": "string",
"depreciation": "string",
"accumulated": "string",
"closing_book_value": "string",
"book_value": "string",
"difference": "string"
}
],
"notes": [
"string"
],
"note_reasons": [
{
"words": "string",
"code": "string",
"details": {},
"text": "string"
}
]
}
GET /v1/assets/{asset}/books/{book}/schedule
Get an asset's depreciation schedule in one book
The schedule by fiscal year and the position at as_of of one of the asset's books.
Same content as one element of GET /v1/assets/{asset}/books. Refused with 404 when the
asset does not exist or is not in that book.
| Required scope | read (admin implies every scope) |
| Operation id | asset_book_schedule_v1_assets__asset__books__book__schedule_get |
Parameters
| In | Name | Type | Required | Description |
|---|---|---|---|---|
| path | asset |
string | yes | Asset code, e.g. FA-001 (or its id). |
| path | book |
string | yes | Book code: BOOK (accounting book), MEMO or a tax book such as TAX-CH. |
| query | as_of |
string (date) or null | Position date, ISO 8601 (YYYY-MM-DD). Default: today. |
Example request
curl "$ERP_URL/v1/assets/FA-001/books/BOOK/schedule" \
-H "Authorization: Bearer $ERP_KEY"
Responses
| Status | Meaning | Body |
|---|---|---|
| 200 | OK | AssetBookOut |
| 401 | Missing or invalid API key (unauthorized). |
ErrorEnvelope |
| 403 | The caller lacks the required scope (missing_right, with scope), the key belongs to no person where a person is needed (forbidden), or the approval policy denies the action (policy_denied, with action and rule_id). |
ErrorEnvelope |
| 404 | The resource does not exist, or belongs to another organization (not_found). |
ErrorEnvelope |
| 422 | Validation failed: the error envelope (validation_failed). For a malformed body or parameter its message is in sentences ("Line 2: the quantity must be above zero") and fields lists each error with pydantic's loc, type and msg beside its sentence (message) and its parts, to word it in another language: items (name and number from 1: line 2), field (its name as sent) and the rule it breaks with its limit, count and choices (none for a validator's own sentence); FastAPI's own detail list stays beside the envelope. |
HTTPValidationError |
Example response (shape)
{
"book": "string",
"name": "string",
"kind": "string",
"standard": "string",
"posts_to_gl": true,
"deferred_tax": true,
"asset_class": "string",
"asset_class_name": "string",
"method": "string",
"dataset_version": "string",
"as_of": "2026-09-21",
"accumulated": "string",
"carrying_amount": "string",
"temporary_difference": "string",
"tax_rate_percent": "string",
"deferred_tax_amount": "string",
"schedule": [
{
"fiscal_year": 1,
"opening_book_value": "string",
"depreciation": "string",
"accumulated": "string",
"closing_book_value": "string",
"book_value": "string",
"difference": "string"
}
],
"notes": [
"string"
],
"note_reasons": [
{
"words": "string",
"code": "string",
"details": {},
"text": "string"
}
]
}
POST /v1/assets/{asset}/dispose
Dispose of a fixed asset
Derecognise an active asset on disposal_date and book the gain or loss.
Posts one entry dated at the disposal: the depreciation the schedule reaches by the end
of the disposal period and not yet booked (Dr expense / Cr accumulated; the other way
round for what runs of later periods of its fiscal year booked after the disposal date),
Cr cost, Dr accumulated depreciation, Dr proceeds_account for any proceeds, and the
difference as gain or loss on the entity's asset-disposal account. The result is the
usual submit result with the approval policy decision; the asset becomes disposed
once the entry is posted (and keeps its status if it is rejected). An agent's disposal
always waits for a person, whatever the policy says of the amount. Refused: 409 when the
asset is not active, a depreciation entry or an earlier disposal of it waits for approval,
its acquisition entry is not posted, depreciation of it is booked in a later fiscal year,
or the period is closed; 422 when there are proceeds without proceeds_account,
proceeds_account_not_cash (account) when it is not a bank or cash account (a sale on
credit is sold on a sales invoice: POST /v1/assets/{asset}/sale), or the disposal is dated
before the asset went into service (disposal_before_in_service) or after today where the
company is (disposal_in_future).
| Required scope | draft (admin implies every scope) |
| Idempotency-Key | required |
| Operation id | dispose_asset_v1_assets__asset__dispose_post |
Parameters
| In | Name | Type | Required | Description |
|---|---|---|---|---|
| path | asset |
string | yes | Asset code, e.g. FA-001 (or its id). |
Request body
application/json (required): DisposalInput
| Field | Type | Required | Description |
|---|---|---|---|
disposal_date |
string (date) | yes | Date of the disposal, ISO 8601; the posting is dated here and its period must be open. |
proceeds |
decimal string | Sale proceeds as a decimal string, e.g. "2500.00". Default "0" (scrapped). (min 0; default "0") |
|
proceeds_account |
string or null | Where proceeds are debited. |
Example request
curl -X POST "$ERP_URL/v1/assets/FA-001/dispose" \
-H "Authorization: Bearer $ERP_KEY" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{
"disposal_date": "2026-09-30",
"proceeds": "2500.00",
"proceeds_account": "1020"
}'
Responses
| Status | Meaning | Body |
|---|---|---|
| 200 | OK | SubmitResult |
| 401 | Missing or invalid API key (unauthorized). |
ErrorEnvelope |
| 403 | The caller lacks the required scope (missing_right, with scope), the key belongs to no person where a person is needed (forbidden), or the approval policy denies the action (policy_denied, with action and rule_id). |
ErrorEnvelope |
| 404 | The resource does not exist, or belongs to another organization (not_found). |
ErrorEnvelope |
| 409 | The request conflicts with the data: an Idempotency-Key reused with a different request, a closed period, or an integrity rule of the database (conflict, integrity_violation). |
ErrorEnvelope |
| 422 | Validation failed: the error envelope (validation_failed). For a malformed body or parameter its message is in sentences ("Line 2: the quantity must be above zero") and fields lists each error with pydantic's loc, type and msg beside its sentence (message) and its parts, to word it in another language: items (name and number from 1: line 2), field (its name as sent) and the rule it breaks with its limit, count and choices (none for a validator's own sentence); FastAPI's own detail list stays beside the envelope. |
HTTPValidationError |
Example response (shape)
{
"entry_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"status": "string",
"number": "string",
"policy": {
"decision": "allow",
"reason": "string",
"rule_id": "string",
"table_id": "string"
},
"approval_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"reason": "string"
}
GET /v1/assets/{asset}/history
Get the history of a fixed asset
Everything that happened to the asset, oldest first, each with its date, amount and
journal entry: its acquisition (the entry, or the purchase bill the cost came from), each
depreciation, any other entry booked to it, its disposal and reversals of these; then each
tax book's depreciation of the fiscal years that have ended (tax books post nothing). Also
the asset's audit trail. book_value is the accounting book's value after each posted
entry. Refused with 404 for an unknown asset.
| Required scope | read (admin implies every scope) |
| Operation id | get_asset_history_v1_assets__asset__history_get |
Parameters
| In | Name | Type | Required | Description |
|---|---|---|---|---|
| path | asset |
string | yes | Asset code, e.g. FA-001 (or its id). |
Example request
curl "$ERP_URL/v1/assets/FA-001/history" \
-H "Authorization: Bearer $ERP_KEY"
Responses
| Status | Meaning | Body |
|---|---|---|
| 200 | OK | AssetHistory |
| 401 | Missing or invalid API key (unauthorized). |
ErrorEnvelope |
| 403 | The caller lacks the required scope (missing_right, with scope), the key belongs to no person where a person is needed (forbidden), or the approval policy denies the action (policy_denied, with action and rule_id). |
ErrorEnvelope |
| 404 | The resource does not exist, or belongs to another organization (not_found). |
ErrorEnvelope |
| 422 | Validation failed: the error envelope (validation_failed). For a malformed body or parameter its message is in sentences ("Line 2: the quantity must be above zero") and fields lists each error with pydantic's loc, type and msg beside its sentence (message) and its parts, to word it in another language: items (name and number from 1: line 2), field (its name as sent) and the rule it breaks with its limit, count and choices (none for a validator's own sentence); FastAPI's own detail list stays beside the envelope. |
HTTPValidationError |
Example response (shape)
{
"asset": "string",
"currency": "string",
"events": [
{
"date": "2026-09-21",
"kind": "acquisition",
"book": "string",
"description": "string",
"amount": "string",
"book_value": "string",
"status": "string",
"journal_entry_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"journal_entry_number": "string",
"document_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"document_number": "string"
}
],
"changes": [
{
"id": 1,
"at": "2026-09-21T09:30:00Z",
"actor": {},
"action": "string",
"object_type": "string",
"object_id": "string",
"request_id": "string",
"idempotency_key": "string",
"data": {}
}
]
}
POST /v1/assets/{asset}/impairment
Write down a fixed asset (impairment)
Write the carrying amount of an active asset down by amount, or to recoverable_amount.
Posts one entry dated impairment_date: first the depreciation the schedule reaches by the
end of the period and has not booked yet, then Dr impairment loss (role
asset_impairment_loss) / Cr the asset's accumulated depreciation. An asset carried at a
revalued amount sets the write-down against its revaluation surplus first (IAS 36.61). The
salvage is at most the new carrying amount; from the next period the lower value is
depreciated over the rest of the useful life. The entry goes through the approval policy;
a rejection puts the asset back. Refused as a partial retirement is (409 and 422), and 422
when the write-down is more than the carrying amount (impairment_too_large) or the
recoverable amount is not below it (no_impairment).
| Required scope | draft (admin implies every scope) |
| Idempotency-Key | required |
| Operation id | impair_asset_v1_assets__asset__impairment_post |
Parameters
| In | Name | Type | Required | Description |
|---|---|---|---|---|
| path | asset |
string | yes | Asset code, e.g. FA-001 (or its id). |
Request body
application/json (required): ImpairmentInput
| Field | Type | Required | Description |
|---|---|---|---|
impairment_date |
string (date) | yes | Day of the impairment, ISO 8601; the entry is dated on it and its period must be open. |
amount |
decimal string or null | The write-down, in the company's currency, at most the carrying amount. (greater than 0) | |
recoverable_amount |
decimal string or null | Or the value the asset is written down to (its recoverable amount, IAS 36.59): the write-down is the carrying amount less it. Give this or amount. (min 0) |
|
reason |
string | yes | Why the asset lost value, e.g. damage, obsolescence (kept with the change). (min length 1; max length 500) |
Example request
curl -X POST "$ERP_URL/v1/assets/FA-001/impairment" \
-H "Authorization: Bearer $ERP_KEY" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{
"impairment_date": "2026-10-31",
"reason": "Machine damaged by water; repair not economic",
"recoverable_amount": "6000.00"
}'
Responses
| Status | Meaning | Body |
|---|---|---|
| 201 | Created | AssetChangeOut |
| 401 | Missing or invalid API key (unauthorized). |
ErrorEnvelope |
| 403 | The caller lacks the required scope (missing_right, with scope), the key belongs to no person where a person is needed (forbidden), or the approval policy denies the action (policy_denied, with action and rule_id). |
ErrorEnvelope |
| 404 | The resource does not exist, or belongs to another organization (not_found). |
ErrorEnvelope |
| 409 | The request conflicts with the data: an Idempotency-Key reused with a different request, a closed period, or an integrity rule of the database (conflict, integrity_violation). |
ErrorEnvelope |
| 422 | Validation failed: the error envelope (validation_failed). For a malformed body or parameter its message is in sentences ("Line 2: the quantity must be above zero") and fields lists each error with pydantic's loc, type and msg beside its sentence (message) and its parts, to word it in another language: items (name and number from 1: line 2), field (its name as sent) and the rule it breaks with its limit, count and choices (none for a validator's own sentence); FastAPI's own detail list stays beside the envelope. |
HTTPValidationError |
Example response (shape)
{
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"asset": "string",
"kind": "impairment",
"date": "2026-09-21",
"reason": "string",
"retired_percent": "string",
"cost_before": "string",
"cost_after": "string",
"carrying_before": "string",
"carrying_after": "string",
"depreciation_to_period_end": "string",
"proceeds": "string",
"profit_or_loss": "string",
"surplus_change": "string",
"submit": {
"entry_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"status": "string",
"number": "string",
"policy": {
"decision": "allow",
"reason": "string",
"rule_id": "string",
"table_id": "string"
},
"approval_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"reason": "string"
}
}
POST /v1/assets/{asset}/impairment-reversal
Reverse an impairment of a fixed asset
Write an impaired asset up again by amount, or to recoverable_amount, once the reasons
for the impairment no longer apply (IAS 36.114; HGB § 253 (5), the Wertaufholung; OR 960a).
Posts one entry dated reversal_date: first the depreciation the schedule reaches by the end
of the period and has not booked yet, then Dr the asset's accumulated depreciation / Cr the
impairment account (role asset_impairment_loss), as income. The write-up is at most the
value the asset would have, net of depreciation, had it not been impaired, and what its
impairments took to profit or loss (IAS 36.117): a recoverable_amount above it writes the
asset up to it, an amount above it is refused. The asset stays at cost less depreciation;
from the next period the higher value is depreciated over the rest of the useful life. A
person records it (the policy action change_asset_value, which agents are always denied:
403), and the entry goes through the approval policy; a rejection puts the asset back. Refused
as a partial retirement is (409 and 422), and 409 under US GAAP and ASPE, which forbid it
(impairment_reversal_not_allowed with law); 422 when the asset carries no impairment to
reverse (no_impairment_to_reverse), the recoverable amount is not above the carrying amount
(no_reversal) or the amount is above what may be reversed (impairment_reversal_too_large
with most).
| Required scope | draft (admin implies every scope) |
| Idempotency-Key | required |
| Operation id | reverse_impairment_v1_assets__asset__impairment_reversal_post |
Parameters
| In | Name | Type | Required | Description |
|---|---|---|---|---|
| path | asset |
string | yes | Asset code, e.g. FA-001 (or its id). |
Request body
application/json (required): ImpairmentReversalInput
| Field | Type | Required | Description |
|---|---|---|---|
reversal_date |
string (date) | yes | Day of the reversal, ISO 8601; the entry is dated on it and its period must be open. |
amount |
decimal string or null | The write-up, in the company's currency, at most what the asset may be written up by (the value it would have, net of depreciation, had it not been impaired). (greater than 0) | |
recoverable_amount |
decimal string or null | Or the asset's recoverable amount now: the write-up is what it is above the carrying amount, at most what the asset may be written up by. Give this or amount. (greater than 0) |
|
reason |
string | yes | Why the reasons for the impairment no longer apply (kept with the change). (min length 1; max length 500) |
Example request
curl -X POST "$ERP_URL/v1/assets/FA-001/impairment-reversal" \
-H "Authorization: Bearer $ERP_KEY" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{
"reason": "Market for the machine recovered; valuation of 20 December 2026",
"recoverable_amount": "11000.00",
"reversal_date": "2026-12-31"
}'
Responses
| Status | Meaning | Body |
|---|---|---|
| 201 | Created | AssetChangeOut |
| 401 | Missing or invalid API key (unauthorized). |
ErrorEnvelope |
| 403 | The caller lacks the required scope (missing_right, with scope), the key belongs to no person where a person is needed (forbidden), or the approval policy denies the action (policy_denied, with action and rule_id). |
ErrorEnvelope |
| 404 | The resource does not exist, or belongs to another organization (not_found). |
ErrorEnvelope |
| 409 | The request conflicts with the data: an Idempotency-Key reused with a different request, a closed period, or an integrity rule of the database (conflict, integrity_violation). |
ErrorEnvelope |
| 422 | Validation failed: the error envelope (validation_failed). For a malformed body or parameter its message is in sentences ("Line 2: the quantity must be above zero") and fields lists each error with pydantic's loc, type and msg beside its sentence (message) and its parts, to word it in another language: items (name and number from 1: line 2), field (its name as sent) and the rule it breaks with its limit, count and choices (none for a validator's own sentence); FastAPI's own detail list stays beside the envelope. |
HTTPValidationError |
Example response (shape)
{
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"asset": "string",
"kind": "impairment",
"date": "2026-09-21",
"reason": "string",
"retired_percent": "string",
"cost_before": "string",
"cost_after": "string",
"carrying_before": "string",
"carrying_after": "string",
"depreciation_to_period_end": "string",
"proceeds": "string",
"profit_or_loss": "string",
"surplus_change": "string",
"submit": {
"entry_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"status": "string",
"number": "string",
"policy": {
"decision": "allow",
"reason": "string",
"rule_id": "string",
"table_id": "string"
},
"approval_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"reason": "string"
}
}
POST /v1/assets/{asset}/partial-retirement
Retire a part of a fixed asset
Retire a part of an active asset, given as a percentage or an amount of its cost.
Posts one entry dated retirement_date: first the depreciation the schedule reaches by the
end of the period and has not booked yet, then Cr cost of the part, Dr its share of the
accumulated depreciation, Dr proceeds_account for the net proceeds and the difference as
gain or loss on the asset-disposal accounts. The salvage shrinks in proportion; from the next
period what is left is depreciated over the rest of the useful life. The entry goes through
the approval policy (submit); while it waits, depreciation runs leave the asset alone, and
a rejection puts the asset back as it was. To sell the part to a customer on an invoice, use
POST /v1/assets/{asset}/sale. Refused: 409 when the asset is not active, something of it
waits for approval (asset_change_waits, disposal_waits, depreciation_waits),
depreciation is booked after the period (depreciation_booked_later), its value changed
later (asset_changed_later) or the period is closed; 422 for a date before the asset is in
service (asset_change_before_service) or after today (asset_change_in_future), a part not
below the cost (retirement_too_large: dispose of the asset instead) or proceeds without
proceeds_account.
| Required scope | draft (admin implies every scope) |
| Idempotency-Key | required |
| Operation id | retire_part_v1_assets__asset__partial_retirement_post |
Parameters
| In | Name | Type | Required | Description |
|---|---|---|---|---|
| path | asset |
string | yes | Asset code, e.g. FA-001 (or its id). |
Request body
application/json (required): PartialRetirementInput
| Field | Type | Required | Description |
|---|---|---|---|
percent |
decimal string or null | The part retired, in percent of the asset's cost (above 0, below 100). (greater than 0) | |
cost |
decimal string or null | The part retired as an amount of the asset's cost, in the company's currency (below the cost). Give this or percent. (greater than 0) |
|
retirement_date |
string (date) | yes | Day the part leaves, ISO 8601; the entry is dated on it and its period must be open. |
proceeds |
decimal string | Net proceeds for the part, without VAT. Default "0" (scrapped). (min 0; default "0") |
|
proceeds_account |
string or null | The account the proceeds are debited to, usually the bank account they were paid into. To sell to a customer on an invoice, use POST /v1/assets/{asset}/sale. |
|
reason |
string or null | Why, in your own words (kept with the change and shown to the approver). (min length 1; max length 500) |
Example request
curl -X POST "$ERP_URL/v1/assets/FA-001/partial-retirement" \
-H "Authorization: Bearer $ERP_KEY" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{
"percent": "25",
"proceeds": "2000.00",
"proceeds_account": "1020",
"retirement_date": "2026-10-15"
}'
Responses
| Status | Meaning | Body |
|---|---|---|
| 201 | Created | AssetChangeOut |
| 401 | Missing or invalid API key (unauthorized). |
ErrorEnvelope |
| 403 | The caller lacks the required scope (missing_right, with scope), the key belongs to no person where a person is needed (forbidden), or the approval policy denies the action (policy_denied, with action and rule_id). |
ErrorEnvelope |
| 404 | The resource does not exist, or belongs to another organization (not_found). |
ErrorEnvelope |
| 409 | The request conflicts with the data: an Idempotency-Key reused with a different request, a closed period, or an integrity rule of the database (conflict, integrity_violation). |
ErrorEnvelope |
| 422 | Validation failed: the error envelope (validation_failed). For a malformed body or parameter its message is in sentences ("Line 2: the quantity must be above zero") and fields lists each error with pydantic's loc, type and msg beside its sentence (message) and its parts, to word it in another language: items (name and number from 1: line 2), field (its name as sent) and the rule it breaks with its limit, count and choices (none for a validator's own sentence); FastAPI's own detail list stays beside the envelope. |
HTTPValidationError |
Example response (shape)
{
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"asset": "string",
"kind": "impairment",
"date": "2026-09-21",
"reason": "string",
"retired_percent": "string",
"cost_before": "string",
"cost_after": "string",
"carrying_before": "string",
"carrying_after": "string",
"depreciation_to_period_end": "string",
"proceeds": "string",
"profit_or_loss": "string",
"surplus_change": "string",
"submit": {
"entry_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"status": "string",
"number": "string",
"policy": {
"decision": "allow",
"reason": "string",
"rule_id": "string",
"table_id": "string"
},
"approval_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"reason": "string"
}
}
POST /v1/assets/{asset}/revaluation
Revalue a fixed asset to fair value
Revalue an active asset to fair_value under the revaluation model (IAS 16.31).
Posts one entry dated revaluation_date: first the depreciation the schedule reaches by the
end of the period and has not booked yet, then the accumulated depreciation eliminated against
the cost and the cost restated to the fair value (IAS 16.35(b)). A rise is credited to the
revaluation surplus in equity (role revaluation_surplus), as income where it reverses an
earlier loss of the asset; a fall is set against the asset's surplus first and the rest is a
loss (IAS 16.39 and 40). From the next period the revalued amount less the salvage is
depreciated over the rest of the useful life. The entry goes through the approval policy; a
rejection puts the asset back. Refused as a partial retirement is (409 and 422), and 409 when
the company's books follow a law that keeps assets at cost (revaluation_not_allowed with
law: Swiss OR 960a, HGB § 253 (1), art. 2426 c.c., the Spanish PGC, US GAAP, ASPE) or for
a French free revaluation (revaluation_not_built); 422 when the fair value is the carrying
amount (revaluation_no_change) or the useful life is over (asset_life_over, 409).
| Required scope | draft (admin implies every scope) |
| Idempotency-Key | required |
| Operation id | revalue_asset_v1_assets__asset__revaluation_post |
Parameters
| In | Name | Type | Required | Description |
|---|---|---|---|---|
| path | asset |
string | yes | Asset code, e.g. FA-001 (or its id). |
Request body
application/json (required): RevaluationInput
| Field | Type | Required | Description |
|---|---|---|---|
revaluation_date |
string (date) | yes | Day of the revaluation, ISO 8601; the entry is dated on it and its period must be open. |
fair_value |
decimal string | yes | The asset's fair value on that day, in the company's currency. (greater than 0) |
reason |
string | yes | The basis of the fair value, e.g. a valuer's report (kept with the change). (min length 1; max length 500) |
Example request
curl -X POST "$ERP_URL/v1/assets/FA-001/revaluation" \
-H "Authorization: Bearer $ERP_KEY" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{
"fair_value": "15000.00",
"reason": "Valuation report of 20 December 2026",
"revaluation_date": "2026-12-31"
}'
Responses
| Status | Meaning | Body |
|---|---|---|
| 201 | Created | AssetChangeOut |
| 401 | Missing or invalid API key (unauthorized). |
ErrorEnvelope |
| 403 | The caller lacks the required scope (missing_right, with scope), the key belongs to no person where a person is needed (forbidden), or the approval policy denies the action (policy_denied, with action and rule_id). |
ErrorEnvelope |
| 404 | The resource does not exist, or belongs to another organization (not_found). |
ErrorEnvelope |
| 409 | The request conflicts with the data: an Idempotency-Key reused with a different request, a closed period, or an integrity rule of the database (conflict, integrity_violation). |
ErrorEnvelope |
| 422 | Validation failed: the error envelope (validation_failed). For a malformed body or parameter its message is in sentences ("Line 2: the quantity must be above zero") and fields lists each error with pydantic's loc, type and msg beside its sentence (message) and its parts, to word it in another language: items (name and number from 1: line 2), field (its name as sent) and the rule it breaks with its limit, count and choices (none for a validator's own sentence); FastAPI's own detail list stays beside the envelope. |
HTTPValidationError |
Example response (shape)
{
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"asset": "string",
"kind": "impairment",
"date": "2026-09-21",
"reason": "string",
"retired_percent": "string",
"cost_before": "string",
"cost_after": "string",
"carrying_before": "string",
"carrying_after": "string",
"depreciation_to_period_end": "string",
"proceeds": "string",
"profit_or_loss": "string",
"surplus_change": "string",
"submit": {
"entry_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"status": "string",
"number": "string",
"policy": {
"decision": "allow",
"reason": "string",
"rule_id": "string",
"table_id": "string"
},
"approval_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"reason": "string"
}
}
POST /v1/assets/{asset}/reverse-acquisition
Reverse the acquisition of a fixed asset
Take an asset registered or posted by mistake off the register, reversing its acquisition.
For an active asset with no depreciation booked and no disposal. Its acquisition entry is
reversed like a journal entry: dated on (default: the acquisition entry's date; its period
must be open), with the required reason, through the approval policy (action
reverse_entry, source fa). Only a person reverses (403 for an agent or without the post
scope); an acquisition someone else created, posted or approved waits for a second person
(status pending_approval with approval_id, decided with
POST /v1/approvals/{approval_id}/approve, which checks everything again). Once the
reversal is posted the asset's status is reversed. An asset without an acquisition entry
of its own (bought with a purchase bill, or already on the books) has nothing to reverse
and leaves the register at once; correct the bill with a vendor credit note. Refused: 409
when the asset is not active, a disposal of it waits, depreciation of it is booked
(asset_depreciated: dispose of it instead) or its value changed (asset_value_changed), its
acquisition waits for approval or is
already reversed (or its reversal waits), or the period is closed; 422 without a reason.
| Required scope | post (admin implies every scope) |
| Idempotency-Key | required |
| Operation id | reverse_asset_acquisition_v1_assets__asset__reverse_acquisition_post |
Parameters
| In | Name | Type | Required | Description |
|---|---|---|---|---|
| path | asset |
string | yes | Asset code, e.g. FA-001 (or its id). |
Request body
application/json (required): ReverseRequest
| Field | Type | Required | Description |
|---|---|---|---|
on |
string (date) or null | Date of the reversal, ISO 8601; its period must exist and be open. Default: the date of the entry being reversed. | |
reason |
string | yes | Why it is reversed (required, at most 500 characters): appended to the description of the reversal entry and recorded in the audit trail and, when the reversal needs approval, in the approval request. (min length 1; max length 500) |
Example request
curl -X POST "$ERP_URL/v1/assets/FA-001/reverse-acquisition" \
-H "Authorization: Bearer $ERP_KEY" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{
"on": "2026-10-01",
"reason": "Accrual released"
}'
Responses
| Status | Meaning | Body |
|---|---|---|
| 200 | OK | AssetReversalResult |
| 401 | Missing or invalid API key (unauthorized). |
ErrorEnvelope |
| 403 | The caller lacks the required scope (missing_right, with scope), the key belongs to no person where a person is needed (forbidden), or the approval policy denies the action (policy_denied, with action and rule_id). |
ErrorEnvelope |
| 404 | The resource does not exist, or belongs to another organization (not_found). |
ErrorEnvelope |
| 409 | The request conflicts with the data: an Idempotency-Key reused with a different request, a closed period, or an integrity rule of the database (conflict, integrity_violation). |
ErrorEnvelope |
| 422 | Validation failed: the error envelope (validation_failed). For a malformed body or parameter its message is in sentences ("Line 2: the quantity must be above zero") and fields lists each error with pydantic's loc, type and msg beside its sentence (message) and its parts, to word it in another language: items (name and number from 1: line 2), field (its name as sent) and the rule it breaks with its limit, count and choices (none for a validator's own sentence); FastAPI's own detail list stays beside the envelope. |
HTTPValidationError |
Example response (shape)
{
"asset": "string",
"status": "pending_approval",
"reversal_entry_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"reversal_number": "string",
"approval_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
}
POST /v1/assets/{asset}/sale
Sell a fixed asset to a customer on an invoice
Sell an active asset, or a part of it (percent or cost), to a customer.
Makes and submits a sales invoice dated sale_date to customer: one line of goods for
net_amount at the VAT rate rate_type (the customer's country decides the treatment, as on
any invoice), booked to the clearing account of asset sales (role asset_sale_clearing), so
the VAT is on the VAT return and the receivable on the customer. Then the whole asset is
disposed of (as POST /v1/assets/{asset}/dispose) or the part retired (as POST /v1/assets/{asset}/partial-retirement) against the invoice's net amount in the company's
currency (proceeds), which the asset's entry takes out of the clearing account: the gain
or loss is against the proceeds without VAT. Both entries go through the approval policy;
the asset's entry posts only after the invoice (sale_invoice_not_posted). An agent's sale
always waits for a person: the invoice, and then the asset's entry. Refused as the disposal or
the partial retirement is, and as the invoice is (an unknown or inactive customer, a closed
period).
A price reduced after the sale is an ordinary sales credit note (POST /v1/documents) whose
line names the account of gains on disposals (role asset_disposal_gain). A line on the
account of losses on disposals is refused as on any sales document (422
document_account_type: an expense account), and one on the clearing account too (422
control_account_on_document: only the sale's invoice books there).
| Required scope | draft (admin implies every scope) |
| Idempotency-Key | required |
| Operation id | sell_asset_v1_assets__asset__sale_post |
Parameters
| In | Name | Type | Required | Description |
|---|---|---|---|---|
| path | asset |
string | yes | Asset code, e.g. FA-001 (or its id). |
Request body
application/json (required): AssetSaleInput
| Field | Type | Required | Description |
|---|---|---|---|
percent |
decimal string or null | The part retired, in percent of the asset's cost (above 0, below 100). (greater than 0) | |
cost |
decimal string or null | The part retired as an amount of the asset's cost, in the company's currency (below the cost). Give this or percent. (greater than 0) |
|
sale_date |
string (date) | yes | Day of the sale, ISO 8601: the invoice date and the date the asset (or the part) leaves. Its period must be open. |
customer |
string | yes | The buying customer's code (or id). |
net_amount |
decimal string | yes | The selling price without VAT, in the invoice currency. (greater than 0) |
currency |
string or null | The invoice currency; default: the customer's currency. | |
rate_type |
"exempt" | "reduced" | "standard" | "zero" |
The VAT rate the sale carries, as for any invoice line of goods: standard (default; e.g. 8.1 % in Switzerland, 19 % in Germany), reduced, zero or exempt. The customer's country decides the treatment (export, intra-EU supply, reverse charge). (default "standard") |
|
description |
string or null | The invoice line's text; default: Sale of <asset code> <asset name>. (min length 1; max length 200) |
Example request
curl -X POST "$ERP_URL/v1/assets/FA-001/sale" \
-H "Authorization: Bearer $ERP_KEY" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{
"customer": "C-CH",
"net_amount": "8000.00",
"sale_date": "2026-10-15"
}'
Responses
| Status | Meaning | Body |
|---|---|---|
| 201 | Created | AssetSaleOut |
| 401 | Missing or invalid API key (unauthorized). |
ErrorEnvelope |
| 403 | The caller lacks the required scope (missing_right, with scope), the key belongs to no person where a person is needed (forbidden), or the approval policy denies the action (policy_denied, with action and rule_id). |
ErrorEnvelope |
| 404 | The resource does not exist, or belongs to another organization (not_found). |
ErrorEnvelope |
| 409 | The request conflicts with the data: an Idempotency-Key reused with a different request, a closed period, or an integrity rule of the database (conflict, integrity_violation). |
ErrorEnvelope |
| 422 | Validation failed: the error envelope (validation_failed). For a malformed body or parameter its message is in sentences ("Line 2: the quantity must be above zero") and fields lists each error with pydantic's loc, type and msg beside its sentence (message) and its parts, to word it in another language: items (name and number from 1: line 2), field (its name as sent) and the rule it breaks with its limit, count and choices (none for a validator's own sentence); FastAPI's own detail list stays beside the envelope. |
HTTPValidationError |
Example response (shape)
{
"invoice_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"invoice_number": "string",
"invoice_status": "string",
"currency": "string",
"net_amount": "string",
"tax_amount": "string",
"total": "string",
"proceeds": "string",
"disposal": {
"entry_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"status": "string",
"number": "string",
"policy": {
"decision": null,
"reason": null,
"rule_id": null,
"table_id": null
},
"approval_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"reason": "string"
},
"change": {
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"asset": "string",
"kind": "impairment",
"date": "2026-09-21",
"reason": "string",
"retired_percent": "string",
"cost_before": "string",
"cost_after": "string",
"carrying_before": "string",
"carrying_after": "string",
"depreciation_to_period_end": "string",
"proceeds": "string",
"profit_or_loss": "string",
"surplus_change": "string",
"submit": {
"entry_id": null,
"status": null,
"number": null,
"policy": null,
"approval_id": null,
"reason": null
}
}
}
GET /v1/entities/{entity}/assets
List the fixed asset register
Every asset of the entity by code, with cost, accumulated depreciation and net book value.
Accumulated depreciation is what the ledger holds for the asset up to and including
as_of (posted and pending-approval entries), so a depreciation run that has not
happened yet is not counted. Amounts are in the entity's functional currency. Disposed
assets are listed too, with their status; from the disposal date on they show cost,
accumulated depreciation and net book value 0, as in the ledger, so the columns add up
to the balance sheet.
| Required scope | read (admin implies every scope) |
| Operation id | asset_register_v1_entities__entity__assets_get |
Parameters
| In | Name | Type | Required | Description |
|---|---|---|---|---|
| path | entity |
string | yes | Entity code, e.g. CH01 (GET /v1/entities). |
| query | as_of |
string (date) | yes | Report date, ISO 8601 (YYYY-MM-DD), e.g. 2026-09-30. |
Example request
curl "$ERP_URL/v1/entities/CH01/assets?as_of=2026-09-30" \
-H "Authorization: Bearer $ERP_KEY"
Responses
| Status | Meaning | Body |
|---|---|---|
| 200 | OK | array of AssetRegisterLine |
| 401 | Missing or invalid API key (unauthorized). |
ErrorEnvelope |
| 403 | The caller lacks the required scope (missing_right, with scope), the key belongs to no person where a person is needed (forbidden), or the approval policy denies the action (policy_denied, with action and rule_id). |
ErrorEnvelope |
| 404 | The resource does not exist, or belongs to another organization (not_found). |
ErrorEnvelope |
| 422 | Validation failed: the error envelope (validation_failed). For a malformed body or parameter its message is in sentences ("Line 2: the quantity must be above zero") and fields lists each error with pydantic's loc, type and msg beside its sentence (message) and its parts, to word it in another language: items (name and number from 1: line 2), field (its name as sent) and the rule it breaks with its limit, count and choices (none for a validator's own sentence); FastAPI's own detail list stays beside the envelope. |
HTTPValidationError |
Example response (shape)
[
{
"id": "string",
"code": "string",
"name": "string",
"status": "string",
"in_service_date": "2026-09-21",
"cost": "string",
"accumulated": "string",
"net_book_value": "string",
"salvage": "string",
"tax_asset_class": "string",
"source_bill": "string"
}
]
GET /v1/entities/{entity}/book-tax-differences
Get book-tax differences
Carrying amount vs tax base per asset and tax book at a period end, with the deferred tax (IAS 12) for the book that carries it.
Covers assets in service by the period end that are in a tax book. A positive temporary
difference is taxable (a liability), a negative one deductible (an asset). totals per
book show, for the book that carries deferred tax, the liability and asset now, what is
posted so far and the movement the next deferred-tax run would post. Amounts are in
the entity's functional currency. Refused with 404 when the period does not exist.
| Required scope | read (admin implies every scope) |
| Operation id | book_tax_differences_v1_entities__entity__book_tax_differences_get |
Parameters
| In | Name | Type | Required | Description |
|---|---|---|---|---|
| path | entity |
string | yes | Entity code, e.g. CH01 (GET /v1/entities). |
| query | fiscal_year |
integer | yes | Fiscal year of the period. |
| query | period |
integer | yes | Period number within the fiscal year (1-based, adjustment periods follow the regular ones). |
Example request
curl "$ERP_URL/v1/entities/CH01/book-tax-differences?fiscal_year=2026&period=9" \
-H "Authorization: Bearer $ERP_KEY"
Responses
| Status | Meaning | Body |
|---|---|---|
| 200 | OK | DifferenceReport |
| 401 | Missing or invalid API key (unauthorized). |
ErrorEnvelope |
| 403 | The caller lacks the required scope (missing_right, with scope), the key belongs to no person where a person is needed (forbidden), or the approval policy denies the action (policy_denied, with action and rule_id). |
ErrorEnvelope |
| 404 | The resource does not exist, or belongs to another organization (not_found). |
ErrorEnvelope |
| 422 | Validation failed: the error envelope (validation_failed). For a malformed body or parameter its message is in sentences ("Line 2: the quantity must be above zero") and fields lists each error with pydantic's loc, type and msg beside its sentence (message) and its parts, to word it in another language: items (name and number from 1: line 2), field (its name as sent) and the rule it breaks with its limit, count and choices (none for a validator's own sentence); FastAPI's own detail list stays beside the envelope. |
HTTPValidationError |
Example response (shape)
{
"entity": "string",
"currency": "string",
"period": {
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"fiscal_year": 1,
"number": 1,
"kind": "string",
"start": "2026-09-21",
"end": "2026-09-21",
"status": "string"
},
"lines": [
{
"asset": "string",
"name": "string",
"book": "string",
"carrying_amount": "string",
"tax_base": "string",
"temporary_difference": "string",
"deferred_tax": "string"
}
],
"totals": [
{
"book": "string",
"tax_rate_percent": "string",
"temporary_difference": "string",
"deferred_tax": "string",
"deferred_tax_liability": "string",
"deferred_tax_asset": "string",
"posted_liability": "string",
"posted_asset": "string",
"movement": "string",
"surplus_movement": "string"
}
]
}
GET /v1/entities/{entity}/depreciation-books
List depreciation books
The accounting book (BOOK) and the entity's tax books.
| Required scope | read (admin implies every scope) |
| Operation id | list_depreciation_books_v1_entities__entity__depreciation_books_get |
Parameters
| In | Name | Type | Required | Description |
|---|---|---|---|---|
| path | entity |
string | yes | Entity code, e.g. CH01 (GET /v1/entities). |
Example request
curl "$ERP_URL/v1/entities/CH01/depreciation-books" \
-H "Authorization: Bearer $ERP_KEY"
Responses
| Status | Meaning | Body |
|---|---|---|
| 200 | OK | array of BookOut |
| 401 | Missing or invalid API key (unauthorized). |
ErrorEnvelope |
| 403 | The caller lacks the required scope (missing_right, with scope), the key belongs to no person where a person is needed (forbidden), or the approval policy denies the action (policy_denied, with action and rule_id). |
ErrorEnvelope |
| 404 | The resource does not exist, or belongs to another organization (not_found). |
ErrorEnvelope |
| 422 | Validation failed: the error envelope (validation_failed). For a malformed body or parameter its message is in sentences ("Line 2: the quantity must be above zero") and fields lists each error with pydantic's loc, type and msg beside its sentence (message) and its parts, to word it in another language: items (name and number from 1: line 2), field (its name as sent) and the rule it breaks with its limit, count and choices (none for a validator's own sentence); FastAPI's own detail list stays beside the envelope. |
HTTPValidationError |
Example response (shape)
[
{
"code": "string",
"name": "string",
"kind": "string",
"standard": "string",
"posts_to_gl": true,
"deferred_tax": true,
"tax_rate_percent": "string",
"deferred_tax_cadence": "string",
"dtl_account": "string",
"dta_account": "string",
"dt_expense_account": "string"
}
]
POST /v1/entities/{entity}/depreciation-books
Create a tax depreciation book
Add a tax book (e.g. TAX-CH for CH ESTV rates), optionally carrying deferred tax.
A tax book holds a tax schedule per asset and posts nothing itself. At most one book per
entity can carry deferred tax (IAS 12); it then needs tax_rate_percent and the
deferred tax liability, asset and expense accounts (named or found by role). Refused:
403 without the right to manage accounts; 409 when the code exists or another book
already carries deferred tax; 422 for the reserved codes BOOK and MEMO, deferred tax
without a rate, or a deferred-tax account that is missing.
| Required scope | admin (admin implies every scope) |
| Idempotency-Key | required |
| Operation id | create_depreciation_book_v1_entities__entity__depreciation_books_post |
Parameters
| In | Name | Type | Required | Description |
|---|---|---|---|---|
| path | entity |
string | yes | Entity code, e.g. CH01 (GET /v1/entities). |
Request body
application/json (required): BookInput
| Field | Type | Required | Description |
|---|---|---|---|
code |
string or null | e.g. TAX-CH; left out, it is made from the name (TAX-BOOK-SWITZERLAND). (pattern ^[A-Z0-9_-]{2,20}$) |
|
name |
string | yes | Book name, e.g. Tax book Switzerland (ESTV). (min length 1) |
regime |
string or null | data-vNext depreciation regime, e.g. ch.estv, de.afa, us.macrs.gds | |
deferred_tax |
boolean | Post deferred tax from this book. (default false) |
|
tax_rate_percent |
decimal string or null | Tax rate in percent (above 0, below 100), e.g. 12.0. Required when deferred_tax is true. (greater than 0) |
|
deferred_tax_cadence |
"period" | "year_end" |
Whether the close needs a deferred-tax run every period or only at year end. (default "year_end") |
|
dtl_account |
string or null | Deferred tax liability account (default: role). | |
dta_account |
string or null | Deferred tax asset account (default: role). | |
dt_expense_account |
string or null | Deferred tax expense/income account (default: role). |
Example request
curl -X POST "$ERP_URL/v1/entities/CH01/depreciation-books" \
-H "Authorization: Bearer $ERP_KEY" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{
"code": "TAX-CH",
"deferred_tax": true,
"name": "Tax book Switzerland (ESTV)",
"regime": "ch.estv",
"tax_rate_percent": "12.0"
}'
Responses
| Status | Meaning | Body |
|---|---|---|
| 201 | Created | BookOut |
| 401 | Missing or invalid API key (unauthorized). |
ErrorEnvelope |
| 403 | The caller lacks the required scope (missing_right, with scope), the key belongs to no person where a person is needed (forbidden), or the approval policy denies the action (policy_denied, with action and rule_id). |
ErrorEnvelope |
| 404 | The resource does not exist, or belongs to another organization (not_found). |
ErrorEnvelope |
| 409 | The request conflicts with the data: an Idempotency-Key reused with a different request, a closed period, or an integrity rule of the database (conflict, integrity_violation). |
ErrorEnvelope |
| 422 | Validation failed: the error envelope (validation_failed). For a malformed body or parameter its message is in sentences ("Line 2: the quantity must be above zero") and fields lists each error with pydantic's loc, type and msg beside its sentence (message) and its parts, to word it in another language: items (name and number from 1: line 2), field (its name as sent) and the rule it breaks with its limit, count and choices (none for a validator's own sentence); FastAPI's own detail list stays beside the envelope. |
HTTPValidationError |
Example response (shape)
{
"code": "string",
"name": "string",
"kind": "string",
"standard": "string",
"posts_to_gl": true,
"deferred_tax": true,
"tax_rate_percent": "string",
"deferred_tax_cadence": "string",
"dtl_account": "string",
"dta_account": "string",
"dt_expense_account": "string"
}
PATCH /v1/entities/{entity}/depreciation-books/{code}
Update a tax depreciation book
Rename a tax book or change its tax rate; the next deferred-tax run remeasures.
Only the fields sent are changed. Refused: 403 without the right to manage accounts;
404 when the book does not exist in the entity (the accounting book BOOK cannot be
changed).
| Required scope | admin (admin implies every scope) |
| Idempotency-Key | not used |
| Operation id | update_depreciation_book_v1_entities__entity__depreciation_books__code__patch |
Parameters
| In | Name | Type | Required | Description |
|---|---|---|---|---|
| path | entity |
string | yes | Entity code, e.g. CH01 (GET /v1/entities). |
| path | code |
string | yes | Code of the tax book, e.g. TAX-CH. |
Request body
application/json (required): BookUpdate
| Field | Type | Required | Description |
|---|---|---|---|
name |
string or null | New book name. Omitted: unchanged. (min length 1) | |
tax_rate_percent |
decimal string or null | New tax rate in percent (above 0, below 100); the next deferred-tax run remeasures. Omitted: unchanged. (greater than 0) | |
deferred_tax_cadence |
"period" | "year_end" or null |
period or year_end: how often the close needs a deferred-tax run. Omitted: unchanged. |
Example request
curl -X PATCH "$ERP_URL/v1/entities/CH01/depreciation-books/TAX-CH" \
-H "Authorization: Bearer $ERP_KEY" \
-H "Content-Type: application/json" \
-d '{
"tax_rate_percent": "11.9"
}'
Responses
| Status | Meaning | Body |
|---|---|---|
| 200 | OK | BookOut |
| 401 | Missing or invalid API key (unauthorized). |
ErrorEnvelope |
| 403 | The caller lacks the required scope (missing_right, with scope), the key belongs to no person where a person is needed (forbidden), or the approval policy denies the action (policy_denied, with action and rule_id). |
ErrorEnvelope |
| 404 | The resource does not exist, or belongs to another organization (not_found). |
ErrorEnvelope |
| 409 | The request conflicts with the data: an Idempotency-Key reused with a different request, a closed period, or an integrity rule of the database (conflict, integrity_violation). |
ErrorEnvelope |
| 422 | Validation failed: the error envelope (validation_failed). For a malformed body or parameter its message is in sentences ("Line 2: the quantity must be above zero") and fields lists each error with pydantic's loc, type and msg beside its sentence (message) and its parts, to word it in another language: items (name and number from 1: line 2), field (its name as sent) and the rule it breaks with its limit, count and choices (none for a validator's own sentence); FastAPI's own detail list stays beside the envelope. |
HTTPValidationError |
Example response (shape)
{
"code": "string",
"name": "string",
"kind": "string",
"standard": "string",
"posts_to_gl": true,
"deferred_tax": true,
"tax_rate_percent": "string",
"deferred_tax_cadence": "string",
"dtl_account": "string",
"dta_account": "string",
"dt_expense_account": "string"
}
GET /v1/entities/{entity}/leases
List leases
Every lease of the company by code, with its position at as_of: the liability (in the
lease currency) and the part of it due within 12 months, the right-of-use asset's carrying
amount (functional currency) and the lease months ended by then that no period's lease
entries booked yet. A draft or exempt lease shows no position.
| Required scope | read (admin implies every scope) |
| Operation id | list_leases_v1_entities__entity__leases_get |
Parameters
| In | Name | Type | Required | Description |
|---|---|---|---|---|
| path | entity |
string | yes | Entity code, e.g. CH01 (GET /v1/entities). |
| query | as_of |
string (date) or null | The date of the position figures, ISO 8601. Default: today where the company is. |
Example request
curl "$ERP_URL/v1/entities/CH01/leases" \
-H "Authorization: Bearer $ERP_KEY"
Responses
| Status | Meaning | Body |
|---|---|---|
| 200 | OK | array of LeaseLine |
| 401 | Missing or invalid API key (unauthorized). |
ErrorEnvelope |
| 403 | The caller lacks the required scope (missing_right, with scope), the key belongs to no person where a person is needed (forbidden), or the approval policy denies the action (policy_denied, with action and rule_id). |
ErrorEnvelope |
| 404 | The resource does not exist, or belongs to another organization (not_found). |
ErrorEnvelope |
| 422 | Validation failed: the error envelope (validation_failed). For a malformed body or parameter its message is in sentences ("Line 2: the quantity must be above zero") and fields lists each error with pydantic's loc, type and msg beside its sentence (message) and its parts, to word it in another language: items (name and number from 1: line 2), field (its name as sent) and the rule it breaks with its limit, count and choices (none for a validator's own sentence); FastAPI's own detail list stays beside the envelope. |
HTTPValidationError |
Example response (shape)
[
{
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"code": "string",
"name": "string",
"lessor": "string",
"currency": "string",
"commencement_date": "2026-09-21",
"end_date": "2026-09-21",
"payment": "string",
"frequency": "monthly",
"classification": "finance",
"status": "active",
"exemption": "low_value",
"liability": "string",
"current_liability": "string",
"rou_carrying": "string",
"unposted_months": 1
}
]
POST /v1/leases
Enter a lease
Enter a lease the company holds as a lessee: a draft until it is activated, or, with an
exemption (short-term, low value), a lease that is only listed and whose bills are expensed.
Accounts not named are the company's accounts with the lease roles (the IFRS and US charts
have them; a local chart such as the Swiss KMU names them). A US GAAP company classifies the
lease (classification, default operating: one straight-line lease cost a period on the
lease_cost account); under IFRS every lease is a finance lease. The answer has the schedule:
the liability at commencement (the present value of the payments at the effective annual
rate_percent), interest and payments month by month, and the asset's straight-line
depreciation (an operating lease: the lease cost and the asset's reduction). Refused: 409
lease_exists when the code exists in the company; 422 lease_local_framework (a company
under local rules expenses its leases), lease_operating_ifrs (an operating lease outside
US GAAP), lease_term_frequency (a term that is no multiple of the payment interval),
lease_not_short_term, lease_account_type, lease_accounts_differ,
lease_account_currency and role_account_missing (no account named and none with the role).
| Required scope | draft (admin implies every scope) |
| Idempotency-Key | required |
| Operation id | create_lease_v1_leases_post |
Request body
application/json (required): LeaseInput
| Field | Type | Required | Description |
|---|---|---|---|
entity |
string | yes | Entity code (or id) that holds the lease, e.g. DE01. |
code |
string or null | Left out: the company's next lease number (L-00001, counted without gaps). Give one (up to 40 characters, e.g. the contract number) only to keep it; unique in the entity. (min length 1; max length 40) |
|
name |
string | yes | What is leased, e.g. Office Basel. (min length 1; max length 200) |
lessor |
string or null | The lessor, a vendor of the entity (code or id); optional. | |
currency |
string or null | Currency of the payments, e.g. EUR. Default: the entity's functional currency. A foreign-currency liability is revalued at each period end. (pattern ^[A-Z]{3}$) |
|
commencement_date |
string (date) | yes | The day the lessor makes the asset available, ISO 8601; the lease months count from it. |
term_months |
integer | yes | The lease term in months (a multiple of the payment interval). (min 1; max 600) |
payment |
decimal string | yes | Each payment, e.g. "450.00". (greater than 0) |
frequency |
"monthly" | "quarterly" | "yearly" |
monthly, quarterly or yearly. Default monthly. (default "monthly") |
|
timing |
"advance" | "arrears" |
advance (paid on the first day of its months) or arrears (on the last). Default advance. (default "advance") |
|
rate_percent |
decimal string | yes | The effective annual discount rate in percent, e.g. "4.5": the rate implicit in the lease if known, else the incremental borrowing rate. A month is discounted at its twelfth root, (1 + rate) ^ (1/12) - 1. (min 0) |
classification |
"finance" | "operating" or null |
finance or operating (ASC 842-10-25-2). Only a US GAAP company has operating leases: one straight-line lease cost a period instead of interest and depreciation. Default: operating for a US GAAP company, finance otherwise (IFRS 16 has one model). |
|
initial_direct_costs |
decimal string | Initial direct costs, added to the right-of-use asset, in the lease currency. (min 0; default "0") |
|
prepaid |
decimal string | Lease payments made before the commencement date, added to the right-of-use asset, in the lease currency. (min 0; default "0") |
|
exemption |
"low_value" | "short_term" or null |
short_term (12 months or less) or low_value (IFRS 16.5): the lease is only listed and its bills are expensed. Default null: recognised. |
|
rou_account |
string or null | Right-of-use asset account. Default: the company's account with the role lease_right_of_use (of an operating lease: operating_lease_right_of_use). |
|
accumulated_account |
string or null | Its accumulated depreciation account. Default: the company's account with the role lease_accumulated_depreciation (of an operating lease: operating_lease_accumulated_amortization). |
|
liability_account |
string or null | Lease liability account. Default: the company's account with the role lease_liability (of an operating lease: operating_lease_liability). |
|
interest_account |
string or null | Interest expense account. Default: the company's account with the role lease_interest. |
|
depreciation_account |
string or null | Depreciation expense account (a finance lease). Default: the company's account with the role depreciation_expense. |
|
lease_cost_account |
string or null | Lease cost account of an operating lease (instead of the interest and depreciation accounts). Default: the company's account with the role lease_cost. |
Example request
curl -X POST "$ERP_URL/v1/leases" \
-H "Authorization: Bearer $ERP_KEY" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{
"code": "L-CAR-01",
"commencement_date": "2026-08-01",
"entity": "DE01",
"frequency": "monthly",
"name": "Company car",
"payment": "450.00",
"rate_percent": "5",
"term_months": 36,
"timing": "advance"
}'
Responses
| Status | Meaning | Body |
|---|---|---|
| 201 | Created | LeaseOut |
| 401 | Missing or invalid API key (unauthorized). |
ErrorEnvelope |
| 403 | The caller lacks the required scope (missing_right, with scope), the key belongs to no person where a person is needed (forbidden), or the approval policy denies the action (policy_denied, with action and rule_id). |
ErrorEnvelope |
| 409 | The request conflicts with the data: an Idempotency-Key reused with a different request, a closed period, or an integrity rule of the database (conflict, integrity_violation). |
ErrorEnvelope |
| 422 | Validation failed: the error envelope (validation_failed). For a malformed body or parameter its message is in sentences ("Line 2: the quantity must be above zero") and fields lists each error with pydantic's loc, type and msg beside its sentence (message) and its parts, to word it in another language: items (name and number from 1: line 2), field (its name as sent) and the rule it breaks with its limit, count and choices (none for a validator's own sentence); FastAPI's own detail list stays beside the envelope. |
HTTPValidationError |
Example response (shape)
{
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"code": "string",
"name": "string",
"lessor": "string",
"currency": "string",
"commencement_date": "2026-09-21",
"end_date": "2026-09-21",
"payment": "string",
"frequency": "monthly",
"classification": "finance",
"status": "active",
"exemption": "low_value",
"liability": "string",
"current_liability": "string",
"rou_carrying": "string",
"unposted_months": 1,
"entity": "string",
"functional_currency": "string",
"local_gaap": true,
"lessor_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"lessor_code": "string",
"term_months": 1,
"original_payment": "string",
"timing": "advance",
"rate_percent": "string",
"initial_direct_costs": "string",
"prepaid": "string",
"rou_account": "string",
"accumulated_account": "string",
"liability_account": "string",
"interest_account": "string",
"depreciation_account": "string",
"lease_cost_account": "string",
"initial_liability": "string",
"rou_cost": "string",
"as_of": "2026-09-21",
"noncurrent_liability": "string",
"posted_through": 1,
"activation": {
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"number": "string",
"status": "string"
},
"termination_date": "2026-09-21",
"termination": {
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"number": "string",
"status": "string"
},
"changes": [
{
"effective_date": "2026-09-21",
"from_month": 1,
"payment": "string",
"liability_change": "string",
"rou_change": "string",
"reason": "string",
"entry": {
"id": null,
"number": null,
"status": null
}
}
],
"rows": [
{
"month": 1,
"start": "2026-09-21",
"end": "2026-09-21",
"opening": "string",
"remeasurement": "string",
"payment": "string",
"interest": "string",
"closing": "string",
"depreciation": "string",
"lease_cost": "string",
"rou_carrying": "string",
"posted": true
}
]
}
GET /v1/leases/{lease}
Get a lease and its schedule
One lease with its terms, accounts, changes of payments, the entries that activated and
ended it, its schedule month by month (which months are booked) and its position at as_of,
with the liability split into current (principal due within 12 months) and non-current.
Refused with 404 for an unknown lease.
| Required scope | read (admin implies every scope) |
| Operation id | get_lease_v1_leases__lease__get |
Parameters
| In | Name | Type | Required | Description |
|---|---|---|---|---|
| path | lease |
string (uuid) | yes | Lease id (GET /v1/entities/{entity}/leases). |
| query | as_of |
string (date) or null | The date of the position figures, ISO 8601. Default: today where the company is. |
Example request
curl "$ERP_URL/v1/leases/3fa85f64-5717-4562-b3fc-2c963f66afa6" \
-H "Authorization: Bearer $ERP_KEY"
Responses
| Status | Meaning | Body |
|---|---|---|
| 200 | OK | LeaseOut |
| 401 | Missing or invalid API key (unauthorized). |
ErrorEnvelope |
| 403 | The caller lacks the required scope (missing_right, with scope), the key belongs to no person where a person is needed (forbidden), or the approval policy denies the action (policy_denied, with action and rule_id). |
ErrorEnvelope |
| 404 | The resource does not exist, or belongs to another organization (not_found). |
ErrorEnvelope |
| 422 | Validation failed: the error envelope (validation_failed). For a malformed body or parameter its message is in sentences ("Line 2: the quantity must be above zero") and fields lists each error with pydantic's loc, type and msg beside its sentence (message) and its parts, to word it in another language: items (name and number from 1: line 2), field (its name as sent) and the rule it breaks with its limit, count and choices (none for a validator's own sentence); FastAPI's own detail list stays beside the envelope. |
HTTPValidationError |
Example response (shape)
{
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"code": "string",
"name": "string",
"lessor": "string",
"currency": "string",
"commencement_date": "2026-09-21",
"end_date": "2026-09-21",
"payment": "string",
"frequency": "monthly",
"classification": "finance",
"status": "active",
"exemption": "low_value",
"liability": "string",
"current_liability": "string",
"rou_carrying": "string",
"unposted_months": 1,
"entity": "string",
"functional_currency": "string",
"local_gaap": true,
"lessor_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"lessor_code": "string",
"term_months": 1,
"original_payment": "string",
"timing": "advance",
"rate_percent": "string",
"initial_direct_costs": "string",
"prepaid": "string",
"rou_account": "string",
"accumulated_account": "string",
"liability_account": "string",
"interest_account": "string",
"depreciation_account": "string",
"lease_cost_account": "string",
"initial_liability": "string",
"rou_cost": "string",
"as_of": "2026-09-21",
"noncurrent_liability": "string",
"posted_through": 1,
"activation": {
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"number": "string",
"status": "string"
},
"termination_date": "2026-09-21",
"termination": {
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"number": "string",
"status": "string"
},
"changes": [
{
"effective_date": "2026-09-21",
"from_month": 1,
"payment": "string",
"liability_change": "string",
"rou_change": "string",
"reason": "string",
"entry": {
"id": null,
"number": null,
"status": null
}
}
],
"rows": [
{
"month": 1,
"start": "2026-09-21",
"end": "2026-09-21",
"opening": "string",
"remeasurement": "string",
"payment": "string",
"interest": "string",
"closing": "string",
"depreciation": "string",
"lease_cost": "string",
"rou_carrying": "string",
"posted": true
}
]
}
POST /v1/leases/{lease}/activate
Activate a lease
Book the commencement entry of a draft lease, dated at the commencement date, through the
approval policy: Dr right-of-use asset (functional currency, at that day's rate) / Cr lease
liability (lease currency), and the initial direct costs and payments made before
commencement from credit_account into the asset. The lease is pending while the entry
waits for approval and active once it is posted; a rejection makes it a draft again.
Refused: 404 for an unknown lease; 409 lease_not_draft, period_closed; 422
lease_credit_account_missing, fx_rate_missing.
| Required scope | draft (admin implies every scope) |
| Idempotency-Key | required |
| Operation id | activate_lease_v1_leases__lease__activate_post |
Parameters
| In | Name | Type | Required | Description |
|---|---|---|---|---|
| path | lease |
string (uuid) | yes | Lease id (GET /v1/entities/{entity}/leases). |
Request body
application/json (required): ActivateInput
| Field | Type | Required | Description |
|---|---|---|---|
credit_account |
string or null | The account the initial direct costs and prepaid payments are taken from (where they were booked, e.g. prepayments); needed only when there are any. |
Example request
curl -X POST "$ERP_URL/v1/leases/3fa85f64-5717-4562-b3fc-2c963f66afa6/activate" \
-H "Authorization: Bearer $ERP_KEY" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{
"credit_account": "1500"
}'
Responses
| Status | Meaning | Body |
|---|---|---|
| 200 | OK | SubmitResult |
| 401 | Missing or invalid API key (unauthorized). |
ErrorEnvelope |
| 403 | The caller lacks the required scope (missing_right, with scope), the key belongs to no person where a person is needed (forbidden), or the approval policy denies the action (policy_denied, with action and rule_id). |
ErrorEnvelope |
| 404 | The resource does not exist, or belongs to another organization (not_found). |
ErrorEnvelope |
| 409 | The request conflicts with the data: an Idempotency-Key reused with a different request, a closed period, or an integrity rule of the database (conflict, integrity_violation). |
ErrorEnvelope |
| 422 | Validation failed: the error envelope (validation_failed). For a malformed body or parameter its message is in sentences ("Line 2: the quantity must be above zero") and fields lists each error with pydantic's loc, type and msg beside its sentence (message) and its parts, to word it in another language: items (name and number from 1: line 2), field (its name as sent) and the rule it breaks with its limit, count and choices (none for a validator's own sentence); FastAPI's own detail list stays beside the envelope. |
HTTPValidationError |
Example response (shape)
{
"entry_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"status": "string",
"number": "string",
"policy": {
"decision": "allow",
"reason": "string",
"rule_id": "string",
"table_id": "string"
},
"approval_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"reason": "string"
}
POST /v1/leases/{lease}/changes
Change a lease's payments
Remeasure an active lease for new payments from the first day of a lease month on (an
index increase): the liability becomes the present value of the remaining payments at the
original rate, and the right-of-use asset changes by the same amount, in one entry dated that
day through the approval policy. Refused: 409 lease_not_active, lease_change_booked (that
month is booked already), lease_change_later (a change from that month or later exists);
422 lease_change_date (not the first day of a lease month), lease_change_nothing,
lease_change_too_large (a decrease beyond what is left of the asset).
| Required scope | draft (admin implies every scope) |
| Idempotency-Key | required |
| Operation id | change_lease_v1_leases__lease__changes_post |
Parameters
| In | Name | Type | Required | Description |
|---|---|---|---|---|
| path | lease |
string (uuid) | yes | Lease id (GET /v1/entities/{entity}/leases). |
Request body
application/json (required): ChangeInput
| Field | Type | Required | Description |
|---|---|---|---|
effective_date |
string (date) | yes | The first day of the lease month the new payments apply from, ISO 8601. |
payment |
decimal string | yes | The new payment, in the lease currency. (greater than 0) |
reason |
string | yes | Why the payments change, e.g. an index. (min length 1; max length 500) |
Example request
curl -X POST "$ERP_URL/v1/leases/3fa85f64-5717-4562-b3fc-2c963f66afa6/changes" \
-H "Authorization: Bearer $ERP_KEY" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{
"effective_date": "2027-08-01",
"payment": "3600.00",
"reason": "Index increase (CPI)"
}'
Responses
| Status | Meaning | Body |
|---|---|---|
| 200 | OK | SubmitResult |
| 401 | Missing or invalid API key (unauthorized). |
ErrorEnvelope |
| 403 | The caller lacks the required scope (missing_right, with scope), the key belongs to no person where a person is needed (forbidden), or the approval policy denies the action (policy_denied, with action and rule_id). |
ErrorEnvelope |
| 404 | The resource does not exist, or belongs to another organization (not_found). |
ErrorEnvelope |
| 409 | The request conflicts with the data: an Idempotency-Key reused with a different request, a closed period, or an integrity rule of the database (conflict, integrity_violation). |
ErrorEnvelope |
| 422 | Validation failed: the error envelope (validation_failed). For a malformed body or parameter its message is in sentences ("Line 2: the quantity must be above zero") and fields lists each error with pydantic's loc, type and msg beside its sentence (message) and its parts, to word it in another language: items (name and number from 1: line 2), field (its name as sent) and the rule it breaks with its limit, count and choices (none for a validator's own sentence); FastAPI's own detail list stays beside the envelope. |
HTTPValidationError |
Example response (shape)
{
"entry_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"status": "string",
"number": "string",
"policy": {
"decision": "allow",
"reason": "string",
"rule_id": "string",
"table_id": "string"
},
"approval_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"reason": "string"
}
POST /v1/leases/{lease}/terminate
End a lease
End an active lease on the last day of a lease month: derecognise the liability left and
the right-of-use asset (cost and accumulated depreciation), the difference a gain or a loss
(result_account, else the company's gain or loss on disposal of assets), through the
approval policy. The lease is terminated once the entry is posted. Refused: 409
lease_not_active, lease_change_pending (a change of payments waits for approval: decide
it first), lease_end_unbooked (post the lease entries up to the day first),
lease_end_booked_after; 422 lease_end_date (not the last day of a lease month).
| Required scope | draft (admin implies every scope) |
| Idempotency-Key | required |
| Operation id | terminate_lease_v1_leases__lease__terminate_post |
Parameters
| In | Name | Type | Required | Description |
|---|---|---|---|---|
| path | lease |
string (uuid) | yes | Lease id (GET /v1/entities/{entity}/leases). |
Request body
application/json (required): TerminateInput
| Field | Type | Required | Description |
|---|---|---|---|
termination_date |
string (date) | yes | The last day of the lease, ISO 8601: the last day of a lease month whose entries are posted. |
result_account |
string or null | The account of the gain or loss. Default: the company's account for a gain or for a loss on disposal of assets. |
Example request
curl -X POST "$ERP_URL/v1/leases/3fa85f64-5717-4562-b3fc-2c963f66afa6/terminate" \
-H "Authorization: Bearer $ERP_KEY" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{
"termination_date": "2027-07-31"
}'
Responses
| Status | Meaning | Body |
|---|---|---|
| 200 | OK | SubmitResult |
| 401 | Missing or invalid API key (unauthorized). |
ErrorEnvelope |
| 403 | The caller lacks the required scope (missing_right, with scope), the key belongs to no person where a person is needed (forbidden), or the approval policy denies the action (policy_denied, with action and rule_id). |
ErrorEnvelope |
| 404 | The resource does not exist, or belongs to another organization (not_found). |
ErrorEnvelope |
| 409 | The request conflicts with the data: an Idempotency-Key reused with a different request, a closed period, or an integrity rule of the database (conflict, integrity_violation). |
ErrorEnvelope |
| 422 | Validation failed: the error envelope (validation_failed). For a malformed body or parameter its message is in sentences ("Line 2: the quantity must be above zero") and fields lists each error with pydantic's loc, type and msg beside its sentence (message) and its parts, to word it in another language: items (name and number from 1: line 2), field (its name as sent) and the rule it breaks with its limit, count and choices (none for a validator's own sentence); FastAPI's own detail list stays beside the envelope. |
HTTPValidationError |
Example response (shape)
{
"entry_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"status": "string",
"number": "string",
"policy": {
"decision": "allow",
"reason": "string",
"rule_id": "string",
"table_id": "string"
},
"approval_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"reason": "string"
}
POST /v1/periods/{period_id}/leases
Post lease entries for a period
Book the interest and the right-of-use asset's depreciation of every active lease for the
lease months that ended by the period's end and are not booked yet, in one entry dated at the
period's end through the approval policy: Dr interest / Cr lease liability (lease currency) and
Dr depreciation / Cr accumulated depreciation (functional currency); an operating lease books
both to its lease cost account. In the period a lease commences, the part of its first month
that ran by the period's end is booked (stub). A lease whose change of payments waits for
approval is skipped (skipped). Each lease is booked once per period; running it again books
only leases activated since. Refused: 404 for an unknown period; 409 lease_nothing_due,
lease_change_pending (nothing else due, and a change of payments waits for approval),
period_not_started, period_closed; 422 lease_regular_period_only.
| Required scope | draft (admin implies every scope) |
| Idempotency-Key | not used |
| Operation id | run_leases_v1_periods__period_id__leases_post |
Parameters
| In | Name | Type | Required | Description |
|---|---|---|---|---|
| path | period_id |
string (uuid) | yes | Fiscal period id (GET /v1/entities/{entity}/periods). |
Example request
curl -X POST "$ERP_URL/v1/periods/3fa85f64-5717-4562-b3fc-2c963f66afa6/leases" \
-H "Authorization: Bearer $ERP_KEY"
Responses
| Status | Meaning | Body |
|---|---|---|
| 200 | OK | LeaseRunSummary |
| 401 | Missing or invalid API key (unauthorized). |
ErrorEnvelope |
| 403 | The caller lacks the required scope (missing_right, with scope), the key belongs to no person where a person is needed (forbidden), or the approval policy denies the action (policy_denied, with action and rule_id). |
ErrorEnvelope |
| 404 | The resource does not exist, or belongs to another organization (not_found). |
ErrorEnvelope |
| 409 | The request conflicts with the data: an Idempotency-Key reused with a different request, a closed period, or an integrity rule of the database (conflict, integrity_violation). |
ErrorEnvelope |
| 422 | Validation failed: the error envelope (validation_failed). For a malformed body or parameter its message is in sentences ("Line 2: the quantity must be above zero") and fields lists each error with pydantic's loc, type and msg beside its sentence (message) and its parts, to word it in another language: items (name and number from 1: line 2), field (its name as sent) and the rule it breaks with its limit, count and choices (none for a validator's own sentence); FastAPI's own detail list stays beside the envelope. |
HTTPValidationError |
Example response (shape)
{
"period": "string",
"items": [
{
"lease": "string",
"months": "string",
"currency": "string",
"interest": "string",
"depreciation": "string",
"classification": "finance",
"stub": true
}
],
"skipped": [
"string"
],
"submit": {
"entry_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"status": "string",
"number": "string",
"policy": {
"decision": "allow",
"reason": "string",
"rule_id": "string",
"table_id": "string"
},
"approval_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"reason": "string"
}
}
Schemas
ActivateInput
| Field | Type | Required | Description |
|---|---|---|---|
credit_account |
string or null | The account the initial direct costs and prepaid payments are taken from (where they were booked, e.g. prepayments); needed only when there are any. |
AssetBookInput
| Field | Type | Required | Description |
|---|---|---|---|
book |
string | yes | Tax book code of the entity, e.g. 'TAX-CH'. |
asset_class |
string or null | data-vNext asset class, e.g. 'ch.estv.it_hardware_software' or 'us.macrs.gds.5y'; fills method, life, rate and convention. | |
method |
"declining_balance" | "straight_line" | "sum_of_years_digits" or null |
Depreciation method: straight_line, declining_balance or sum_of_years_digits. Required when no asset_class is given; a class fills it. |
|
useful_life_years |
decimal string or null | Useful life in years, a positive decimal string, e.g. "5". (greater than 0) | |
rate_percent |
decimal string or null | Yearly rate in percent (above 0, up to 100), for declining balance. Omitted: from the asset class or the engine's default. (max 100; greater than 0) | |
convention |
"full_year" | "half_year" | "mid_month" | "pro_rata_months" or null |
How the first and last year are prorated: full_year, half_year, mid_month or pro_rata_months (months in service). Omitted: from the asset class or the engine's default. |
|
periods |
integer or null | Years to show. Omitted, a declining balance without a life ends with the asset's accounting schedule, what is left written off in its last year (a pooling regime such as UK capital allowances shows 30 years). (max 100; greater than 0) |
AssetBookOut
| Field | Type | Required | Description |
|---|---|---|---|
book |
string | yes | Book code (BOOK, MEMO or a tax book code). |
name |
string | yes | Book name. |
kind |
string | yes | book or tax. |
standard |
string or null | yes | The framework or tax regime of the book (or the memo's asset class). |
posts_to_gl |
boolean | yes | true only for the accounting book. |
deferred_tax |
boolean | yes | true when this book carries deferred tax. |
asset_class |
string or null | yes | data-vNext asset class used for this book, if any. |
asset_class_name |
string or null | Name of the asset class in force on as_of, in the regime's own language (not translated); null when the book has no class, the class is unknown to data-vNext or no longer in force, or data-vNext cannot be reached. |
|
method |
string | yes | Depreciation method of the book's schedule. |
dataset_version |
string or null | yes | Version of the data-vNext dataset that produced the schedule. |
as_of |
string (date) | yes | Date of the position, ISO 8601. |
accumulated |
string | yes | Accounting book: depreciation in the ledger. Tax book: scheduled to date. |
carrying_amount |
string | yes | Cost less accumulated (the tax base for a tax book). |
temporary_difference |
string or null | Tax books: accounting carrying amount less the tax base. | |
tax_rate_percent |
string or null | Rate used for deferred tax, for the book that carries it. | |
deferred_tax_amount |
string or null | temporary_difference times the tax rate, for that book. |
|
schedule |
array of ScheduleYear |
yes | The schedule by fiscal year. |
notes |
array of string | yes | What the schedule says about itself, in English: where its parameters came from, how it ends, and each change of the asset's value that rebased it. |
note_reasons |
array of Reason |
notes by code, in the same order (erp.contracts.words.SCHEDULE_NOTES): the screens word each as assets.scheduleNote.<code> from its details. |
AssetChangeOut
| Field | Type | Required | Description |
|---|---|---|---|
id |
string (uuid) | yes | Id (uuid) of the change. |
asset |
string | yes | The asset's code. |
kind |
"impairment" | "impairment_reversal" | "partial_retirement" | "revaluation" |
yes | partial_retirement, impairment, impairment_reversal or revaluation. |
date |
string (date) | yes | Day of the change, ISO 8601. |
reason |
string or null | yes | Why, as given. |
retired_percent |
string or null | yes | A partial retirement: the part of the cost retired, in percent. |
cost_before |
string | yes | The asset's cost before the change. |
cost_after |
string | yes | Its cost after the change. |
carrying_before |
string | yes | The carrying amount before the change, after the depreciation to the end of the change's period (the entry books that depreciation first). |
carrying_after |
string | yes | The carrying amount after the change. |
depreciation_to_period_end |
string | yes | The depreciation to the end of the change's period that the entry booked. |
proceeds |
string | yes | A partial retirement: the net proceeds. |
profit_or_loss |
string | yes | What the change booked to profit or loss: a gain positive (a part sold above its carrying amount, an impairment reversed, a revaluation reversing an earlier loss), a loss negative. |
surplus_change |
string | yes | What it booked to the revaluation surplus in equity: an increase positive. |
submit |
SubmitResult |
yes | The change's journal entry: posted, or waiting for approval (the policy's decision); a rejection puts the asset back as it was. |
AssetEvent
| Field | Type | Required | Description |
|---|---|---|---|
date |
string (date) | yes | When it happened (the entry date), ISO 8601. |
kind |
"acquisition" | "adjustment" | "depreciation" | "disposal" | "impairment" | "impairment_reversal" | "partial_retirement" | "revaluation" | "reversal" | "tax_depreciation" |
yes | acquisition (its cost put on the books), depreciation (a period's run or a top-up), partial_retirement (a part sold or scrapped), impairment, impairment_reversal, revaluation, disposal, reversal (an entry that reverses one of these), adjustment (any other entry booked to the asset) or tax_depreciation (a tax book's depreciation of an ended fiscal year: tax books post nothing). |
book |
string | yes | BOOK (the accounting book) or the tax book's code. |
description |
string | yes | The entry's text, or the tax book's name and year. |
amount |
string | yes | What it changed the asset's value in that book by, in the entity's functional currency: positive for an acquisition, negative for depreciation and a disposal. |
book_value |
string or null | yes | The accounting book's value after it, counting posted entries only; null for an entry not posted (yet) and for a tax book. |
status |
string or null | yes | Status of the entry: posted, pending_approval, rejected or draft; null for a tax book's year. |
journal_entry_id |
string (uuid) or null | yes | The journal entry (GET /v1/journal-entries/{id}); null when nothing was posted for it (a tax book, or cost already on the books when it was registered). |
journal_entry_number |
string or null | yes | Its number, once posted. |
document_id |
string (uuid) or null | yes | The purchase bill an acquisition came from (GET /v1/documents/{id}). |
document_number |
string or null | yes | That bill's number. |
AssetHistory
| Field | Type | Required | Description |
|---|---|---|---|
asset |
string | yes | Asset id (uuid). |
currency |
string | yes | Functional currency of the amounts. |
events |
array of AssetEvent |
yes | Everything booked to the asset, oldest first: its acquisition, each depreciation, any other entry naming it, its disposal and reversals; and each tax book's depreciation of the fiscal years that have ended. |
changes |
array of AuditEventOut |
yes | The asset's audit trail, newest first, as GET /v1/audit-events gives it (registration, a tax book added). |
AssetInput
| Field | Type | Required | Description |
|---|---|---|---|
entity |
string | yes | Entity code (or id) that owns the asset, e.g. CH01. |
code |
string or null | Left out: the company's next asset number (FA-00001, counted without gaps). Give one (up to 40 characters, e.g. an asset tag) only to keep it; unique in the entity. (min length 1; max length 40) |
|
name |
string | yes | Asset name or description, e.g. Server rack. |
acquisition_date |
string (date) | yes | Date the asset was acquired, ISO 8601 (YYYY-MM-DD). |
in_service_date |
string (date) or null | Date depreciation starts, ISO 8601. Default: the acquisition date. | |
cost |
decimal string | yes | Acquisition cost as a positive decimal string in the entity's functional currency, e.g. "12000.00". (greater than 0) |
salvage |
decimal string | Residual value at the end of the life, a decimal string, e.g. "1000.00". Default "0". (min 0; default "0") |
|
method |
"declining_balance" | "straight_line" | "sum_of_years_digits" |
Depreciation method: straight_line, declining_balance or sum_of_years_digits. Default straight_line. (default "straight_line") |
|
useful_life_years |
decimal string | yes | Useful life in years as a positive decimal string, e.g. "5". (greater than 0) |
rate_percent |
decimal string or null | Declining balance only: the yearly rate in percent (above 0, up to 100). Omitted: the double-declining rate. (max 100; greater than 0) | |
convention |
"full_year" | "half_year" | "mid_month" | "pro_rata_months" |
How the first and last year are prorated: full_year, half_year, mid_month or pro_rata_months (months in service). Default pro_rata_months. (default "pro_rata_months") |
|
tax_asset_class |
string or null | data-vNext tax asset class, e.g. 'de.afa.computer_hardware'. | |
cost_account |
string or null | GL account code of the asset cost, e.g. 1500. Default: the entity's fixed-asset cost account. An asset class with accounts of its own (Swiss KMU chart: IT hardware 1520 and 1529) names both accounts; naming one without the other is refused. |
|
accumulated_account |
string or null | GL account code of the accumulated depreciation, e.g. 1509. Default: the entity's accumulated-depreciation account. Named together with cost_account or not at all. |
|
expense_account |
string or null | GL account code of the depreciation expense. Default: the entity's depreciation-expense account. | |
source_document |
string or null | Purchase bill (id or number) that capitalised the cost. | |
post_acquisition |
boolean | Post Dr asset cost / Cr credit_account (when not bought via a bill). (default false) |
|
credit_account |
string or null | GL account code credited by post_acquisition, e.g. 1020. Required when post_acquisition is true. |
|
books |
array of AssetBookInput |
Tax books to depreciate the asset in as well. |
AssetOut
| Field | Type | Required | Description |
|---|---|---|---|
id |
string | yes | Asset id (uuid). |
code |
string | yes | Asset code, e.g. FA-001. |
name |
string | yes | Asset name. |
entity |
string | yes | Code of the owning entity. |
status |
string | yes | active, disposed (set once the disposal entry is posted) or reversed (its acquisition reversed, set once the reversal is posted). |
acquisition_date |
string (date) | yes | Acquisition date, ISO 8601. |
in_service_date |
string (date) | yes | Date depreciation starts, ISO 8601. |
disposal_date |
string (date) or null | yes | Disposal date, ISO 8601; null while not disposed. |
cost |
string | yes | Cost, a decimal string in the entity's functional currency: the acquisition cost, less what partial retirements took out, or the revalued amount after a revaluation. |
salvage |
string | yes | Residual value, a decimal string in the functional currency. |
method |
string | yes | straight_line, declining_balance or sum_of_years_digits. |
useful_life_years |
string or null | yes | Useful life in years. |
rate_percent |
string or null | yes | Declining-balance rate in percent, when one was given. |
convention |
string | yes | full_year, half_year, mid_month or pro_rata_months. |
cost_account |
string | yes | GL account code of the cost. |
accumulated_account |
string | yes | GL account code of the accumulated depreciation. |
expense_account |
string | yes | GL account code of the depreciation expense. |
source_bill |
string or null | yes | Number of the purchase bill that capitalised the cost, if linked. |
source_bill_id |
string or null | yes | Id of that purchase bill (uuid), if linked. |
books |
array of string | yes | Codes of the books the asset is depreciated in, BOOK first. |
value_changes |
array of string | yes | The changes in value the asset can take now (partial_retirement, impairment, impairment_reversal, revaluation): the law of the company's books allows them (no reversal of an impairment under US GAAP or ASPE, whatever the chart; IFRS books allow it; no revaluation above cost under local laws that keep assets at cost), an impairment reversal only while something is left to reverse today (the cap the reversal checks, above zero). Empty once the asset is disposed of. |
AssetRegisterLine
| Field | Type | Required | Description |
|---|---|---|---|
id |
string | yes | Asset id (uuid); opens the asset where its code is not unique. |
code |
string | yes | Asset code. |
name |
string | yes | Asset name. |
status |
string | yes | active, disposed, or reversed (its acquisition reversed: off the register, shown with 0). |
in_service_date |
string (date) | yes | Date depreciation starts, ISO 8601. |
cost |
string | yes | Acquisition cost in the entity's functional currency; 0 once the asset is disposed of on or before the report date (the ledger has derecognised it). |
accumulated |
string | yes | Accumulated depreciation in the ledger up to the report date; 0 once the asset is disposed of. |
net_book_value |
string | yes | cost less accumulated; 0 for a disposed asset. |
salvage |
string | yes | Residual value: an active asset whose net book value is down to it is fully depreciated. |
tax_asset_class |
string or null | yes | Tax asset class of the tax memo, if any. |
source_bill |
string or null | yes | Number of the purchase bill that capitalised the cost, if linked. |
AssetRegistered
| Field | Type | Required | Description |
|---|---|---|---|
id |
string | yes | Asset id (uuid). |
code |
string | yes | Asset code. |
schedule |
object | yes | The depreciation schedule from data-vNext. |
tax_schedule |
object or null | The tax memo schedule, when tax_asset_class was given. |
|
acquisition_status |
string or null | With post_acquisition: the acquisition entry's status, posted or pending_approval; null when nothing was posted (e.g. bought via a bill). |
|
acquisition_number |
string or null | The acquisition entry's number once posted; else null. |
AssetReversalResult
| Field | Type | Required | Description |
|---|---|---|---|
asset |
string | yes | Asset code. |
status |
"pending_approval" | "reversed" |
yes | reversed: the acquisition is reversed and the asset is off the register; pending_approval: the reversal waits for a second person (approval_id) and the asset stays active until it is approved. |
reversal_entry_id |
string (uuid) or null | The reversal entry once posted; null while it waits, and for an asset without an acquisition entry of its own (nothing to reverse: it leaves the register). | |
reversal_number |
string or null | Its number, once posted. | |
approval_id |
string (uuid) or null | The approval request (object_type journal_reversal) while it waits. |
AssetSaleInput
| Field | Type | Required | Description |
|---|---|---|---|
percent |
decimal string or null | The part retired, in percent of the asset's cost (above 0, below 100). (greater than 0) | |
cost |
decimal string or null | The part retired as an amount of the asset's cost, in the company's currency (below the cost). Give this or percent. (greater than 0) |
|
sale_date |
string (date) | yes | Day of the sale, ISO 8601: the invoice date and the date the asset (or the part) leaves. Its period must be open. |
customer |
string | yes | The buying customer's code (or id). |
net_amount |
decimal string | yes | The selling price without VAT, in the invoice currency. (greater than 0) |
currency |
string or null | The invoice currency; default: the customer's currency. | |
rate_type |
"exempt" | "reduced" | "standard" | "zero" |
The VAT rate the sale carries, as for any invoice line of goods: standard (default; e.g. 8.1 % in Switzerland, 19 % in Germany), reduced, zero or exempt. The customer's country decides the treatment (export, intra-EU supply, reverse charge). (default "standard") |
|
description |
string or null | The invoice line's text; default: Sale of <asset code> <asset name>. (min length 1; max length 200) |
AssetSaleOut
| Field | Type | Required | Description |
|---|---|---|---|
invoice_id |
string (uuid) | yes | The sales invoice (GET /v1/documents/{id}). |
invoice_number |
string or null | yes | Its number, once posted. |
invoice_status |
string | yes | posted or pending_approval. |
currency |
string | yes | The invoice currency. |
net_amount |
string | yes | The invoice's net amount. |
tax_amount |
string | yes | Its VAT. |
total |
string | yes | What the customer owes. |
proceeds |
string | yes | The net amount in the company's currency: what the asset (or the part) was sold for; the gain or loss is against it. |
disposal |
SubmitResult or null |
yes | The whole asset sold: its disposal entry. Null for a part. |
change |
AssetChangeOut or null |
yes | A part sold: the partial retirement. |
BookInput
| Field | Type | Required | Description |
|---|---|---|---|
code |
string or null | e.g. TAX-CH; left out, it is made from the name (TAX-BOOK-SWITZERLAND). (pattern ^[A-Z0-9_-]{2,20}$) |
|
name |
string | yes | Book name, e.g. Tax book Switzerland (ESTV). (min length 1) |
regime |
string or null | data-vNext depreciation regime, e.g. ch.estv, de.afa, us.macrs.gds | |
deferred_tax |
boolean | Post deferred tax from this book. (default false) |
|
tax_rate_percent |
decimal string or null | Tax rate in percent (above 0, below 100), e.g. 12.0. Required when deferred_tax is true. (greater than 0) |
|
deferred_tax_cadence |
"period" | "year_end" |
Whether the close needs a deferred-tax run every period or only at year end. (default "year_end") |
|
dtl_account |
string or null | Deferred tax liability account (default: role). | |
dta_account |
string or null | Deferred tax asset account (default: role). | |
dt_expense_account |
string or null | Deferred tax expense/income account (default: role). |
BookOut
| Field | Type | Required | Description |
|---|---|---|---|
code |
string | yes | Book code: BOOK for the accounting book, else a tax book such as TAX-CH. |
name |
string | yes | Book name. |
kind |
string | yes | book for the accounting book, tax for a tax book. |
standard |
string or null | yes | The framework (accounting book) or data-vNext regime (tax book). |
posts_to_gl |
boolean | yes | true only for the accounting book, which posts depreciation. |
deferred_tax |
boolean | yes | true when this book carries deferred tax. |
tax_rate_percent |
string or null | yes | Tax rate in percent used for deferred tax. |
deferred_tax_cadence |
string or null | yes | period or year_end, for the book that carries deferred tax. |
dtl_account |
string or null | yes | GL account code of the deferred tax liability. |
dta_account |
string or null | yes | GL account code of the deferred tax asset. |
dt_expense_account |
string or null | yes | GL account code of the deferred tax expense or income. |
BookTotal
| Field | Type | Required | Description |
|---|---|---|---|
book |
string | yes | Tax book code. |
tax_rate_percent |
string or null | yes | Tax rate in percent, for the book that carries deferred tax. |
temporary_difference |
string | yes | Sum of the book's temporary differences. |
deferred_tax |
string or null | yes | Net deferred tax: positive a liability, negative an asset. |
deferred_tax_liability |
string or null | yes | The liability to be carried (never negative). |
deferred_tax_asset |
string or null | yes | The asset to be carried (never negative). |
posted_liability |
string or null | yes | Balance already posted on the liability account for this book. |
posted_asset |
string or null | yes | Balance already posted on the asset account for this book. |
movement |
string or null | yes | The change in deferred tax a run would post now: an increase of the net liability positive. Of it, surplus_movement is charged to the revaluation surplus and the rest is deferred tax expense (positive) or income (negative). |
surplus_movement |
string or null | The part of movement charged to the revaluation surplus in equity, not to profit or loss (IAS 12.61A): the deferred tax on the surplus of the book's revalued assets, less what runs charged to it before. Zero without revaluations. |
BookUpdate
| Field | Type | Required | Description |
|---|---|---|---|
name |
string or null | New book name. Omitted: unchanged. (min length 1) | |
tax_rate_percent |
decimal string or null | New tax rate in percent (above 0, below 100); the next deferred-tax run remeasures. Omitted: unchanged. (greater than 0) | |
deferred_tax_cadence |
"period" | "year_end" or null |
period or year_end: how often the close needs a deferred-tax run. Omitted: unchanged. |
ChangeInput
| Field | Type | Required | Description |
|---|---|---|---|
effective_date |
string (date) | yes | The first day of the lease month the new payments apply from, ISO 8601. |
payment |
decimal string | yes | The new payment, in the lease currency. (greater than 0) |
reason |
string | yes | Why the payments change, e.g. an index. (min length 1; max length 500) |
DifferenceLine
| Field | Type | Required | Description |
|---|---|---|---|
asset |
string | yes | Asset code. |
name |
string | yes | Asset name. |
book |
string | yes | Tax book code. |
carrying_amount |
string | yes | Carrying amount in the ledger at the period end (0 if disposed). |
tax_base |
string | yes | Cost less the tax book's depreciation to the period end. |
temporary_difference |
string | yes | Carrying amount less tax base: positive is taxable (liability), negative deductible (asset). |
deferred_tax |
string or null | yes | Difference times the tax rate, for the book that carries deferred tax. |
DifferenceReport
| Field | Type | Required | Description |
|---|---|---|---|
entity |
string | yes | Entity code. |
currency |
string | yes | Functional currency of the amounts. |
period |
PeriodRef |
yes | The period the report is measured at. |
lines |
array of DifferenceLine |
yes | One line per asset and tax book. |
totals |
array of BookTotal |
yes | One total per tax book. |
DisposalInput
| Field | Type | Required | Description |
|---|---|---|---|
disposal_date |
string (date) | yes | Date of the disposal, ISO 8601; the posting is dated here and its period must be open. |
proceeds |
decimal string | Sale proceeds as a decimal string, e.g. "2500.00". Default "0" (scrapped). (min 0; default "0") |
|
proceeds_account |
string or null | Where proceeds are debited. |
ImpairmentInput
| Field | Type | Required | Description |
|---|---|---|---|
impairment_date |
string (date) | yes | Day of the impairment, ISO 8601; the entry is dated on it and its period must be open. |
amount |
decimal string or null | The write-down, in the company's currency, at most the carrying amount. (greater than 0) | |
recoverable_amount |
decimal string or null | Or the value the asset is written down to (its recoverable amount, IAS 36.59): the write-down is the carrying amount less it. Give this or amount. (min 0) |
|
reason |
string | yes | Why the asset lost value, e.g. damage, obsolescence (kept with the change). (min length 1; max length 500) |
ImpairmentReversalInput
| Field | Type | Required | Description |
|---|---|---|---|
reversal_date |
string (date) | yes | Day of the reversal, ISO 8601; the entry is dated on it and its period must be open. |
amount |
decimal string or null | The write-up, in the company's currency, at most what the asset may be written up by (the value it would have, net of depreciation, had it not been impaired). (greater than 0) | |
recoverable_amount |
decimal string or null | Or the asset's recoverable amount now: the write-up is what it is above the carrying amount, at most what the asset may be written up by. Give this or amount. (greater than 0) |
|
reason |
string | yes | Why the reasons for the impairment no longer apply (kept with the change). (min length 1; max length 500) |
LeaseChangeOut
| Field | Type | Required | Description |
|---|---|---|---|
effective_date |
string (date) | yes | First day of the new payments. |
from_month |
integer | yes | The lease month they start in. |
payment |
string | yes | The new payment (lease currency). |
liability_change |
string | yes | The remeasurement (lease currency). |
rou_change |
string | yes | The asset's adjustment (functional currency). |
reason |
string | yes | Why the payments changed. |
entry |
LeaseEntry |
yes | The entry that booked it. |
LeaseEntry
| Field | Type | Required | Description |
|---|---|---|---|
id |
string (uuid) | yes | The journal entry. |
number |
string or null | yes | Its number once posted. |
status |
string | yes | posted, pending_approval or rejected. |
LeaseInput
| Field | Type | Required | Description |
|---|---|---|---|
entity |
string | yes | Entity code (or id) that holds the lease, e.g. DE01. |
code |
string or null | Left out: the company's next lease number (L-00001, counted without gaps). Give one (up to 40 characters, e.g. the contract number) only to keep it; unique in the entity. (min length 1; max length 40) |
|
name |
string | yes | What is leased, e.g. Office Basel. (min length 1; max length 200) |
lessor |
string or null | The lessor, a vendor of the entity (code or id); optional. | |
currency |
string or null | Currency of the payments, e.g. EUR. Default: the entity's functional currency. A foreign-currency liability is revalued at each period end. (pattern ^[A-Z]{3}$) |
|
commencement_date |
string (date) | yes | The day the lessor makes the asset available, ISO 8601; the lease months count from it. |
term_months |
integer | yes | The lease term in months (a multiple of the payment interval). (min 1; max 600) |
payment |
decimal string | yes | Each payment, e.g. "450.00". (greater than 0) |
frequency |
"monthly" | "quarterly" | "yearly" |
monthly, quarterly or yearly. Default monthly. (default "monthly") |
|
timing |
"advance" | "arrears" |
advance (paid on the first day of its months) or arrears (on the last). Default advance. (default "advance") |
|
rate_percent |
decimal string | yes | The effective annual discount rate in percent, e.g. "4.5": the rate implicit in the lease if known, else the incremental borrowing rate. A month is discounted at its twelfth root, (1 + rate) ^ (1/12) - 1. (min 0) |
classification |
"finance" | "operating" or null |
finance or operating (ASC 842-10-25-2). Only a US GAAP company has operating leases: one straight-line lease cost a period instead of interest and depreciation. Default: operating for a US GAAP company, finance otherwise (IFRS 16 has one model). |
|
initial_direct_costs |
decimal string | Initial direct costs, added to the right-of-use asset, in the lease currency. (min 0; default "0") |
|
prepaid |
decimal string | Lease payments made before the commencement date, added to the right-of-use asset, in the lease currency. (min 0; default "0") |
|
exemption |
"low_value" | "short_term" or null |
short_term (12 months or less) or low_value (IFRS 16.5): the lease is only listed and its bills are expensed. Default null: recognised. |
|
rou_account |
string or null | Right-of-use asset account. Default: the company's account with the role lease_right_of_use (of an operating lease: operating_lease_right_of_use). |
|
accumulated_account |
string or null | Its accumulated depreciation account. Default: the company's account with the role lease_accumulated_depreciation (of an operating lease: operating_lease_accumulated_amortization). |
|
liability_account |
string or null | Lease liability account. Default: the company's account with the role lease_liability (of an operating lease: operating_lease_liability). |
|
interest_account |
string or null | Interest expense account. Default: the company's account with the role lease_interest. |
|
depreciation_account |
string or null | Depreciation expense account (a finance lease). Default: the company's account with the role depreciation_expense. |
|
lease_cost_account |
string or null | Lease cost account of an operating lease (instead of the interest and depreciation accounts). Default: the company's account with the role lease_cost. |
LeaseLine
| Field | Type | Required | Description |
|---|---|---|---|
id |
string (uuid) | yes | Lease id. |
code |
string | yes | Lease code. |
name |
string | yes | What is leased. |
lessor |
string or null | yes | The lessor's name, if named. |
currency |
string | yes | Currency of the payments. |
commencement_date |
string (date) | yes | First day. |
end_date |
string (date) | yes | Last day. |
payment |
string | yes | The payment now (after any change). |
frequency |
"monthly" | "quarterly" | "yearly" |
yes | How often it is paid. |
classification |
"finance" | "operating" |
yes | finance or operating (US GAAP). |
status |
"active" | "draft" | "exempt" | "pending" | "terminated" |
yes | draft, pending, active, terminated or exempt. |
exemption |
"low_value" | "short_term" or null |
yes | Why it is only listed, if it is. |
liability |
string | yes | Lease liability at as_of (lease currency). |
current_liability |
string | yes | Of which due within 12 months. |
rou_carrying |
string | yes | Right-of-use asset at as_of (functional). |
unposted_months |
integer | yes | Lease months ended by as_of not booked yet. |
LeaseOut
| Field | Type | Required | Description |
|---|---|---|---|
id |
string (uuid) | yes | Lease id. |
code |
string | yes | Lease code. |
name |
string | yes | What is leased. |
lessor |
string or null | yes | The lessor's name, if named. |
currency |
string | yes | Currency of the payments. |
commencement_date |
string (date) | yes | First day. |
end_date |
string (date) | yes | Last day. |
payment |
string | yes | The payment now (after any change). |
frequency |
"monthly" | "quarterly" | "yearly" |
yes | How often it is paid. |
classification |
"finance" | "operating" |
yes | finance or operating (US GAAP). |
status |
"active" | "draft" | "exempt" | "pending" | "terminated" |
yes | draft, pending, active, terminated or exempt. |
exemption |
"low_value" | "short_term" or null |
yes | Why it is only listed, if it is. |
liability |
string | yes | Lease liability at as_of (lease currency). |
current_liability |
string | yes | Of which due within 12 months. |
rou_carrying |
string | yes | Right-of-use asset at as_of (functional). |
unposted_months |
integer | yes | Lease months ended by as_of not booked yet. |
entity |
string | yes | Entity code. |
functional_currency |
string | yes | The entity's functional currency. |
local_gaap |
boolean | yes | The company reports under IFRS or US GAAP on a local chart (Swiss KMU, HGB, ...), whose statutory books expense leases as a rule; a company whose framework is local enters no lease. |
lessor_id |
string (uuid) or null | yes | The lessor (party id). |
lessor_code |
string or null | yes | The lessor's code. |
term_months |
integer | yes | Lease term in months. |
original_payment |
string | yes | The payment agreed at commencement. |
timing |
"advance" | "arrears" |
yes | advance or arrears. |
rate_percent |
string | yes | Effective annual discount rate in percent. |
initial_direct_costs |
string | yes | Added to the asset (lease currency). |
prepaid |
string | yes | Paid before commencement (lease currency). |
rou_account |
string | yes | Right-of-use asset account code. |
accumulated_account |
string | yes | Accumulated depreciation account code. |
liability_account |
string | yes | Lease liability account code. |
interest_account |
string | yes | Interest expense account code (finance). |
depreciation_account |
string | yes | Depreciation expense account code (finance). |
lease_cost_account |
string | yes | Lease cost account code (operating). |
initial_liability |
string | yes | Liability at commencement (lease currency). |
rou_cost |
string | yes | The asset's cost in the functional currency: as booked once activated, else at the rate of the commencement date (an estimate). |
as_of |
string (date) | yes | The date the position figures are at. |
noncurrent_liability |
string | yes | Liability due after 12 months. |
posted_through |
integer | yes | The last lease month booked (0 when none). |
activation |
LeaseEntry or null |
yes | The entry that recognised the lease. |
termination_date |
string (date) or null | yes | The day it was ended early. |
termination |
LeaseEntry or null |
yes | The entry that derecognised it. |
changes |
array of LeaseChangeOut |
yes | Changes of payments, by month. |
rows |
array of LeaseRow |
yes | The schedule, month by month (empty if exempt). |
LeaseRow
| Field | Type | Required | Description |
|---|---|---|---|
month |
integer | yes | The lease month, 1 is the first. |
start |
string (date) | yes | Its first day. |
end |
string (date) | yes | Its last day. |
opening |
string | yes | Liability at its start (lease currency). |
remeasurement |
string | yes | A change of payments' remeasurement, else 0. |
payment |
string | yes | The payment that falls in it, else 0. |
interest |
string | yes | Interest of the month (lease currency). |
closing |
string | yes | Liability at its end (lease currency). |
depreciation |
string | yes | Depreciation of the asset (functional currency); of an operating lease the asset's reduction: the lease cost less the interest. |
lease_cost |
string or null | yes | An operating lease's straight-line lease cost of the month (lease currency); null for a finance lease. |
rou_carrying |
string | yes | The asset's carrying amount at its end. |
posted |
boolean | yes | Whether a period's lease entries booked it. |
LeaseRunItem
| Field | Type | Required | Description |
|---|---|---|---|
lease |
string | yes | Lease code. |
months |
string | yes | The lease months booked, e.g. 3 or 3-4. |
currency |
string | yes | Lease currency (of the interest). |
interest |
string | yes | Interest booked (lease currency). |
depreciation |
string | yes | Depreciation booked (functional currency). |
classification |
"finance" | "operating" |
yes | operating: both were booked as the lease cost. |
stub |
boolean | yes | Only the part of lease month 1 that ran by the period's end (the lease commenced in the period and its first month ends after it). |
LeaseRunSummary
| Field | Type | Required | Description |
|---|---|---|---|
period |
string | yes | The period as YYYY-NN. |
items |
array of LeaseRunItem |
yes | What was booked, one item per lease. |
skipped |
array of string | yes | Codes of the leases not booked because a change of their payments waits for approval: decide it, then run again. |
submit |
SubmitResult |
yes | The entry with the approval policy's decision. |
PartialRetirementInput
| Field | Type | Required | Description |
|---|---|---|---|
percent |
decimal string or null | The part retired, in percent of the asset's cost (above 0, below 100). (greater than 0) | |
cost |
decimal string or null | The part retired as an amount of the asset's cost, in the company's currency (below the cost). Give this or percent. (greater than 0) |
|
retirement_date |
string (date) | yes | Day the part leaves, ISO 8601; the entry is dated on it and its period must be open. |
proceeds |
decimal string | Net proceeds for the part, without VAT. Default "0" (scrapped). (min 0; default "0") |
|
proceeds_account |
string or null | The account the proceeds are debited to, usually the bank account they were paid into. To sell to a customer on an invoice, use POST /v1/assets/{asset}/sale. |
|
reason |
string or null | Why, in your own words (kept with the change and shown to the approver). (min length 1; max length 500) |
RevaluationInput
| Field | Type | Required | Description |
|---|---|---|---|
revaluation_date |
string (date) | yes | Day of the revaluation, ISO 8601; the entry is dated on it and its period must be open. |
fair_value |
decimal string | yes | The asset's fair value on that day, in the company's currency. (greater than 0) |
reason |
string | yes | The basis of the fair value, e.g. a valuer's report (kept with the change). (min length 1; max length 500) |
ScheduleYear
| Field | Type | Required | Description |
|---|---|---|---|
fiscal_year |
integer | yes | Fiscal year of the row. |
opening_book_value |
string | yes | Value at the start of the year, a decimal string. |
depreciation |
string | yes | Scheduled depreciation of the year. |
accumulated |
string | yes | Accumulated scheduled depreciation at the end of the year. |
closing_book_value |
string | yes | Value at the end of the year. |
book_value |
string or null | Tax books: the accounting book's closing value for the same year. | |
difference |
string or null | Tax books: book_value less this book's closing value. |
TerminateInput
| Field | Type | Required | Description |
|---|---|---|---|
termination_date |
string (date) | yes | The last day of the lease, ISO 8601: the last day of a lease month whose entries are posted. |
result_account |
string or null | The account of the gain or loss. Default: the company's account for a gain or for a loss on disposal of assets. |