Zum Inhalt

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

yearintegerDefault: this year.
business_unitstringName or id of a business unit (list_business_units). Default: every unit.

Response 200

yearinteger
business_unitstring | null
reporting_monthstring | null
monthsstring[]
comparedboolean
rows[]object[]
rows[].bwaLineKeystring
rows[].labelstring
rows[].typestring
rows[].planCentsinteger
rows[].actualCentsinteger
rows[].deltaCentsinteger
rows[].deltaPercentnumber | null
rows[].contributors[]object[]
rows[].contributors[].keystring
rows[].contributors[].namestring
rows[].contributors[].centsinteger
imports[]object[]
imports[].idstring
imports[].monthstring
imports[].statusstring
imports[].filestring | null
imports[].uploaded_atstring
urlstring
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)

keystringThe block's key, from list_finance_categories. Omit to create one.
namestring
directionone of cost, revenueOnly for a new block.
sortintegerDefault for a new one: after the others.

Response 200

createdboolean
blockobject
block.keystring
block.namestring
block.directionstring
block.sortnumber
block.urlstring
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)

textrequiredstringThe BWA as text (CSV / exported table, German number format).
monthstringThe month the BWA is for. Omit to take the month named in the document.
file_namestringName of the source file, kept with the import. Default "bwa.csv".

Response 200

importstring
statusstring
countsboolean
monthstring
file_namestring
matchednumber
rows[]object[]
rows[].bwa_linestring
rows[].labelstring
rows[].amount_month_centsnumber
rows[].amount_ytd_centsnumber
unmatchedstring[]
warningsstring[]
nextstring
urlstring
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

idrequiredstringThe import's id, as upload_bwa or get_actuals give it.

Response 200

importstring
statusstring
monthstring
supersedednumber
urlstring
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

idrequiredstringThe import's id, as upload_bwa or get_actuals give it.

Response 200

importstring
discardedboolean
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_archivedboolean

Response 200

categories[]object[]
categories[].keystring
categories[].namestring
categories[].directionstring
categories[].blockstring
categories[].bwa_linestring | null
categories[].scalingstring
categories[].affects_pnlboolean
categories[].archivedboolean
blocks[]object[]
blocks[].keystring
blocks[].namestring
blocks[].sortinteger
blocks[].directionstring
bwa_lines[]object[]
bwa_lines[].keystring
bwa_lines[].labelstring
bwa_lines[].typestring
urlstring
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)

keystringThe category's key, from list_finance_categories. Omit to create one.
namestring
directionone of cost, revenueOnly for a new category.
blockstringA block key of the same direction.
scalingone of FIX, SEMI_FIX, VARIABLEFIX, SEMI_FIX or VARIABLE. Default for a new one: FIX.
bwa_linestring | nullA BWA line key of the matching type, or null for none. Dropped when affects_pnl is false.
affects_pnlbooleanfalse for money that only moves liquidity, e.g. a repayment. Default for a new one: true.
sortintegerDefault for a new one: after the others.
default_vat_rate_pctnumberVAT proposal for new plan items and contract lines, e.g. 19, 7, 0. Default for a new one: 19.

Response 200

createdboolean
categoryobject
category.keystring
category.namestring
category.directionstring
category.blockstring
category.bwa_linestring | null
category.scalingstring
category.affects_pnlboolean
category.sortnumber
category.default_vat_rate_pctnumber
category.archivedboolean
category.lump_sums[]object[]
category.lump_sums[].plan_itemstring
category.lump_sums[].business_unitstring | null
category.lump_sums[].archivedboolean
category.urlstring
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

idrequiredstringThe category's key, from list_finance_categories.

Response 200

categoryobject
category.keystring
category.namestring
category.directionstring
category.blockstring
category.bwa_linestring | null
category.scalingstring
category.affects_pnlboolean
category.sortnumber
category.default_vat_rate_pctnumber
category.archivedboolean
category.lump_sums[]object[]
category.lump_sums[].plan_itemstring
category.lump_sums[].business_unitstring | null
category.lump_sums[].archivedboolean
category.urlstring
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

