Zum Inhalt
HALOWERK

Finopswerk

fifo inventory cost ledger

Originalintegerquantity/unitcostreceiptsandorderedissues determine FIFOoldestlotallocations/COGS/remaininglots andprefixcostconservation. OWNatomicreject-on-shortageconvention,nopartial/negativeinventory. Samecaller-definedcostunit,noFX/NRV/tax/revenue/profit/returns/fullIAS2/legal/realbookkeepingcertification. Oneboundedunitcostcapturekeeps2wholeworlds.Strictrecursive reportkeys/objectorderirrelevant/eventandlotarraysordered. A schema-valid unknown is a successful result at the same fixed.

POST https://finops.halowerk.com/v1/fifo-inventory-cost-ledger

Eingaben

Felder des veröffentlichten Eingabeschemas
FeldTypPflichtBeschreibung
eventsarrayJa
reportobjectJa
Vollständiges Eingabeschema anzeigen
{
  "type": "object",
  "properties": {
    "events": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "kind": {
            "enum": [
              "buy",
              "sell"
            ]
          },
          "units": {
            "type": "integer",
            "minimum": 1,
            "maximum": 100
          },
          "unit_cost_domain": {
            "type": "array",
            "items": {
              "type": "integer",
              "minimum": 0,
              "maximum": 1000000
            },
            "minItems": 1,
            "maxItems": 2
          }
        },
        "required": [
          "kind",
          "units",
          "unit_cost_domain"
        ],
        "additionalProperties": false
      },
      "minItems": 1,
      "maxItems": 8
    },
    "report": {
      "type": "object",
      "properties": {
        "steps": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "accepted": {
                "anyOf": [
                  {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 1000000000
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "issue_cost": {
                "anyOf": [
                  {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 1000000000
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "remaining_units": {
                "anyOf": [
                  {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 1000000000
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "remaining_cost": {
                "anyOf": [
                  {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 1000000000
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "shortfall": {
                "anyOf": [
                  {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 1000000000
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "allocation": {
                "type": "array",
                "items": {
                  "anyOf": [
                    {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 1000000000
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "minItems": 8,
                "maxItems": 8
              }
            },
            "required": [
              "accepted",
              "issue_cost",
              "remaining_units",
              "remaining_cost",
              "shortfall",
              "allocation"
            ],
            "additionalProperties": false
          },
          "minItems": 1,
          "maxItems": 8
        },
        "lot_remaining": {
          "type": "array",
          "items": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 0,
                "maximum": 1000000000
              },
              {
                "type": "null"
              }
            ]
          },
          "minItems": 8,
          "maxItems": 8
        },
        "lot_unit_costs": {
          "type": "array",
          "items": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 0,
                "maximum": 1000000000
              },
              {
                "type": "null"
              }
            ]
          },
          "minItems": 8,
          "maxItems": 8
        },
        "cumulative_cogs": {
          "anyOf": [
            {
              "type": "integer",
              "minimum": 0,
              "maximum": 1000000000
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "required": [
        "steps",
        "lot_remaining",
        "lot_unit_costs",
        "cumulative_cogs"
      ],
      "additionalProperties": false
    }
  },
  "required": [
    "events",
    "report"
  ],
  "additionalProperties": false
}

Originalschema öffnen

Veröffentlichtes Eingabebeispiel

{
  "events": [
    {
      "kind": "buy",
      "units": 4,
      "unit_cost_domain": [
        19
      ]
    },
    {
      "kind": "buy",
      "units": 5,
      "unit_cost_domain": [
        2
      ]
    },
    {
      "kind": "sell",
      "units": 6,
      "unit_cost_domain": [
        0
      ]
    }
  ],
  "report": {
    "steps": [
      {
        "accepted": 1,
        "issue_cost": 0,
        "remaining_units": 4,
        "remaining_cost": 76,
        "shortfall": 0,
        "allocation": [
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0
        ]
      },
      {
        "accepted": 1,
        "issue_cost": 0,
        "remaining_units": 9,
        "remaining_cost": 86,
        "shortfall": 0,
        "allocation": [
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0
        ]
      },
      {
        "accepted": 1,
        "issue_cost": 80,
        "remaining_units": 3,
        "remaining_cost": 6,
        "shortfall": 0,
        "allocation": [
          4,
          2,
          0,
          0,
          0,
          0,
          0,
          0
        ]
      }
    ],
    "lot_remaining": [
      0,
      3,
      0,
      0,
      0,
      0,
      0,
      0
    ],
    "lot_unit_costs": [
      19,
      2,
      0,
      0,
      0,
      0,
      0,
      0
    ],
    "cumulative_cogs": 80
  }
}

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 →