Reference
Finance
GET/api/v1/finance/actualsGet actuals
Plan against actuals per BWA line for a year, as /finanzen/ist shows it, up to the last month a BWA was imported for; and the recent BWA imports with their state. The BWA carries no business unit, so with business_unit the actuals are not compared.scope finance:read
Query
| year | integerDefault: this year. |
| business_unit | stringName or id of a business unit (list_business_units). Default: every unit. |
Response 200
| year | integer |
| business_unit | string | null |
| reporting_month | string | null |
| months | string[] |
| compared | boolean |
| rows[] | object[] |
| rows[].bwaLineKey | string |
| rows[].label | string |
| rows[].type | string |
| rows[].planCents | integer |
| rows[].actualCents | integer |
| rows[].deltaCents | integer |
| rows[].deltaPercent | number | null |
| rows[].contributors[] | object[] |
| rows[].contributors[].key | string |
| rows[].contributors[].name | string |
| rows[].contributors[].cents | integer |
| imports[] | object[] |
| imports[].id | string |
| imports[].month | string |
| imports[].status | string |
| imports[].file | string | null |
| imports[].uploaded_at | string |
| url | string |
Schema
{
"type": "object",
"properties": {
"year": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"business_unit": {
"type": [
"string",
"null"
]
},
"reporting_month": {
"type": [
"string",
"null"
]
},
"months": {
"type": "array",
"items": {
"type": "string"
}
},
"compared": {
"type": "boolean"
},
"rows": {
"type": "array",
"items": {
"type": "object",
"properties": {
"bwaLineKey": {
"type": "string"
},
"label": {
"type": "string"
},
"type": {
"type": "string"
},
"planCents": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"actualCents": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"deltaCents": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"deltaPercent": {
"type": [
"number",
"null"
]
},
"contributors": {
"type": "array",
"items": {
"type": "object",
"properties": {
"key": {
"type": "string"
},
"name": {
"type": "string"
},
"cents": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
}
},
"required": [
"key",
"name",
"cents"
],
"additionalProperties": false
}
}
},
"required": [
"bwaLineKey",
"label",
"type",
"planCents",
"actualCents",
"deltaCents",
"deltaPercent",
"contributors"
],
"additionalProperties": false
}
},
"imports": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"month": {
"type": "string"
},
"status": {
"type": "string"
},
"file": {
"type": [
"string",
"null"
]
},
"uploaded_at": {
"type": "string"
}
},
"required": [
"id",
"month",
"status",
"file",
"uploaded_at"
],
"additionalProperties": false
}
},
"url": {
"type": "string"
}
},
"required": [
"year",
"business_unit",
"reporting_month",
"months",
"compared",
"rows",
"imports",
"url"
],
"additionalProperties": false
}Refusals are problems with a code — see Errors.
POST/api/v1/finance/blocksSave finance block
Creates a block that groups finance categories (omit key; name and direction are required; the key is the name in capitals) or edits one: only the fields given change, and the direction is fixed once it exists, since its categories share it. finance.manage only.scope finance:write
Body (JSON)
| key | stringThe block's key, from list_finance_categories. Omit to create one. |
| name | string |
| direction | one of cost, revenueOnly for a new block. |
| sort | integerDefault for a new one: after the others. |
Response 200
| created | boolean |
| block | object |
| block.key | string |
| block.name | string |
| block.direction | string |
| block.sort | number |
| block.url | string |
Schema
{
"type": "object",
"properties": {
"created": {
"type": "boolean"
},
"block": {
"type": "object",
"properties": {
"key": {
"type": "string"
},
"name": {
"type": "string"
},
"direction": {
"type": "string"
},
"sort": {
"type": "number"
},
"url": {
"type": "string"
}
},
"required": [
"key",
"name",
"direction",
"sort",
"url"
],
"additionalProperties": false
}
},
"required": [
"created",
"block"
],
"additionalProperties": false
}Refusals are problems with a code — see Errors.
POST/api/v1/finance/bwa-importsUpload bwa
Reads a DATEV BWA (the text of its CSV or XLSX export) into a preview, as the upload on /finanzen/ist does: the lines it matched with month and year-to-date amounts in cents, the lines it could not place, and the plausibility warnings. The preview counts for nothing until confirm_bwa_import; discard_bwa_import throws it away. Show the person the preview and the warnings before confirming. PDF is refused. finance.manage only.scope finance:write
Body (JSON)
| textrequired | stringThe BWA as text (CSV / exported table, German number format). |
| month | stringThe month the BWA is for. Omit to take the month named in the document. |
| file_name | stringName of the source file, kept with the import. Default "bwa.csv". |
Response 200
| import | string |
| status | string |
| counts | boolean |
| month | string |
| file_name | string |
| matched | number |
| rows[] | object[] |
| rows[].bwa_line | string |
| rows[].label | string |
| rows[].amount_month_cents | number |
| rows[].amount_ytd_cents | number |
| unmatched | string[] |
| warnings | string[] |
| next | string |
| url | string |
Schema
{
"type": "object",
"properties": {
"import": {
"type": "string"
},
"status": {
"type": "string",
"const": "PARSED"
},
"counts": {
"type": "boolean",
"const": false
},
"month": {
"type": "string"
},
"file_name": {
"type": "string"
},
"matched": {
"type": "number"
},
"rows": {
"type": "array",
"items": {
"type": "object",
"properties": {
"bwa_line": {
"type": "string"
},
"label": {
"type": "string"
},
"amount_month_cents": {
"type": "number"
},
"amount_ytd_cents": {
"type": "number"
}
},
"required": [
"bwa_line",
"label",
"amount_month_cents",
"amount_ytd_cents"
],
"additionalProperties": false
}
},
"unmatched": {
"type": "array",
"items": {
"type": "string"
}
},
"warnings": {
"type": "array",
"items": {
"type": "string"
}
},
"next": {
"type": "string"
},
"url": {
"type": "string"
}
},
"required": [
"import",
"status",
"counts",
"month",
"file_name",
"matched",
"rows",
"unmatched",
"warnings",
"next",
"url"
],
"additionalProperties": false
}Refusals are problems with a code — see Errors.
POST/api/v1/finance/bwa-imports/{id}/confirmConfirm bwa import
Takes a previewed BWA import into the actuals. Whatever was confirmed for that month before becomes SUPERSEDED (kept, no longer counted). Only a preview (status PARSED) can be confirmed. finance.manage only.scope finance:write
Path
| idrequired | stringThe import's id, as upload_bwa or get_actuals give it. |
Response 200
| import | string |
| status | string |
| month | string |
| superseded | number |
| url | string |
Schema
{
"type": "object",
"properties": {
"import": {
"type": "string"
},
"status": {
"type": "string",
"const": "CONFIRMED"
},
"month": {
"type": "string"
},
"superseded": {
"type": "number"
},
"url": {
"type": "string"
}
},
"required": [
"import",
"status",
"month",
"superseded",
"url"
],
"additionalProperties": false
}Refusals are problems with a code — see Errors.
POST/api/v1/finance/bwa-imports/{id}/discardDiscard bwa import
Deletes a BWA preview nobody wants, with its figures. Only a preview (status PARSED); a confirmed import stays. finance.manage only.scope finance:write
Path
| idrequired | stringThe import's id, as upload_bwa or get_actuals give it. |
Response 200
| import | string |
| discarded | boolean |
Schema
{
"type": "object",
"properties": {
"import": {
"type": "string"
},
"discarded": {
"type": "boolean",
"const": true
}
},
"required": [
"import",
"discarded"
],
"additionalProperties": false
}Refusals are problems with a code — see Errors.
GET/api/v1/finance/categoriesList finance categories
The categories plan items and contract lines book to -- revenue or cost, with their block, BWA line, scaling and whether they reach the P&L -- and the blocks and BWA lines themselves.scope finance:read
Query
| include_archived | boolean |
Response 200
| categories[] | object[] |
| categories[].key | string |
| categories[].name | string |
| categories[].direction | string |
| categories[].block | string |
| categories[].bwa_line | string | null |
| categories[].scaling | string |
| categories[].affects_pnl | boolean |
| categories[].archived | boolean |
| blocks[] | object[] |
| blocks[].key | string |
| blocks[].name | string |
| blocks[].sort | integer |
| blocks[].direction | string |
| bwa_lines[] | object[] |
| bwa_lines[].key | string |
| bwa_lines[].label | string |
| bwa_lines[].type | string |
| url | string |
Schema
{
"type": "object",
"properties": {
"categories": {
"type": "array",
"items": {
"type": "object",
"properties": {
"key": {
"type": "string"
},
"name": {
"type": "string"
},
"direction": {
"type": "string"
},
"block": {
"type": "string"
},
"bwa_line": {
"type": [
"string",
"null"
]
},
"scaling": {
"type": "string"
},
"affects_pnl": {
"type": "boolean"
},
"archived": {
"type": "boolean"
}
},
"required": [
"key",
"name",
"direction",
"block",
"bwa_line",
"scaling",
"affects_pnl",
"archived"
],
"additionalProperties": false
}
},
"blocks": {
"type": "array",
"items": {
"type": "object",
"properties": {
"key": {
"type": "string"
},
"name": {
"type": "string"
},
"sort": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"direction": {
"type": "string"
}
},
"required": [
"key",
"name",
"sort",
"direction"
],
"additionalProperties": false
}
},
"bwa_lines": {
"type": "array",
"items": {
"type": "object",
"properties": {
"key": {
"type": "string"
},
"label": {
"type": "string"
},
"type": {
"type": "string"
}
},
"required": [
"key",
"label",
"type"
],
"additionalProperties": false
}
},
"url": {
"type": "string"
}
},
"required": [
"categories",
"blocks",
"bwa_lines",
"url"
],
"additionalProperties": false
}Refusals are problems with a code — see Errors.
POST/api/v1/finance/categoriesSave finance category
Creates a finance category (omit key; name, direction and block are required; the key is made from the name) or edits one: only the fields given change, and the direction is fixed once it exists. A new cost category comes with one lump-sum plan item per business unit in the scenario BEAUFTRAGT, which carries the category's name and VAT proposal; a revenue category gets none. Blocks and BWA lines come from list_finance_categories, and must match the direction. finance.manage only.scope finance:write
Body (JSON)
| key | stringThe category's key, from list_finance_categories. Omit to create one. |
| name | string |
| direction | one of cost, revenueOnly for a new category. |
| block | stringA block key of the same direction. |
| scaling | one of FIX, SEMI_FIX, VARIABLEFIX, SEMI_FIX or VARIABLE. Default for a new one: FIX. |
| bwa_line | string | nullA BWA line key of the matching type, or null for none. Dropped when affects_pnl is false. |
| affects_pnl | booleanfalse for money that only moves liquidity, e.g. a repayment. Default for a new one: true. |
| sort | integerDefault for a new one: after the others. |
| default_vat_rate_pct | numberVAT proposal for new plan items and contract lines, e.g. 19, 7, 0. Default for a new one: 19. |
Response 200
| created | boolean |
| category | object |
| category.key | string |
| category.name | string |
| category.direction | string |
| category.block | string |
| category.bwa_line | string | null |
| category.scaling | string |
| category.affects_pnl | boolean |
| category.sort | number |
| category.default_vat_rate_pct | number |
| category.archived | boolean |
| category.lump_sums[] | object[] |
| category.lump_sums[].plan_item | string |
| category.lump_sums[].business_unit | string | null |
| category.lump_sums[].archived | boolean |
| category.url | string |
Schema
{
"type": "object",
"properties": {
"created": {
"type": "boolean"
},
"category": {
"type": "object",
"properties": {
"key": {
"type": "string"
},
"name": {
"type": "string"
},
"direction": {
"type": "string"
},
"block": {
"type": "string"
},
"bwa_line": {
"type": [
"string",
"null"
]
},
"scaling": {
"type": "string"
},
"affects_pnl": {
"type": "boolean"
},
"sort": {
"type": "number"
},
"default_vat_rate_pct": {
"type": "number"
},
"archived": {
"type": "boolean"
},
"lump_sums": {
"type": "array",
"items": {
"type": "object",
"properties": {
"plan_item": {
"type": "string"
},
"business_unit": {
"type": [
"string",
"null"
]
},
"archived": {
"type": "boolean"
}
},
"required": [
"plan_item",
"business_unit",
"archived"
],
"additionalProperties": false
}
},
"url": {
"type": "string"
}
},
"required": [
"key",
"name",
"direction",
"block",
"bwa_line",
"scaling",
"affects_pnl",
"sort",
"default_vat_rate_pct",
"archived",
"lump_sums",
"url"
],
"additionalProperties": false
}
},
"required": [
"created",
"category"
],
"additionalProperties": false
}Refusals are problems with a code — see Errors.
POST/api/v1/finance/categories/{id}/archiveArchive finance category
Archives a finance category and its lump sums. Never deletes: amounts planned against it stay readable. Refused while plan items of its own (not the lump sums) are still active in it. restore_finance_category brings it back. finance.manage only.scope finance:write
Path
| idrequired | stringThe category's key, from list_finance_categories. |
Response 200
| category | object |
| category.key | string |
| category.name | string |
| category.direction | string |
| category.block | string |
| category.bwa_line | string | null |
| category.scaling | string |
| category.affects_pnl | boolean |
| category.sort | number |
| category.default_vat_rate_pct | number |
| category.archived | boolean |
| category.lump_sums[] | object[] |
| category.lump_sums[].plan_item | string |
| category.lump_sums[].business_unit | string | null |
| category.lump_sums[].archived | boolean |
| category.url | string |
Schema
{
"type": "object",
"properties": {
"category": {
"type": "object",
"properties": {
"key": {
"type": "string"
},
"name": {
"type": "string"
},
"direction": {
"type": "string"
},
"block": {
"type": "string"
},
"bwa_line": {
"type": [
"string",
"null"
]
},
"scaling": {
"type": "string"
},
"affects_pnl": {
"type": "boolean"
},
"sort": {
"type": "number"
},
"default_vat_rate_pct": {
"type": "number"
},
"archived": {
"type": "boolean"
},
"lump_sums": {
"type": "array",
"items": {
"type": "object",
"properties": {
"plan_item": {
"type": "string"
},
"business_unit": {
"type": [
"string",
"null"
]
},
"archived": {
"type": "boolean"
}
},
"required": [
"plan_item",
"business_unit",
"archived"
],
"additionalProperties": false
}
},
"url": {
"type": "string"
}
},
"required": [
"key",
"name",
"direction",
"block",
"bwa_line",
"scaling",
"affects_pnl",
"sort",
"default_vat_rate_pct",
"archived",
"lump_sums",
"url"
],
"additionalProperties": false
}
},
"required": [
"category"
],
"additionalProperties": false
}Refusals are problems with a code — see Errors.
POST/api/v1/finance/categories/{id}/restoreRestore finance category
Brings an archived finance category back with its lump sums; plan items archived for their own reasons stay archived. finance.manage only.scope finance:write
Path
| idrequired | stringThe category's key, from list_finance_categories with include_archived. |
Response 200
| category | object |
| category.key | string |
| category.name | string |
| category.direction | string |
| category.block | string |
| category.bwa_line | string | null |
| category.scaling | string |
| category.affects_pnl | boolean |
| category.sort | number |
| category.default_vat_rate_pct | number |
| category.archived | boolean |
| category.lump_sums[] | object[] |
| category.lump_sums[].plan_item | string |
| category.lump_sums[].business_unit | string | null |
| category.lump_sums[].archived | boolean |
| category.url | string |
Schema
{
"type": "object",
"properties": {
"category": {
"type": "object",
"properties": {
"key": {
"type": "string"
},
"name": {
"type": "string"
},
"direction": {
"type": "string"
},
"block": {
"type": "string"
},
"bwa_line": {
"type": [
"string",
"null"
]
},
"scaling": {
"type": "string"
},
"affects_pnl": {
"type": "boolean"
},
"sort": {
"type": "number"
},
"default_vat_rate_pct": {
"type": "number"
},
"archived": {
"type": "boolean"
},
"lump_sums": {
"type": "array",
"items": {
"type": "object",
"properties": {
"plan_item": {
"type": "string"
},
"business_unit": {
"type": [
"string",
"null"
]
},
"archived": {
"type": "boolean"
}
},
"required": [
"plan_item",
"business_unit",
"archived"
],
"additionalProperties": false
}
},
"url": {
"type": "string"
}
},
"required": [
"key",
"name",
"direction",
"block",
"bwa_line",
"scaling",
"affects_pnl",
"sort",
"default_vat_rate_pct",
"archived",
"lump_sums",
"url"
],
"additionalProperties": false
}
},
"required": [
"category"
],
"additionalProperties": false
}Refusals are problems with a code — see Errors.
POST/api/v1/finance/cost-centers/fillFill cost centers
Writes a business unit's cost center into every contract of that unit -- sales and purchase, ended ones too -- that has none yet. A cost center already set is never overwritten. For contracts from before the setting existed; get_finance_settings counts them. finance.manage only.scope finance:write
Body (JSON)
| business_unitrequired | stringName or id of a business unit (list_business_units). |
Response 200
| business_unit | string |
| cost_center | string |
| contracts_filled | number |
Schema
{
"type": "object",
"properties": {
"business_unit": {
"type": "string"
},
"cost_center": {
"type": "string"
},
"contracts_filled": {
"type": "number"
}
},
"required": [
"business_unit",
"cost_center",
"contracts_filled"
],
"additionalProperties": false
}Refusals are problems with a code — see Errors.
GET/api/v1/finance/liquidityGet liquidity
The gross liquidity forecast, as /finanzen/liquiditaet shows it: the opening balance from the latest bank balances, then per month money in and out with VAT and the balance at its end, the lowest month and whether it goes negative. The contracted scenario is always on; others by their ids, else those on by default.scope finance:read
Query
| months | numberDefault: 12. |
| business_unit | stringName or id of a business unit (list_business_units). Default: every unit. |
| scenarios | string[]Scenario ids switched on. Default: those active by default. |
Response 200
| months | string[] |
| scenarios[] | object[] |
| scenarios[].id | string |
| scenarios[].name | string |
| scenarios[].locked | boolean |
| scenarios[].on | boolean |
| scenarios[].toggleIds | string[] |
| onIds | string[] |
| forecast | object |
| forecast.months[] | object[] |
| forecast.months[].month | string |
| forecast.months[].openingCents | integer |
| forecast.months[].inflowCents | integer |
| forecast.months[].inflowByScenario | object |
| forecast.months[].outflowCents | integer |
| forecast.months[].outflowByBlock | object |
| forecast.months[].vatCents | integer |
| forecast.months[].netCents | integer |
| forecast.months[].closingCents | integer |
| forecast.lowest | object | null |
| forecast.lowest.month | string |
| forecast.lowest.openingCents | integer |
| forecast.lowest.inflowCents | integer |
| forecast.lowest.inflowByScenario | object |
| forecast.lowest.outflowCents | integer |
| forecast.lowest.outflowByBlock | object |
| forecast.lowest.vatCents | integer |
| forecast.lowest.netCents | integer |
| forecast.lowest.closingCents | integer |
| forecast.goesNegative | boolean |
| opening | object |
| opening.totalCents | integer |
| opening.date | string | null |
| opening.accounts[] | object[] |
| opening.accounts[].accountId | string | null |
| opening.accounts[].name | string | null |
| opening.accounts[].date | string |
| opening.accounts[].balanceCents | integer |
| inflowColumns[] | object[] |
| inflowColumns[].key | string |
| inflowColumns[].name | string |
| outflowColumns[] | object[] |
| outflowColumns[].key | string |
| outflowColumns[].name | string |
| unplanned | object |
| unplanned.sales | object |
| unplanned.sales.oneOffCents | integer |
| unplanned.sales.monthlyCents | integer |
| unplanned.sales.yearlyCents | integer |
| unplanned.purchase | object |
| unplanned.purchase.oneOffCents | integer |
| unplanned.purchase.monthlyCents | integer |
| unplanned.purchase.yearlyCents | integer |
| problems[] | object[] |
| problems[].key | string |
| problems[].label | string |
| problems[].message | string |
| problems[].href | string | null |
| missingScenarios[] | object[] |
| missingScenarios[].key | string |
| missingScenarios[].name | string |
| endedLines[] | object[] |
| endedLines[].key | string |
| endedLines[].label | string |
| endedLines[].message | string |
| endedLines[].href | string | null |
| accuracy[] | object[] |
| accuracy[].month | string |
| accuracy[].forecastCents | integer |
| accuracy[].actualCents | integer |
| accuracy[].deltaCents | integer |
| ignoresUnassignedSnapshots | boolean |
| url | string |
Schema
{
"type": "object",
"properties": {
"months": {
"type": "array",
"items": {
"type": "string"
}
},
"scenarios": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"name": {
"type": "string"
},
"locked": {
"type": "boolean"
},
"on": {
"type": "boolean"
},
"toggleIds": {
"type": "array",
"items": {
"type": "string"
}
}
},
"required": [
"id",
"name",
"locked",
"on",
"toggleIds"
],
"additionalProperties": false
}
},
"onIds": {
"type": "array",
"items": {
"type": "string"
}
},
"forecast": {
"type": "object",
"properties": {
"months": {
"type": "array",
"items": {
"type": "object",
"properties": {
"month": {
"type": "string"
},
"openingCents": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"inflowCents": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"inflowByScenario": {
"type": "object",
"propertyNames": {
"type": "string"
},
"additionalProperties": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
}
},
"outflowCents": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"outflowByBlock": {
"type": "object",
"propertyNames": {
"type": "string"
},
"additionalProperties": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
}
},
"vatCents": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"netCents": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"closingCents": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
}
},
"required": [
"month",
"openingCents",
"inflowCents",
"inflowByScenario",
"outflowCents",
"outflowByBlock",
"vatCents",
"netCents",
"closingCents"
],
"additionalProperties": false
}
},
"lowest": {
"anyOf": [
{
"type": "object",
"properties": {
"month": {
"type": "string"
},
"openingCents": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"inflowCents": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"inflowByScenario": {
"type": "object",
"propertyNames": {
"type": "string"
},
"additionalProperties": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
}
},
"outflowCents": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"outflowByBlock": {
"type": "object",
"propertyNames": {
"type": "string"
},
"additionalProperties": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
}
},
"vatCents": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"netCents": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"closingCents": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
}
},
"required": [
"month",
"openingCents",
"inflowCents",
"inflowByScenario",
"outflowCents",
"outflowByBlock",
"vatCents",
"netCents",
"closingCents"
],
"additionalProperties": false
},
{
"type": "null"
}
]
},
"goesNegative": {
"type": "boolean"
}
},
"required": [
"months",
"lowest",
"goesNegative"
],
"additionalProperties": false
},
"opening": {
"type": "object",
"properties": {
"totalCents": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"date": {
"type": [
"string",
"null"
]
},
"accounts": {
"type": "array",
"items": {
"type": "object",
"properties": {
"accountId": {
"type": [
"string",
"null"
]
},
"name": {
"type": [
"string",
"null"
]
},
"date": {
"type": "string"
},
"balanceCents": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
}
},
"required": [
"accountId",
"name",
"date",
"balanceCents"
],
"additionalProperties": false
}
}
},
"required": [
"totalCents",
"date",
"accounts"
],
"additionalProperties": false
},
"inflowColumns": {
"type": "array",
"items": {
"type": "object",
"properties": {
"key": {
"type": "string"
},
"name": {
"type": "string"
}
},
"required": [
"key",
"name"
],
"additionalProperties": false
}
},
"outflowColumns": {
"type": "array",
"items": {
"type": "object",
"properties": {
"key": {
"type": "string"
},
"name": {
"type": "string"
}
},
"required": [
"key",
"name"
],
"additionalProperties": false
}
},
"unplanned": {
"type": "object",
"properties": {
"sales": {
"type": "object",
"properties": {
"oneOffCents": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"monthlyCents": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"yearlyCents": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
}
},
"required": [
"oneOffCents",
"monthlyCents",
"yearlyCents"
],
"additionalProperties": false
},
"purchase": {
"type": "object",
"properties": {
"oneOffCents": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"monthlyCents": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"yearlyCents": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
}
},
"required": [
"oneOffCents",
"monthlyCents",
"yearlyCents"
],
"additionalProperties": false
}
},
"required": [
"sales",
"purchase"
],
"additionalProperties": false
},
"problems": {
"type": "array",
"items": {
"type": "object",
"properties": {
"key": {
"type": "string"
},
"label": {
"type": "string"
},
"message": {
"type": "string"
},
"href": {
"type": [
"string",
"null"
]
}
},
"required": [
"key",
"label",
"message",
"href"
],
"additionalProperties": false
}
},
"missingScenarios": {
"type": "array",
"items": {
"type": "object",
"properties": {
"key": {
"type": "string"
},
"name": {
"type": "string"
}
},
"required": [
"key",
"name"
],
"additionalProperties": false
}
},
"endedLines": {
"type": "array",
"items": {
"type": "object",
"properties": {
"key": {
"type": "string"
},
"label": {
"type": "string"
},
"message": {
"type": "string"
},
"href": {
"type": [
"string",
"null"
]
}
},
"required": [
"key",
"label",
"message",
"href"
],
"additionalProperties": false
}
},
"accuracy": {
"type": "array",
"items": {
"type": "object",
"properties": {
"month": {
"type": "string"
},
"forecastCents": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"actualCents": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"deltaCents": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
}
},
"required": [
"month",
"forecastCents",
"actualCents",
"deltaCents"
],
"additionalProperties": false
}
},
"ignoresUnassignedSnapshots": {
"type": "boolean"
},
"url": {
"type": "string"
}
},
"required": [
"months",
"scenarios",
"onIds",
"forecast",
"opening",
"inflowColumns",
"outflowColumns",
"unplanned",
"problems",
"missingScenarios",
"endedLines",
"accuracy",
"ignoresUnassignedSnapshots",
"url"
],
"additionalProperties": false
}Refusals are problems with a code — see Errors.
GET/api/v1/finance/plan-itemsList plan items
Plan items -- what is planned without a contract: one-off, recurring or month-by-month amounts per scenario, business unit and category -- with every field the item form has, month values in cents per "YYYY-MM", and whether it is a category's lump sum (typed into the planning grid) or an item with its own page. Archived items only when asked.scope finance:read
Query
| business_unit | stringName or id of a business unit (list_business_units). |
| scenario | stringA scenario id from list_scenarios. |
| category | stringA category key from list_finance_categories. |
| kind | one of one_off, recurring, monthly_values |
| lump_sum | booleantrue: only lump sums; false: only items with their own page. |
| search | stringPart of the label. |
| include_archived | boolean |
| page | integer1-based page of 50 rows. Omit for the first page. |
Response 200
| items[] | object[] |
| items[].id | string |
| items[].label | string |
| items[].business_unit | string | null |
| items[].direction | one of revenue, cost |
| items[].category | object |
| items[].category.key | string |
| items[].category.name | string |
| items[].scenario | object |
| items[].scenario.id | string |
| items[].scenario.name | string |
| items[].company | object | null |
| items[].company.id | string |
| items[].company.name | string |
| items[].kind | string |
| items[].lump_sum | boolean |
| items[].vat_rate_pct | number |
| items[].reverse_charge | boolean |
| items[].probability_pct | number |
| items[].payment_term_days | number |
| items[].amount_cents | number | null |
| items[].planned_date | string | null |
| items[].interval | string | null |
| items[].start_date | string | null |
| items[].end_date | string | null |
| items[].values | object |
| items[].comment | string | null |
| items[].archived | boolean |
| items[].contract | string | null |
| items[].url | string | null |
| page | integer |
| total | integer |
| has_more | boolean |
Schema
{
"type": "object",
"properties": {
"items": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"label": {
"type": "string"
},
"business_unit": {
"type": [
"string",
"null"
]
},
"direction": {
"type": "string",
"enum": [
"revenue",
"cost"
]
},
"category": {
"type": "object",
"properties": {
"key": {
"type": "string"
},
"name": {
"type": "string"
}
},
"required": [
"key",
"name"
],
"additionalProperties": false
},
"scenario": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"name": {
"type": "string"
}
},
"required": [
"id",
"name"
],
"additionalProperties": false
},
"company": {
"anyOf": [
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"name": {
"type": "string"
}
},
"required": [
"id",
"name"
],
"additionalProperties": false
},
{
"type": "null"
}
]
},
"kind": {
"type": "string"
},
"lump_sum": {
"type": "boolean"
},
"vat_rate_pct": {
"type": "number"
},
"reverse_charge": {
"type": "boolean"
},
"probability_pct": {
"type": "number"
},
"payment_term_days": {
"type": "number"
},
"amount_cents": {
"type": [
"number",
"null"
]
},
"planned_date": {
"type": [
"string",
"null"
]
},
"interval": {
"type": [
"string",
"null"
]
},
"start_date": {
"type": [
"string",
"null"
]
},
"end_date": {
"type": [
"string",
"null"
]
},
"values": {
"type": "object",
"propertyNames": {
"type": "string"
},
"additionalProperties": {
"type": "number"
}
},
"comment": {
"type": [
"string",
"null"
]
},
"archived": {
"type": "boolean"
},
"contract": {
"type": [
"string",
"null"
]
},
"url": {
"type": [
"string",
"null"
]
}
},
"required": [
"id",
"label",
"business_unit",
"direction",
"category",
"scenario",
"company",
"kind",
"lump_sum",
"vat_rate_pct",
"reverse_charge",
"probability_pct",
"payment_term_days",
"amount_cents",
"planned_date",
"interval",
"start_date",
"end_date",
"values",
"comment",
"archived",
"contract",
"url"
],
"additionalProperties": false
}
},
"page": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"total": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"has_more": {
"type": "boolean"
}
},
"required": [
"items",
"page",
"total",
"has_more"
],
"additionalProperties": false
}Refusals are problems with a code — see Errors.
POST/api/v1/finance/plan-itemsCreate plan item
Plans revenue or a cost without a contract, as the form on /finanzen/planung/neu does. label, scenario, category and kind are required -- business_unit defaults to the default unit -- and each kind needs its own fields (see the field descriptions). Never a category's lump sum: that is typed into the grid with set_plan_month_values. finance.manage only.scope finance:write
Body (JSON)
| labelrequired | string |
| scenariorequired | stringA scenario id from list_scenarios; not the CRM pipeline. |
| business_unit | stringName or id of a business unit (list_business_units). Default: the default unit. |
| categoryrequired | stringA category key from list_finance_categories. Its direction makes the item revenue or a cost. |
| company | string | nullA company id. Revenue needs a customer; a cost may name a supplier or none. |
| kindrequired | one of one_off, recurring, monthly_values |
| vat_rate_pct | numberDefault for a new item: the category's rate. |
| reverse_charge | boolean |
| probability_pct | numberRevenue only, rounded to steps of five; a cost is always certain. Default for a new item: 100. |
| payment_term_days | integerDefault for a new item: 14 for revenue, 0 for a cost. |
| amount_cents | integerone_off: the amount; recurring: the amount per interval. Net, in cents. |
| planned_date | string | nullone_off. |
| interval | one of monthly, yearlyrecurring. |
| start_date | string | nullrecurring. |
| end_date | string | nullrecurring, optional. |
| values_year | integermonthly_values: the year the values belong to. |
| values | objectmonthly_values: cents per month of values_year, e.g. {"2027-03": 120000}. A month left out is empty. |
| comment | string | null |
Response 200
| id | string |
| label | string |
| business_unit | string | null |
| direction | one of revenue, cost |
| category | object |
| category.key | string |
| category.name | string |
| scenario | object |
| scenario.id | string |
| scenario.name | string |
| company | object | null |
| company.id | string |
| company.name | string |
| kind | string |
| lump_sum | boolean |
| vat_rate_pct | number |
| reverse_charge | boolean |
| probability_pct | number |
| payment_term_days | number |
| amount_cents | number | null |
| planned_date | string | null |
| interval | string | null |
| start_date | string | null |
| end_date | string | null |
| values | object |
| comment | string | null |
| archived | boolean |
| contract | string | null |
| url | string | null |
Schema
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"label": {
"type": "string"
},
"business_unit": {
"type": [
"string",
"null"
]
},
"direction": {
"type": "string",
"enum": [
"revenue",
"cost"
]
},
"category": {
"type": "object",
"properties": {
"key": {
"type": "string"
},
"name": {
"type": "string"
}
},
"required": [
"key",
"name"
],
"additionalProperties": false
},
"scenario": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"name": {
"type": "string"
}
},
"required": [
"id",
"name"
],
"additionalProperties": false
},
"company": {
"anyOf": [
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"name": {
"type": "string"
}
},
"required": [
"id",
"name"
],
"additionalProperties": false
},
{
"type": "null"
}
]
},
"kind": {
"type": "string"
},
"lump_sum": {
"type": "boolean"
},
"vat_rate_pct": {
"type": "number"
},
"reverse_charge": {
"type": "boolean"
},
"probability_pct": {
"type": "number"
},
"payment_term_days": {
"type": "number"
},
"amount_cents": {
"type": [
"number",
"null"
]
},
"planned_date": {
"type": [
"string",
"null"
]
},
"interval": {
"type": [
"string",
"null"
]
},
"start_date": {
"type": [
"string",
"null"
]
},
"end_date": {
"type": [
"string",
"null"
]
},
"values": {
"type": "object",
"propertyNames": {
"type": "string"
},
"additionalProperties": {
"type": "number"
}
},
"comment": {
"type": [
"string",
"null"
]
},
"archived": {
"type": "boolean"
},
"contract": {
"type": [
"string",
"null"
]
},
"url": {
"type": [
"string",
"null"
]
}
},
"required": [
"id",
"label",
"business_unit",
"direction",
"category",
"scenario",
"company",
"kind",
"lump_sum",
"vat_rate_pct",
"reverse_charge",
"probability_pct",
"payment_term_days",
"amount_cents",
"planned_date",
"interval",
"start_date",
"end_date",
"values",
"comment",
"archived",
"contract",
"url"
],
"additionalProperties": false
}Refusals are problems with a code — see Errors.
PATCH/api/v1/finance/plan-items/{id}Update plan item
Changes a plan item with its own page: only the fields given, the rest stays as the item holds it. For monthly_values, values_year with values replaces that year's months (other years stay); switching to another kind drops every month value, recorded in the value history. An item does not switch between revenue and costs, and a category's lump sum is not edited here. finance.manage only.scope finance:write
Path
| idrequired | stringThe plan item's id, from list_plan_items or get_planning (whose grid rows key it as "planItem:<id>"; either form is accepted). |
Body (JSON)
| label | string |
| scenario | stringA scenario id from list_scenarios; not the CRM pipeline. |
| business_unit | stringName or id of a business unit (list_business_units). |
| category | stringA category key from list_finance_categories. Its direction makes the item revenue or a cost; an item keeps its direction. |
| company | string | nullA company id. Revenue needs a customer; a cost may name a supplier or none. |
| kind | one of one_off, recurring, monthly_valuesone_off (amount_cents on planned_date), recurring (amount_cents per interval from start_date), or monthly_values (values for values_year). |
| vat_rate_pct | numberDefault for a new item: the category's rate. |
| reverse_charge | boolean |
| probability_pct | numberRevenue only, rounded to steps of five; a cost is always certain. Default for a new item: 100. |
| payment_term_days | integerDefault for a new item: 14 for revenue, 0 for a cost. |
| amount_cents | integerone_off: the amount; recurring: the amount per interval. Net, in cents. |
| planned_date | string | nullone_off. |
| interval | one of monthly, yearlyrecurring. |
| start_date | string | nullrecurring. |
| end_date | string | nullrecurring, optional. |
| values_year | integermonthly_values: the year the values belong to. |
| values | objectmonthly_values: cents per month of values_year, e.g. {"2027-03": 120000}. A month left out is empty. |
| comment | string | null |
Response 200
| id | string |
| label | string |
| business_unit | string | null |
| direction | one of revenue, cost |
| category | object |
| category.key | string |
| category.name | string |
| scenario | object |
| scenario.id | string |
| scenario.name | string |
| company | object | null |
| company.id | string |
| company.name | string |
| kind | string |
| lump_sum | boolean |
| vat_rate_pct | number |
| reverse_charge | boolean |
| probability_pct | number |
| payment_term_days | number |
| amount_cents | number | null |
| planned_date | string | null |
| interval | string | null |
| start_date | string | null |
| end_date | string | null |
| values | object |
| comment | string | null |
| archived | boolean |
| contract | string | null |
| url | string | null |
Schema
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"label": {
"type": "string"
},
"business_unit": {
"type": [
"string",
"null"
]
},
"direction": {
"type": "string",
"enum": [
"revenue",
"cost"
]
},
"category": {
"type": "object",
"properties": {
"key": {
"type": "string"
},
"name": {
"type": "string"
}
},
"required": [
"key",
"name"
],
"additionalProperties": false
},
"scenario": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"name": {
"type": "string"
}
},
"required": [
"id",
"name"
],
"additionalProperties": false
},
"company": {
"anyOf": [
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"name": {
"type": "string"
}
},
"required": [
"id",
"name"
],
"additionalProperties": false
},
{
"type": "null"
}
]
},
"kind": {
"type": "string"
},
"lump_sum": {
"type": "boolean"
},
"vat_rate_pct": {
"type": "number"
},
"reverse_charge": {
"type": "boolean"
},
"probability_pct": {
"type": "number"
},
"payment_term_days": {
"type": "number"
},
"amount_cents": {
"type": [
"number",
"null"
]
},
"planned_date": {
"type": [
"string",
"null"
]
},
"interval": {
"type": [
"string",
"null"
]
},
"start_date": {
"type": [
"string",
"null"
]
},
"end_date": {
"type": [
"string",
"null"
]
},
"values": {
"type": "object",
"propertyNames": {
"type": "string"
},
"additionalProperties": {
"type": "number"
}
},
"comment": {
"type": [
"string",
"null"
]
},
"archived": {
"type": "boolean"
},
"contract": {
"type": [
"string",
"null"
]
},
"url": {
"type": [
"string",
"null"
]
}
},
"required": [
"id",
"label",
"business_unit",
"direction",
"category",
"scenario",
"company",
"kind",
"lump_sum",
"vat_rate_pct",
"reverse_charge",
"probability_pct",
"payment_term_days",
"amount_cents",
"planned_date",
"interval",
"start_date",
"end_date",
"values",
"comment",
"archived",
"contract",
"url"
],
"additionalProperties": false
}Refusals are problems with a code — see Errors.
POST/api/v1/finance/plan-items/{id}/archiveArchive plan item
Archives a plan item with its own page: it no longer counts in planning or the forecast. Nothing is deleted, so a past month's plan stays as it was. A category's lump sum is not archived. finance.manage only.scope finance:write
Path
| idrequired | stringThe plan item's id, from list_plan_items or get_planning (whose grid rows key it as "planItem:<id>"; either form is accepted). |
Response 200
| id | string |
| label | string |
| business_unit | string | null |
| direction | one of revenue, cost |
| category | object |
| category.key | string |
| category.name | string |
| scenario | object |
| scenario.id | string |
| scenario.name | string |
| company | object | null |
| company.id | string |
| company.name | string |
| kind | string |
| lump_sum | boolean |
| vat_rate_pct | number |
| reverse_charge | boolean |
| probability_pct | number |
| payment_term_days | number |
| amount_cents | number | null |
| planned_date | string | null |
| interval | string | null |
| start_date | string | null |
| end_date | string | null |
| values | object |
| comment | string | null |
| archived | boolean |
| contract | string | null |
| url | string | null |
Schema
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"label": {
"type": "string"
},
"business_unit": {
"type": [
"string",
"null"
]
},
"direction": {
"type": "string",
"enum": [
"revenue",
"cost"
]
},
"category": {
"type": "object",
"properties": {
"key": {
"type": "string"
},
"name": {
"type": "string"
}
},
"required": [
"key",
"name"
],
"additionalProperties": false
},
"scenario": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"name": {
"type": "string"
}
},
"required": [
"id",
"name"
],
"additionalProperties": false
},
"company": {
"anyOf": [
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"name": {
"type": "string"
}
},
"required": [
"id",
"name"
],
"additionalProperties": false
},
{
"type": "null"
}
]
},
"kind": {
"type": "string"
},
"lump_sum": {
"type": "boolean"
},
"vat_rate_pct": {
"type": "number"
},
"reverse_charge": {
"type": "boolean"
},
"probability_pct": {
"type": "number"
},
"payment_term_days": {
"type": "number"
},
"amount_cents": {
"type": [
"number",
"null"
]
},
"planned_date": {
"type": [
"string",
"null"
]
},
"interval": {
"type": [
"string",
"null"
]
},
"start_date": {
"type": [
"string",
"null"
]
},
"end_date": {
"type": [
"string",
"null"
]
},
"values": {
"type": "object",
"propertyNames": {
"type": "string"
},
"additionalProperties": {
"type": "number"
}
},
"comment": {
"type": [
"string",
"null"
]
},
"archived": {
"type": "boolean"
},
"contract": {
"type": [
"string",
"null"
]
},
"url": {
"type": [
"string",
"null"
]
}
},
"required": [
"id",
"label",
"business_unit",
"direction",
"category",
"scenario",
"company",
"kind",
"lump_sum",
"vat_rate_pct",
"reverse_charge",
"probability_pct",
"payment_term_days",
"amount_cents",
"planned_date",
"interval",
"start_date",
"end_date",
"values",
"comment",
"archived",
"contract",
"url"
],
"additionalProperties": false
}Refusals are problems with a code — see Errors.
PATCH/api/v1/finance/plan-items/{id}/monthsSet plan month values
Types an amount into a cell of the planning grid: one month of a category's lump sum (a monthly_values plan item with lump_sum true), or with to_year_end that month and every month to December. 0 empties the month. Every change is recorded in the value history. Items with their own page are changed with update_plan_item. finance.manage only.scope finance:write
Path
| idrequired | stringThe plan item's id, from list_plan_items or get_planning (whose grid rows key it as "planItem:<id>"; either form is accepted). |
Body (JSON)
| from_monthrequired | stringThe month, "YYYY-MM". |
| amount_centsrequired | integerNet amount in cents; the category gives the sign. |
| to_year_end | booleanAlso every following month to December of the same year. |
Response 200
| months_set | string[] |
| amount_cents | number |
| plan_item | object |
| plan_item.id | string |
| plan_item.label | string |
| plan_item.business_unit | string | null |
| plan_item.direction | one of revenue, cost |
| plan_item.category | object |
| plan_item.category.key | string |
| plan_item.category.name | string |
| plan_item.scenario | object |
| plan_item.scenario.id | string |
| plan_item.scenario.name | string |
| plan_item.company | object | null |
| plan_item.company.id | string |
| plan_item.company.name | string |
| plan_item.kind | string |
| plan_item.lump_sum | boolean |
| plan_item.vat_rate_pct | number |
| plan_item.reverse_charge | boolean |
| plan_item.probability_pct | number |
| plan_item.payment_term_days | number |
| plan_item.amount_cents | number | null |
| plan_item.planned_date | string | null |
| plan_item.interval | string | null |
| plan_item.start_date | string | null |
| plan_item.end_date | string | null |
| plan_item.values | object |
| plan_item.comment | string | null |
| plan_item.archived | boolean |
| plan_item.contract | string | null |
| plan_item.url | string | null |
Schema
{
"type": "object",
"properties": {
"months_set": {
"type": "array",
"items": {
"type": "string"
}
},
"amount_cents": {
"type": "number"
},
"plan_item": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"label": {
"type": "string"
},
"business_unit": {
"type": [
"string",
"null"
]
},
"direction": {
"type": "string",
"enum": [
"revenue",
"cost"
]
},
"category": {
"type": "object",
"properties": {
"key": {
"type": "string"
},
"name": {
"type": "string"
}
},
"required": [
"key",
"name"
],
"additionalProperties": false
},
"scenario": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"name": {
"type": "string"
}
},
"required": [
"id",
"name"
],
"additionalProperties": false
},
"company": {
"anyOf": [
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"name": {
"type": "string"
}
},
"required": [
"id",
"name"
],
"additionalProperties": false
},
{
"type": "null"
}
]
},
"kind": {
"type": "string"
},
"lump_sum": {
"type": "boolean"
},
"vat_rate_pct": {
"type": "number"
},
"reverse_charge": {
"type": "boolean"
},
"probability_pct": {
"type": "number"
},
"payment_term_days": {
"type": "number"
},
"amount_cents": {
"type": [
"number",
"null"
]
},
"planned_date": {
"type": [
"string",
"null"
]
},
"interval": {
"type": [
"string",
"null"
]
},
"start_date": {
"type": [
"string",
"null"
]
},
"end_date": {
"type": [
"string",
"null"
]
},
"values": {
"type": "object",
"propertyNames": {
"type": "string"
},
"additionalProperties": {
"type": "number"
}
},
"comment": {
"type": [
"string",
"null"
]
},
"archived": {
"type": "boolean"
},
"contract": {
"type": [
"string",
"null"
]
},
"url": {
"type": [
"string",
"null"
]
}
},
"required": [
"id",
"label",
"business_unit",
"direction",
"category",
"scenario",
"company",
"kind",
"lump_sum",
"vat_rate_pct",
"reverse_charge",
"probability_pct",
"payment_term_days",
"amount_cents",
"planned_date",
"interval",
"start_date",
"end_date",
"values",
"comment",
"archived",
"contract",
"url"
],
"additionalProperties": false
}
},
"required": [
"months_set",
"amount_cents",
"plan_item"
],
"additionalProperties": false
}Refusals are problems with a code — see Errors.
POST/api/v1/finance/plan-years/copyCopy plan year
Copies the month values of one business unit's year into another year, scaled by factor_pct (103 raises everything by three per cent): every active monthly_values plan item, lump sums and items with their own page alike. The target year is replaced, not merged -- months it held are overwritten or emptied, and every change is recorded in the value history. finance.manage only.scope finance:write
Body (JSON)
| business_unit | stringName or id of a business unit (list_business_units). Default: the default unit. |
| from_yearrequired | integer |
| to_yearrequired | integer |
| factor_pct | numberDefault: 100, an unchanged copy. |
Response 200
| business_unit | string |
| from_year | number |
| to_year | number |
| items | number |
| url | string |
Schema
{
"type": "object",
"properties": {
"business_unit": {
"type": "string"
},
"from_year": {
"type": "number"
},
"to_year": {
"type": "number"
},
"items": {
"type": "number"
},
"url": {
"type": "string"
}
},
"required": [
"business_unit",
"from_year",
"to_year",
"items",
"url"
],
"additionalProperties": false
}Refusals are problems with a code — see Errors.
GET/api/v1/finance/planningGet planning
The plan of one business unit and year, as /finanzen/planung shows it: per category the monthly costs and revenue of contracts, plan items and (weighted) pipeline, the totals and the year's result, what is not planned yet, and pricing problems. Without scenario: every scenario but the CRM pipeline. Plan item rows carry their id for the planning tools.scope finance:read
Query
| year | integerDefault: this year. |
| business_unit | stringName or id of a business unit (list_business_units). Default: the default unit. |
| scenario | stringA scenario id from list_scenarios: only that one. |
Response 200
| year | integer |
| business_unit | string |
| grid | object |
| grid.year | integer |
| grid.businessUnit | string |
| grid.months | string[] |
| grid.costSections[] | object[] |
| grid.costSections[].monthTotals | object |
| grid.costSections[].weightedMonthTotals | object |
| grid.costSections[].totalCents | integer |
| grid.costSections[].weightedTotalCents | integer |
| grid.costSections[].blockKey | string |
| grid.costSections[].blockName | string |
| grid.costSections[].rows[] | object[] |
| grid.revenueSections[] | object[] |
| grid.revenueSections[].monthTotals | object |
| grid.revenueSections[].weightedMonthTotals | object |
| grid.revenueSections[].totalCents | integer |
| grid.revenueSections[].weightedTotalCents | integer |
| grid.revenueSections[].blockKey | string |
| grid.revenueSections[].blockName | string |
| grid.revenueSections[].rows[] | object[] |
| grid.costTotal | object |
| grid.costTotal.monthTotals | object |
| grid.costTotal.weightedMonthTotals | object |
| grid.costTotal.totalCents | integer |
| grid.costTotal.weightedTotalCents | integer |
| grid.revenueTotal | object |
| grid.revenueTotal.monthTotals | object |
| grid.revenueTotal.weightedMonthTotals | object |
| grid.revenueTotal.totalCents | integer |
| grid.revenueTotal.weightedTotalCents | integer |
| scenarios[] | object[] |
| scenarios[].id | string |
| scenarios[].name | string |
| scenarios[].active | boolean |
| showsAll | boolean |
| figures | object |
| figures.costCents | integer |
| figures.revenueCents | integer |
| figures.revenueWeightedCents | integer |
| figures.resultCents | integer |
| unplanned | object |
| unplanned.sales | object |
| unplanned.sales.oneOffCents | integer |
| unplanned.sales.monthlyCents | integer |
| unplanned.sales.yearlyCents | integer |
| unplanned.purchase | object |
| unplanned.purchase.oneOffCents | integer |
| unplanned.purchase.monthlyCents | integer |
| unplanned.purchase.yearlyCents | integer |
| problems[] | object[] |
| problems[].key | string |
| problems[].label | string |
| problems[].message | string |
| problems[].href | string | null |
| missingScenarios[] | object[] |
| missingScenarios[].key | string |
| missingScenarios[].name | string |
| endedLines[] | object[] |
| endedLines[].key | string |
| endedLines[].label | string |
| endedLines[].message | string |
| endedLines[].href | string | null |
| itemHrefs | object |
| url | string |
Schema
{
"type": "object",
"properties": {
"year": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"business_unit": {
"type": "string"
},
"grid": {
"type": "object",
"properties": {
"year": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"businessUnit": {
"type": "string"
},
"months": {
"type": "array",
"items": {
"type": "string"
}
},
"costSections": {
"type": "array",
"items": {
"type": "object",
"properties": {
"monthTotals": {
"type": "object",
"propertyNames": {
"type": "string"
},
"additionalProperties": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
}
},
"weightedMonthTotals": {
"type": "object",
"propertyNames": {
"type": "string"
},
"additionalProperties": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
}
},
"totalCents": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"weightedTotalCents": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"blockKey": {
"type": "string"
},
"blockName": {
"type": "string"
},
"rows": {
"type": "array",
"items": {
"type": "object",
"properties": {
"categoryKey": {
"type": "string"
},
"name": {
"type": "string"
},
"values": {
"type": "object",
"propertyNames": {
"type": "string"
},
"additionalProperties": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
}
},
"weightedValues": {
"type": "object",
"propertyNames": {
"type": "string"
},
"additionalProperties": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
}
},
"totalCents": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"weightedTotalCents": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"items": {
"type": "array",
"items": {
"type": "object",
"properties": {
"key": {
"type": "string"
},
"owner": {
"anyOf": [
{
"type": "object",
"properties": {
"kind": {
"type": "string",
"const": "contract"
},
"id": {
"type": "string"
},
"title": {
"type": "string"
},
"lineLabel": {
"type": "string"
},
"effort": {
"type": "boolean"
}
},
"required": [
"kind",
"id",
"title",
"lineLabel"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"kind": {
"type": "string",
"const": "planItem"
},
"id": {
"type": "string"
},
"label": {
"type": "string"
},
"isLumpSum": {
"type": "boolean"
}
},
"required": [
"kind",
"id",
"label",
"isLumpSum"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"kind": {
"type": "string",
"enum": [
"quote",
"invoice",
"payable"
]
},
"id": {
"type": "string"
},
"label": {
"type": "string"
}
},
"required": [
"kind",
"id",
"label"
],
"additionalProperties": false
}
]
},
"label": {
"type": "string"
},
"editable": {
"type": "boolean"
},
"values": {
"type": "object",
"propertyNames": {
"type": "string"
},
"additionalProperties": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
}
},
"weightedValues": {
"type": "object",
"propertyNames": {
"type": "string"
},
"additionalProperties": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
}
},
"totalCents": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"weightedTotalCents": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
}
},
"required": [
"key",
"owner",
"label",
"editable",
"values",
"weightedValues",
"totalCents",
"weightedTotalCents"
],
"additionalProperties": false
}
}
},
"required": [
"categoryKey",
"name",
"values",
"weightedValues",
"totalCents",
"weightedTotalCents",
"items"
],
"additionalProperties": false
}
}
},
"required": [
"monthTotals",
"weightedMonthTotals",
"totalCents",
"weightedTotalCents",
"blockKey",
"blockName",
"rows"
],
"additionalProperties": false
}
},
"revenueSections": {
"type": "array",
"items": {
"type": "object",
"properties": {
"monthTotals": {
"type": "object",
"propertyNames": {
"type": "string"
},
"additionalProperties": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
}
},
"weightedMonthTotals": {
"type": "object",
"propertyNames": {
"type": "string"
},
"additionalProperties": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
}
},
"totalCents": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"weightedTotalCents": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"blockKey": {
"type": "string"
},
"blockName": {
"type": "string"
},
"rows": {
"type": "array",
"items": {
"type": "object",
"properties": {
"categoryKey": {
"type": "string"
},
"name": {
"type": "string"
},
"values": {
"type": "object",
"propertyNames": {
"type": "string"
},
"additionalProperties": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
}
},
"weightedValues": {
"type": "object",
"propertyNames": {
"type": "string"
},
"additionalProperties": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
}
},
"totalCents": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"weightedTotalCents": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"items": {
"type": "array",
"items": {
"type": "object",
"properties": {
"key": {
"type": "string"
},
"owner": {
"anyOf": [
{
"type": "object",
"properties": {
"kind": {
"type": "string",
"const": "contract"
},
"id": {
"type": "string"
},
"title": {
"type": "string"
},
"lineLabel": {
"type": "string"
},
"effort": {
"type": "boolean"
}
},
"required": [
"kind",
"id",
"title",
"lineLabel"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"kind": {
"type": "string",
"const": "planItem"
},
"id": {
"type": "string"
},
"label": {
"type": "string"
},
"isLumpSum": {
"type": "boolean"
}
},
"required": [
"kind",
"id",
"label",
"isLumpSum"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"kind": {
"type": "string",
"enum": [
"quote",
"invoice",
"payable"
]
},
"id": {
"type": "string"
},
"label": {
"type": "string"
}
},
"required": [
"kind",
"id",
"label"
],
"additionalProperties": false
}
]
},
"label": {
"type": "string"
},
"editable": {
"type": "boolean"
},
"values": {
"type": "object",
"propertyNames": {
"type": "string"
},
"additionalProperties": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
}
},
"weightedValues": {
"type": "object",
"propertyNames": {
"type": "string"
},
"additionalProperties": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
}
},
"totalCents": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"weightedTotalCents": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
}
},
"required": [
"key",
"owner",
"label",
"editable",
"values",
"weightedValues",
"totalCents",
"weightedTotalCents"
],
"additionalProperties": false
}
}
},
"required": [
"categoryKey",
"name",
"values",
"weightedValues",
"totalCents",
"weightedTotalCents",
"items"
],
"additionalProperties": false
}
}
},
"required": [
"monthTotals",
"weightedMonthTotals",
"totalCents",
"weightedTotalCents",
"blockKey",
"blockName",
"rows"
],
"additionalProperties": false
}
},
"costTotal": {
"type": "object",
"properties": {
"monthTotals": {
"type": "object",
"propertyNames": {
"type": "string"
},
"additionalProperties": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
}
},
"weightedMonthTotals": {
"type": "object",
"propertyNames": {
"type": "string"
},
"additionalProperties": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
}
},
"totalCents": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"weightedTotalCents": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
}
},
"required": [
"monthTotals",
"weightedMonthTotals",
"totalCents",
"weightedTotalCents"
],
"additionalProperties": false
},
"revenueTotal": {
"type": "object",
"properties": {
"monthTotals": {
"type": "object",
"propertyNames": {
"type": "string"
},
"additionalProperties": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
}
},
"weightedMonthTotals": {
"type": "object",
"propertyNames": {
"type": "string"
},
"additionalProperties": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
}
},
"totalCents": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"weightedTotalCents": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
}
},
"required": [
"monthTotals",
"weightedMonthTotals",
"totalCents",
"weightedTotalCents"
],
"additionalProperties": false
}
},
"required": [
"year",
"businessUnit",
"months",
"costSections",
"revenueSections",
"costTotal",
"revenueTotal"
],
"additionalProperties": false
},
"scenarios": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"name": {
"type": "string"
},
"active": {
"type": "boolean"
}
},
"required": [
"id",
"name",
"active"
],
"additionalProperties": false
}
},
"showsAll": {
"type": "boolean"
},
"figures": {
"type": "object",
"properties": {
"costCents": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"revenueCents": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"revenueWeightedCents": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"resultCents": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
}
},
"required": [
"costCents",
"revenueCents",
"revenueWeightedCents",
"resultCents"
],
"additionalProperties": false
},
"unplanned": {
"type": "object",
"properties": {
"sales": {
"type": "object",
"properties": {
"oneOffCents": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"monthlyCents": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"yearlyCents": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
}
},
"required": [
"oneOffCents",
"monthlyCents",
"yearlyCents"
],
"additionalProperties": false
},
"purchase": {
"type": "object",
"properties": {
"oneOffCents": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"monthlyCents": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"yearlyCents": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
}
},
"required": [
"oneOffCents",
"monthlyCents",
"yearlyCents"
],
"additionalProperties": false
}
},
"required": [
"sales",
"purchase"
],
"additionalProperties": false
},
"problems": {
"type": "array",
"items": {
"type": "object",
"properties": {
"key": {
"type": "string"
},
"label": {
"type": "string"
},
"message": {
"type": "string"
},
"href": {
"type": [
"string",
"null"
]
}
},
"required": [
"key",
"label",
"message",
"href"
],
"additionalProperties": false
}
},
"missingScenarios": {
"type": "array",
"items": {
"type": "object",
"properties": {
"key": {
"type": "string"
},
"name": {
"type": "string"
}
},
"required": [
"key",
"name"
],
"additionalProperties": false
}
},
"endedLines": {
"type": "array",
"items": {
"type": "object",
"properties": {
"key": {
"type": "string"
},
"label": {
"type": "string"
},
"message": {
"type": "string"
},
"href": {
"type": [
"string",
"null"
]
}
},
"required": [
"key",
"label",
"message",
"href"
],
"additionalProperties": false
}
},
"itemHrefs": {
"type": "object",
"propertyNames": {
"type": "string"
},
"additionalProperties": {
"type": "string"
}
},
"url": {
"type": "string"
}
},
"required": [
"year",
"business_unit",
"grid",
"scenarios",
"showsAll",
"figures",
"unplanned",
"problems",
"missingScenarios",
"endedLines",
"itemHrefs",
"url"
],
"additionalProperties": false
}Refusals are problems with a code — see Errors.
GET/api/v1/finance/scenariosList scenarios
Every scenario with its kind, whether it is on by default, archived or locked, how many plan items it holds, and its weighted revenue and costs in the year. System scenarios missing from the database are named.scope finance:read
Query
| year | integerDefault: this year. |
Response 200
| year | integer |
| scenarios[] | object[] |
| scenarios[].id | string |
| scenarios[].key | string | null |
| scenarios[].name | string |
| scenarios[].description | string | null |
| scenarios[].type | string |
| scenarios[].locked | boolean |
| scenarios[].activeByDefault | boolean |
| scenarios[].archived | boolean |
| scenarios[].planItemCount | integer |
| scenarios[].derived | boolean |
| scenarios[].revenueCents | integer |
| scenarios[].costCents | integer |
| missing_system_scenarios[] | object[] |
| missing_system_scenarios[].key | string |
| missing_system_scenarios[].name | string |
| url | string |
Schema
{
"type": "object",
"properties": {
"year": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"scenarios": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"key": {
"type": [
"string",
"null"
]
},
"name": {
"type": "string"
},
"description": {
"type": [
"string",
"null"
]
},
"type": {
"type": "string"
},
"locked": {
"type": "boolean"
},
"activeByDefault": {
"type": "boolean"
},
"archived": {
"type": "boolean"
},
"planItemCount": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"derived": {
"type": "boolean"
},
"revenueCents": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"costCents": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
}
},
"required": [
"id",
"key",
"name",
"description",
"type",
"locked",
"activeByDefault",
"archived",
"planItemCount",
"derived",
"revenueCents",
"costCents"
],
"additionalProperties": false
}
},
"missing_system_scenarios": {
"type": "array",
"items": {
"type": "object",
"properties": {
"key": {
"type": "string"
},
"name": {
"type": "string"
}
},
"required": [
"key",
"name"
],
"additionalProperties": false
}
},
"url": {
"type": "string"
}
},
"required": [
"year",
"scenarios",
"missing_system_scenarios",
"url"
],
"additionalProperties": false
}Refusals are problems with a code — see Errors.
POST/api/v1/finance/scenariosSave scenario
Creates a planning scenario (omit scenario; name is required) or edits one: only the fields given change. A system scenario keeps its name and description -- the calculation refers to it by key -- and only whether it is on by default in the liquidity forecast can change. Scenario ids come from list_scenarios. finance.manage only.scope finance:write
Body (JSON)
| scenario | stringThe scenario's id, from list_scenarios. Omit to create one. |
| name | string |
| description | stringAn empty string clears it. |
| active_by_default | booleanWhether the liquidity forecast starts with it ticked. Default for a new one: false. |
Response 200
| created | boolean |
| noteoptional | string |
| scenario | object |
| scenario.id | string |
| scenario.key | string | null |
| scenario.name | string |
| scenario.description | string | null |
| scenario.type | string |
| scenario.locked | boolean |
| scenario.active_by_default | boolean |
| scenario.archived | boolean |
| scenario.plan_items | number |
| scenario.url | string |
Schema
{
"type": "object",
"properties": {
"created": {
"type": "boolean"
},
"note": {
"type": "string"
},
"scenario": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"key": {
"type": [
"string",
"null"
]
},
"name": {
"type": "string"
},
"description": {
"type": [
"string",
"null"
]
},
"type": {
"type": "string"
},
"locked": {
"type": "boolean"
},
"active_by_default": {
"type": "boolean"
},
"archived": {
"type": "boolean"
},
"plan_items": {
"type": "number"
},
"url": {
"type": "string"
}
},
"required": [
"id",
"key",
"name",
"description",
"type",
"locked",
"active_by_default",
"archived",
"plan_items",
"url"
],
"additionalProperties": false
}
},
"required": [
"created",
"scenario"
],
"additionalProperties": false
}Refusals are problems with a code — see Errors.
POST/api/v1/finance/scenarios/{id}/removeRemove scenario
Removes a scenario as the page does: one that never held a plan item is deleted, any other is archived, which keeps its plan items' amounts (restore_scenario brings it back). The answer says which happened. System scenarios cannot be removed. finance.manage only.scope finance:write
Path
| idrequired | stringThe scenario's id, from list_scenarios. |
Response 200
| outcome | string |
| message | string |
Schema
{
"anyOf": [
{
"type": "object",
"properties": {
"outcome": {
"type": "string",
"const": "deleted"
},
"message": {
"type": "string"
}
},
"required": [
"outcome",
"message"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"outcome": {
"type": "string",
"const": "archived"
},
"message": {
"type": "string"
},
"scenario": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"key": {
"type": [
"string",
"null"
]
},
"name": {
"type": "string"
},
"description": {
"type": [
"string",
"null"
]
},
"type": {
"type": "string"
},
"locked": {
"type": "boolean"
},
"active_by_default": {
"type": "boolean"
},
"archived": {
"type": "boolean"
},
"plan_items": {
"type": "number"
},
"url": {
"type": "string"
}
},
"required": [
"id",
"key",
"name",
"description",
"type",
"locked",
"active_by_default",
"archived",
"plan_items",
"url"
],
"additionalProperties": false
}
},
"required": [
"outcome",
"message",
"scenario"
],
"additionalProperties": false
}
]
}Refusals are problems with a code — see Errors.
POST/api/v1/finance/scenarios/{id}/restoreRestore scenario
Brings an archived scenario back. finance.manage only.scope finance:write
Path
| idrequired | stringThe scenario's id, from list_scenarios with archived ones. |
Response 200
| scenario | object |
| scenario.id | string |
| scenario.key | string | null |
| scenario.name | string |
| scenario.description | string | null |
| scenario.type | string |
| scenario.locked | boolean |
| scenario.active_by_default | boolean |
| scenario.archived | boolean |
| scenario.plan_items | number |
| scenario.url | string |
Schema
{
"type": "object",
"properties": {
"scenario": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"key": {
"type": [
"string",
"null"
]
},
"name": {
"type": "string"
},
"description": {
"type": [
"string",
"null"
]
},
"type": {
"type": "string"
},
"locked": {
"type": "boolean"
},
"active_by_default": {
"type": "boolean"
},
"archived": {
"type": "boolean"
},
"plan_items": {
"type": "number"
},
"url": {
"type": "string"
}
},
"required": [
"id",
"key",
"name",
"description",
"type",
"locked",
"active_by_default",
"archived",
"plan_items",
"url"
],
"additionalProperties": false
}
},
"required": [
"scenario"
],
"additionalProperties": false
}Refusals are problems with a code — see Errors.
GET/api/v1/finance/settingsGet finance settings
The billing settings -- notice proposals of § 6 (months for maintenance and support, weeks for ongoing consulting), the payment term of § 5 (8), the cost center of each business unit by name, and how many contracts of each unit have no cost center -- and the VAT settings: accrual or cash, monthly or quarterly, permanent extension, due day.scope finance:read
Response 200
| billing | object |
| billing.notice_months_recurring | number |
| billing.notice_weeks_time_material | number |
| billing.payment_term_days | number |
| billing.cost_centers | object |
| billing.contracts_without_cost_center | object |
| billing.url | string |
| billing.cost_centers_url | string |
| vat | object |
| vat.method | one of accrual, cash |
| vat.period | one of monthly, quarterly |
| vat.permanent_extension | boolean |
| vat.due_day | number |
| vat.url | string |
Schema
{
"type": "object",
"properties": {
"billing": {
"type": "object",
"properties": {
"notice_months_recurring": {
"type": "number"
},
"notice_weeks_time_material": {
"type": "number"
},
"payment_term_days": {
"type": "number"
},
"cost_centers": {
"type": "object",
"propertyNames": {
"type": "string"
},
"additionalProperties": {
"type": [
"string",
"null"
]
}
},
"contracts_without_cost_center": {
"type": "object",
"propertyNames": {
"type": "string"
},
"additionalProperties": {
"type": "number"
}
},
"url": {
"type": "string"
},
"cost_centers_url": {
"type": "string"
}
},
"required": [
"notice_months_recurring",
"notice_weeks_time_material",
"payment_term_days",
"cost_centers",
"contracts_without_cost_center",
"url",
"cost_centers_url"
],
"additionalProperties": false
},
"vat": {
"type": "object",
"properties": {
"method": {
"type": "string",
"enum": [
"accrual",
"cash"
]
},
"period": {
"type": "string",
"enum": [
"monthly",
"quarterly"
]
},
"permanent_extension": {
"type": "boolean"
},
"due_day": {
"type": "number"
},
"url": {
"type": "string"
}
},
"required": [
"method",
"period",
"permanent_extension",
"due_day",
"url"
],
"additionalProperties": false
}
},
"required": [
"billing",
"vat"
],
"additionalProperties": false
}Refusals are problems with a code — see Errors.
PATCH/api/v1/finance/settings/billingSave billing settings
Changes the billing settings and business units' cost centers: only the fields given, the rest stays. They are proposals for new customer orders and contracts; existing contracts do not change. finance.manage only.scope finance:write
Body (JSON)
| notice_months_recurring | integer§ 6 (2), maintenance and support: 1 to 24 months. |
| notice_weeks_time_material | integer§ 6 (3), ongoing consulting: 1 to 52 weeks. |
| payment_term_days | integer§ 5 (8), for companies without their own: 0 to 120 days. |
| cost_centers | objectPer business unit by name or id (list_business_units), e.g. {"ITS": "200"}: 1 to 8 letters or digits, or null for none. A unit left out keeps its own. |
Response 200
| notice_months_recurring | number |
| notice_weeks_time_material | number |
| payment_term_days | number |
| cost_centers | object |
| contracts_without_cost_center | object |
| url | string |
| cost_centers_url | string |
Schema
{
"type": "object",
"properties": {
"notice_months_recurring": {
"type": "number"
},
"notice_weeks_time_material": {
"type": "number"
},
"payment_term_days": {
"type": "number"
},
"cost_centers": {
"type": "object",
"propertyNames": {
"type": "string"
},
"additionalProperties": {
"type": [
"string",
"null"
]
}
},
"contracts_without_cost_center": {
"type": "object",
"propertyNames": {
"type": "string"
},
"additionalProperties": {
"type": "number"
}
},
"url": {
"type": "string"
},
"cost_centers_url": {
"type": "string"
}
},
"required": [
"notice_months_recurring",
"notice_weeks_time_material",
"payment_term_days",
"cost_centers",
"contracts_without_cost_center",
"url",
"cost_centers_url"
],
"additionalProperties": false
}Refusals are problems with a code — see Errors.
PATCH/api/v1/finance/settings/vatSave vat settings
Changes how VAT is owed, as the company is registered: only the fields given, the rest stays. It moves the VAT payments in the liquidity forecast. finance.manage only.scope finance:write
Body (JSON)
| method | one of accrual, cashaccrual (Sollversteuerung) or cash (Istversteuerung). |
| period | one of monthly, quarterlymonthly or quarterly returns. |
| permanent_extension | booleanDauerfristverlängerung: every due date one month later. |
| due_day | integerDay of the month the payment is due: 1 to 28. |
Response 200
| method | one of accrual, cash |
| period | one of monthly, quarterly |
| permanent_extension | boolean |
| due_day | number |
| url | string |
Schema
{
"type": "object",
"properties": {
"method": {
"type": "string",
"enum": [
"accrual",
"cash"
]
},
"period": {
"type": "string",
"enum": [
"monthly",
"quarterly"
]
},
"permanent_extension": {
"type": "boolean"
},
"due_day": {
"type": "number"
},
"url": {
"type": "string"
}
},
"required": [
"method",
"period",
"permanent_extension",
"due_day",
"url"
],
"additionalProperties": false
}Refusals are problems with a code — see Errors.