idrequiredstringThe category's key, from list_finance_categories with include_archived.

Response 200

categoryobject
category.keystring
category.namestring
category.directionstring
category.blockstring
category.bwa_linestring | null
category.scalingstring
category.affects_pnlboolean
category.sortnumber
category.default_vat_rate_pctnumber
category.archivedboolean
category.lump_sums[]object[]
category.lump_sums[].plan_itemstring
category.lump_sums[].business_unitstring | null
category.lump_sums[].archivedboolean
category.urlstring
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_unitrequiredstringName or id of a business unit (list_business_units).

Response 200

business_unitstring
cost_centerstring
contracts_fillednumber
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

monthsnumberDefault: 12.
business_unitstringName or id of a business unit (list_business_units). Default: every unit.
scenariosstring[]Scenario ids switched on. Default: those active by default.

Response 200

monthsstring[]
scenarios[]object[]
scenarios[].idstring
scenarios[].namestring
scenarios[].lockedboolean
scenarios[].onboolean
scenarios[].toggleIdsstring[]
onIdsstring[]
forecastobject
forecast.months[]object[]
forecast.months[].monthstring
forecast.months[].openingCentsinteger
forecast.months[].inflowCentsinteger
forecast.months[].inflowByScenarioobject
forecast.months[].outflowCentsinteger
forecast.months[].outflowByBlockobject
forecast.months[].vatCentsinteger
forecast.months[].netCentsinteger
forecast.months[].closingCentsinteger
forecast.lowestobject | null
forecast.lowest.monthstring
forecast.lowest.openingCentsinteger
forecast.lowest.inflowCentsinteger
forecast.lowest.inflowByScenarioobject
forecast.lowest.outflowCentsinteger
forecast.lowest.outflowByBlockobject
forecast.lowest.vatCentsinteger
forecast.lowest.netCentsinteger
forecast.lowest.closingCentsinteger
forecast.goesNegativeboolean
openingobject
opening.totalCentsinteger
opening.datestring | null
opening.accounts[]object[]
opening.accounts[].accountIdstring | null
opening.accounts[].namestring | null
opening.accounts[].datestring
opening.accounts[].balanceCentsinteger
inflowColumns[]object[]
inflowColumns[].keystring
inflowColumns[].namestring
outflowColumns[]object[]
outflowColumns[].keystring
outflowColumns[].namestring
unplannedobject
unplanned.salesobject
unplanned.sales.oneOffCentsinteger
unplanned.sales.monthlyCentsinteger
unplanned.sales.yearlyCentsinteger
unplanned.purchaseobject
unplanned.purchase.oneOffCentsinteger
unplanned.purchase.monthlyCentsinteger
unplanned.purchase.yearlyCentsinteger
problems[]object[]
problems[].keystring
problems[].labelstring
problems[].messagestring
problems[].hrefstring | null
missingScenarios[]object[]
missingScenarios[].keystring
missingScenarios[].namestring
endedLines[]object[]
endedLines[].keystring
endedLines[].labelstring
endedLines[].messagestring
endedLines[].hrefstring | null
accuracy[]object[]
accuracy[].monthstring
accuracy[].forecastCentsinteger
accuracy[].actualCentsinteger
accuracy[].deltaCentsinteger
ignoresUnassignedSnapshotsboolean
urlstring
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_unitstringName or id of a business unit (list_business_units).
scenariostringA scenario id from list_scenarios.
categorystringA category key from list_finance_categories.
kindone of one_off, recurring, monthly_values
lump_sumbooleantrue: only lump sums; false: only items with their own page.
searchstringPart of the label.
include_archivedboolean
pageinteger1-based page of 50 rows. Omit for the first page.

Response 200

