Zum Inhalt
HALOWERK

Finopswerk

cost category shared split ledger

Originalnonnegativecostlines/tagdomains andorderedliteralrules produce firstmatchcategories,beforecosts,oneSharedsourceEven/Fixed/Originaltarget-Proportionalexactrationaltransfersandafterledger. Ownreducedrationalaudit,no nativecentrounding/CUR/invoice/bill/actualAWSaccountcertification. ZeroProportionalweight undefined,neverfabricatedfallback;knownbeforeerrors remainnegative. SingleSource/2targets,noinheritedcategories/negativecredits/FX. Strictrecursive.

POST https://finops.halowerk.com/v1/cost-category-shared-split-ledger

Eingaben

Felder des veröffentlichten Eingabeschemas
FeldTypPflichtBeschreibung
linesarrayJa
category_rulesarrayJa
methodSiehe SchemaJa
fixed_bpsarrayJa
reportobjectJa
Vollständiges Eingabeschema anzeigen
{
  "type": "object",
  "properties": {
    "lines": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "amount": {
            "type": "integer",
            "minimum": 0,
            "maximum": 1000000
          },
          "tags_domain": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "team": {
                  "enum": [
                    "s",
                    "a",
                    "b",
                    "none"
                  ]
                },
                "kind": {
                  "enum": [
                    "shared",
                    "direct",
                    "none"
                  ]
                }
              },
              "required": [
                "team",
                "kind"
              ],
              "additionalProperties": false
            },
            "minItems": 1,
            "maxItems": 2
          }
        },
        "required": [
          "amount",
          "tags_domain"
        ],
        "additionalProperties": false
      },
      "minItems": 1,
      "maxItems": 8
    },
    "category_rules": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "key": {
            "enum": [
              "team",
              "kind"
            ]
          },
          "equals": {
            "enum": [
              "s",
              "a",
              "b",
              "none",
              "shared",
              "direct"
            ]
          },
          "category": {
            "enum": [
              "s",
              "a",
              "b"
            ]
          }
        },
        "required": [
          "key",
          "equals",
          "category"
        ],
        "additionalProperties": false
      },
      "minItems": 1,
      "maxItems": 3
    },
    "method": {
      "enum": [
        "even",
        "fixed",
        "proportional"
      ]
    },
    "fixed_bps": {
      "type": "array",
      "items": {
        "type": "integer",
        "minimum": 0,
        "maximum": 10000
      },
      "minItems": 0,
      "maxItems": 2
    },
    "report": {
      "type": "object",
      "properties": {
        "line_categories": {
          "type": "array",
          "items": {
            "anyOf": [
              {
                "enum": [
                  "s",
                  "a",
                  "b",
                  "u"
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "minItems": 1,
          "maxItems": 8
        },
        "before": {
          "type": "object",
          "properties": {
            "s": {
              "anyOf": [
                {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 8000000
                },
                {
                  "type": "null"
                }
              ]
            },
            "a": {
              "anyOf": [
                {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 8000000
                },
                {
                  "type": "null"
                }
              ]
            },
            "b": {
              "anyOf": [
                {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 8000000
                },
                {
                  "type": "null"
                }
              ]
            },
            "u": {
              "anyOf": [
                {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 8000000
                },
                {
                  "type": "null"
                }
              ]
            }
          },
          "required": [
            "s",
            "a",
            "b",
            "u"
          ],
          "additionalProperties": false
        },
        "transfers": {
          "type": "object",
          "properties": {
            "a": {
              "type": "object",
              "properties": {
                "n": {
                  "anyOf": [
                    {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 1000000000000000
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "d": {
                  "anyOf": [
                    {
                      "type": "integer",
                      "minimum": 1,
                      "maximum": 1000000000000000
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              },
              "required": [
                "n",
                "d"
              ],
              "additionalProperties": false
            },
            "b": {
              "type": "object",
              "properties": {
                "n": {
                  "anyOf": [
                    {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 1000000000000000
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "d": {
                  "anyOf": [
                    {
                      "type": "integer",
                      "minimum": 1,
                      "maximum": 1000000000000000
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              },
              "required": [
                "n",
                "d"
              ],
              "additionalProperties": false
            }
          },
          "required": [
            "a",
            "b"
          ],
          "additionalProperties": false
        },
        "after": {
          "type": "object",
          "properties": {
            "s": {
              "type": "object",
              "properties": {
                "n": {
                  "anyOf": [
                    {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 1000000000000000
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "d": {
                  "anyOf": [
                    {
                      "type": "integer",
                      "minimum": 1,
                      "maximum": 1000000000000000
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              },
              "required": [
                "n",
                "d"
              ],
              "additionalProperties": false
            },
            "a": {
              "type": "object",
              "properties": {
                "n": {
                  "anyOf": [
                    {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 1000000000000000
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "d": {
                  "anyOf": [
                    {
                      "type": "integer",
                      "minimum": 1,
                      "maximum": 1000000000000000
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              },
              "required": [
                "n",
                "d"
              ],
              "additionalProperties": false
            },
            "b": {
              "type": "object",
              "properties": {
                "n": {
                  "anyOf": [
                    {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 1000000000000000
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "d": {
                  "anyOf": [
                    {
                      "type": "integer",
                      "minimum": 1,
                      "maximum": 1000000000000000
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              },
              "required": [
                "n",
                "d"
              ],
              "additionalProperties": false
            },
            "u": {
              "type": "object",
              "properties": {
                "n": {
                  "anyOf": [
                    {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 1000000000000000
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "d": {
                  "anyOf": [
                    {
                      "type": "integer",
                      "minimum": 1,
                      "maximum": 1000000000000000
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              },
              "required": [
                "n",
                "d"
              ],
              "additionalProperties": false
            }
          },
          "required": [
            "s",
            "a",
            "b",
            "u"
          ],
          "additionalProperties": false
        }
      },
      "required": [
        "line_categories",
        "before",
        "transfers",
        "after"
      ],
      "additionalProperties": false
    }
  },
  "required": [
    "lines",
    "category_rules",
    "method",
    "fixed_bps",
    "report"
  ],
  "additionalProperties": false
}

Originalschema öffnen

Veröffentlichtes Eingabebeispiel

{
  "lines": [
    {
      "amount": 121,
      "tags_domain": [
        {
          "team": "a",
          "kind": "shared"
        }
      ]
    },
    {
      "amount": 30,
      "tags_domain": [
        {
          "team": "a",
          "kind": "direct"
        }
      ]
    },
    {
      "amount": 10,
      "tags_domain": [
        {
          "team": "b",
          "kind": "direct"
        }
      ]
    }
  ],
  "category_rules": [
    {
      "key": "kind",
      "equals": "shared",
      "category": "s"
    },
    {
      "key": "team",
      "equals": "a",
      "category": "a"
    },
    {
      "key": "team",
      "equals": "b",
      "category": "b"
    }
  ],
  "method": "even",
  "fixed_bps": [],
  "report": {
    "line_categories": [
      "s",
      "a",
      "b"
    ],
    "before": {
      "s": 121,
      "a": 30,
      "b": 10,
      "u": 0
    },
    "transfers": {
      "a": {
        "n": 121,
        "d": 2
      },
      "b": {
        "n": 121,
        "d": 2
      }
    },
    "after": {
      "s": {
        "n": 0,
        "d": 1
      },
      "a": {
        "n": 181,
        "d": 2
      },
      "b": {
        "n": 141,
        "d": 2
      },
      "u": {
        "n": 0,
        "d": 1
      }
    }
  }
}

Ergebnis & Dokumentation

Maschinenlesbare Dokumentation dieses Hubs

Quelle dieser Seite: der veröffentlichte HALOWERK-Katalog. Stand: 2026-11-07, 02:42 UTC.

Weitere Endpunkte dieses Hubs

Alle Endpunkte dieses Hubs →