items[]object[]
items[].idstring
items[].labelstring
items[].business_unitstring | null
items[].directionone of revenue, cost
items[].categoryobject
items[].category.keystring
items[].category.namestring
items[].scenarioobject
items[].scenario.idstring
items[].scenario.namestring
items[].companyobject | null
items[].company.idstring
items[].company.namestring
items[].kindstring
items[].lump_sumboolean
items[].vat_rate_pctnumber
items[].reverse_chargeboolean
items[].probability_pctnumber
items[].payment_term_daysnumber
items[].amount_centsnumber | null
items[].planned_datestring | null
items[].intervalstring | null
items[].start_datestring | null
items[].end_datestring | null
items[].valuesobject
items[].commentstring | null
items[].archivedboolean
items[].contractstring | null
items[].urlstring | null
pageinteger
totalinteger
has_moreboolean
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)

labelrequiredstring
scenariorequiredstringA scenario id from list_scenarios; not the CRM pipeline.
business_unitstringName or id of a business unit (list_business_units). Default: the default unit.
categoryrequiredstringA category key from list_finance_categories. Its direction makes the item revenue or a cost.
companystring | nullA company id. Revenue needs a customer; a cost may name a supplier or none.
kindrequiredone of one_off, recurring, monthly_values
vat_rate_pctnumberDefault for a new item: the category's rate.
reverse_chargeboolean
probability_pctnumberRevenue only, rounded to steps of five; a cost is always certain. Default for a new item: 100.
payment_term_daysintegerDefault for a new item: 14 for revenue, 0 for a cost.
amount_centsintegerone_off: the amount; recurring: the amount per interval. Net, in cents.
planned_datestring | nullone_off.
intervalone of monthly, yearlyrecurring.
start_datestring | nullrecurring.
end_datestring | nullrecurring, optional.
values_yearintegermonthly_values: the year the values belong to.
valuesobjectmonthly_values: cents per month of values_year, e.g. {"2027-03": 120000}. A month left out is empty.
commentstring | null

Response 200

idstring
labelstring
business_unitstring | null
directionone of revenue, cost
categoryobject
category.keystring
category.namestring
scenarioobject
scenario.idstring
scenario.namestring
companyobject | null
company.idstring
company.namestring
kindstring
lump_sumboolean
vat_rate_pctnumber
reverse_chargeboolean
probability_pctnumber
payment_term_daysnumber
amount_centsnumber | null
planned_datestring | null
intervalstring | null
start_datestring | null
end_datestring | null
valuesobject
commentstring | null
archivedboolean
contractstring | null
urlstring | 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

idrequiredstringThe 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)

labelstring
scenariostringA scenario id from list_scenarios; not the CRM pipeline.
business_unitstringName or id of a business unit (list_business_units).
categorystringA category key from list_finance_categories. Its direction makes the item revenue or a cost; an item keeps its direction.
companystring | nullA company id. Revenue needs a customer; a cost may name a supplier or none.
kindone 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_pctnumberDefault for a new item: the category's rate.
reverse_chargeboolean
probability_pctnumberRevenue only, rounded to steps of five; a cost is always certain. Default for a new item: 100.
payment_term_daysintegerDefault for a new item: 14 for revenue, 0 for a cost.
amount_centsintegerone_off: the amount; recurring: the amount per interval. Net, in cents.
planned_datestring | nullone_off.
intervalone of monthly, yearlyrecurring.
start_datestring | nullrecurring.
end_datestring | nullrecurring, optional.
values_yearintegermonthly_values: the year the values belong to.
valuesobjectmonthly_values: cents per month of values_year, e.g. {"2027-03": 120000}. A month left out is empty.
commentstring | null

Response 200

idstring
labelstring
business_unitstring | null
directionone of revenue, cost
categoryobject
category.keystring
category.namestring
scenarioobject
scenario.idstring
scenario.namestring
companyobject | null
company.idstring
company.namestring
kindstring
lump_sumboolean
vat_rate_pctnumber
reverse_chargeboolean
probability_pctnumber
payment_term_daysnumber
amount_centsnumber | null
planned_datestring | null
intervalstring | null
start_datestring | null
end_datestring | null
valuesobject
commentstring | null
archivedboolean
contractstring | null
urlstring | 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

idrequiredstringThe 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

idstring
labelstring
business_unitstring | null
directionone of revenue, cost
categoryobject
category.keystring
category.namestring
scenarioobject
scenario.idstring
scenario.namestring
companyobject | null
company.idstring
company.namestring
kindstring
lump_sumboolean
vat_rate_pctnumber
reverse_chargeboolean
probability_pctnumber
payment_term_daysnumber
amount_centsnumber | null
planned_datestring | null
intervalstring | null
start_datestring | null
end_datestring | null
valuesobject
commentstring | null
archivedboolean
contractstring | null
urlstring | 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

idrequiredstringThe 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_monthrequiredstringThe month, "YYYY-MM".
amount_centsrequiredintegerNet amount in cents; the category gives the sign.
to_year_endbooleanAlso every following month to December of the same year.

Response 200

months_setstring[]
amount_centsnumber
plan_itemobject
plan_item.idstring
plan_item.labelstring
plan_item.business_unitstring | null
plan_item.directionone of revenue, cost
plan_item.categoryobject
plan_item.category.keystring
plan_item.category.namestring
plan_item.scenarioobject
plan_item.scenario.idstring
plan_item.scenario.namestring
plan_item.companyobject | null
plan_item.company.idstring
plan_item.company.namestring
plan_item.kindstring
plan_item.lump_sumboolean
plan_item.vat_rate_pctnumber
plan_item.reverse_chargeboolean
plan_item.probability_pctnumber
plan_item.payment_term_daysnumber
plan_item.amount_centsnumber | null
plan_item.planned_datestring | null
plan_item.intervalstring | null
plan_item.start_datestring | null
plan_item.end_datestring | null
plan_item.valuesobject
plan_item.commentstring | null
plan_item.archivedboolean
plan_item.contractstring | null
plan_item.urlstring | 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_unitstringName or id of a business unit (list_business_units). Default: the default unit.
from_yearrequiredinteger
to_yearrequiredinteger
factor_pctnumberDefault: 100, an unchanged copy.

Response 200

business_unitstring
from_yearnumber
to_yearnumber
itemsnumber
urlstring
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

yearintegerDefault: this year.
business_unitstringName or id of a business unit (list_business_units). Default: the default unit.
scenariostringA scenario id from list_scenarios: only that one.

Response 200

yearinteger
business_unitstring
gridobject
grid.yearinteger
grid.businessUnitstring
grid.monthsstring[]
grid.costSections[]object[]
grid.costSections[].monthTotalsobject
grid.costSections[].weightedMonthTotalsobject
grid.costSections[].totalCentsinteger
grid.costSections[].weightedTotalCentsinteger
grid.costSections[].blockKeystring
grid.costSections[].blockNamestring
grid.costSections[].rows[]object[]
grid.revenueSections[]object[]
grid.revenueSections[].monthTotalsobject
grid.revenueSections[].weightedMonthTotalsobject
grid.revenueSections[].totalCentsinteger
grid.revenueSections[].weightedTotalCentsinteger
grid.revenueSections[].blockKeystring
grid.revenueSections[].blockNamestring
grid.revenueSections[].rows[]object[]
grid.costTotalobject
grid.costTotal.monthTotalsobject
grid.costTotal.weightedMonthTotalsobject
grid.costTotal.totalCentsinteger
grid.costTotal.weightedTotalCentsinteger
grid.revenueTotalobject
grid.revenueTotal.monthTotalsobject
grid.revenueTotal.weightedMonthTotalsobject
grid.revenueTotal.totalCentsinteger
grid.revenueTotal.weightedTotalCentsinteger
scenarios[]object[]
scenarios[].idstring
scenarios[].namestring
scenarios[].activeboolean
showsAllboolean
figuresobject
figures.costCentsinteger
figures.revenueCentsinteger
figures.revenueWeightedCentsinteger
figures.resultCentsinteger
unplannedobject
unplanned.salesobject
unplanned.sales.oneOffCentsinteger
unplanned.sales.monthlyCentsinteger
unplanned.sales.yearlyCentsinteger
unplanned.purchaseobject
unplanned.purchase.oneOffCentsinteger
unplanned.purchase.monthlyCentsinteger
unplanned.purchase.yearlyCentsinteger
problems[]object[]
problems[].keystring
problems[].labelstring
problems[].messagestring
problems[].hrefstring | null
missingScenarios[]object[]
missingScenarios[].keystring
missingScenarios[].namestring
endedLines[]object[]
endedLines[].keystring
endedLines[].labelstring
endedLines[].messagestring
endedLines[].hrefstring | null
itemHrefsobject
urlstring
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

yearintegerDefault: this year.

Response 200

yearinteger
scenarios[]object[]
scenarios[].idstring
scenarios[].keystring | null
scenarios[].namestring
scenarios[].descriptionstring | null
scenarios[].typestring
scenarios[].lockedboolean
scenarios[].activeByDefaultboolean
scenarios[].archivedboolean
scenarios[].planItemCountinteger
scenarios[].derivedboolean
scenarios[].revenueCentsinteger
scenarios[].costCentsinteger
missing_system_scenarios[]object[]
missing_system_scenarios[].keystring
missing_system_scenarios[].namestring
urlstring
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)

scenariostringThe scenario's id, from list_scenarios. Omit to create one.
namestring
descriptionstringAn empty string clears it.
active_by_defaultbooleanWhether the liquidity forecast starts with it ticked. Default for a new one: false.

Response 200

createdboolean
noteoptionalstring
scenarioobject
scenario.idstring
scenario.keystring | null
scenario.namestring
scenario.descriptionstring | null
scenario.typestring
scenario.lockedboolean
scenario.active_by_defaultboolean
scenario.archivedboolean
scenario.plan_itemsnumber
scenario.urlstring
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

idrequiredstringThe scenario's id, from list_scenarios.

Response 200

outcomestring
messagestring
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

idrequiredstringThe scenario's id, from list_scenarios with archived ones.

Response 200

scenarioobject
scenario.idstring
scenario.keystring | null
scenario.namestring
scenario.descriptionstring | null
scenario.typestring
scenario.lockedboolean
scenario.active_by_defaultboolean
scenario.archivedboolean
scenario.plan_itemsnumber
scenario.urlstring
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

billingobject
billing.notice_months_recurringnumber
billing.notice_weeks_time_materialnumber
billing.payment_term_daysnumber
billing.cost_centersobject
billing.contracts_without_cost_centerobject
billing.urlstring
billing.cost_centers_urlstring
vatobject
vat.methodone of accrual, cash
vat.periodone of monthly, quarterly
vat.permanent_extensionboolean
vat.due_daynumber
vat.urlstring
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_recurringinteger§ 6 (2), maintenance and support: 1 to 24 months.
notice_weeks_time_materialinteger§ 6 (3), ongoing consulting: 1 to 52 weeks.
payment_term_daysinteger§ 5 (8), for companies without their own: 0 to 120 days.
cost_centersobjectPer 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_recurringnumber
notice_weeks_time_materialnumber
payment_term_daysnumber
cost_centersobject
contracts_without_cost_centerobject
urlstring
cost_centers_urlstring
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)

methodone of accrual, cashaccrual (Sollversteuerung) or cash (Istversteuerung).
periodone of monthly, quarterlymonthly or quarterly returns.
permanent_extensionbooleanDauerfristverlängerung: every due date one month later.
due_dayintegerDay of the month the payment is due: 1 to 28.

Response 200

methodone of accrual, cash
periodone of monthly, quarterly
permanent_extensionboolean
due_daynumber
urlstring
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.