Zum Inhalt
HALOWERK

Technische Prüfungen & Formate

commerce / commerce moving average cost transcript

An agent that reconciles a perpetual inventory valuation needs its claimed cumulative cost of sold units checked against exact moving weighted-average restocking and sale arithmetic.

POST https://detect.halowerk.com/v1/commerce/commerce-moving-average-cost-transcript

Eingaben

Felder des veröffentlichten Eingabeschemas
FeldTypPflichtBeschreibung
artifactobjectJa
Vollständiges Eingabeschema anzeigen
{
  "type": "object",
  "properties": {
    "artifact": {
      "type": "object",
      "properties": {
        "events": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "enum": [
                  "buy",
                  "sell"
                ],
                "minLength": 1,
                "maxLength": 64
              },
              "units": {
                "type": "integer",
                "minimum": 1,
                "maximum": 1000000
              },
              "unit_cost": {
                "type": "integer",
                "minimum": 0,
                "maximum": 1000000
              }
            },
            "required": [
              "kind",
              "units",
              "unit_cost"
            ],
            "additionalProperties": false
          },
          "minItems": 0,
          "maxItems": 512
        },
        "claimed_cogs_numerator": {
          "type": "integer",
          "minimum": 0,
          "maximum": 9007199254740991
        },
        "claimed_cogs_denominator": {
          "type": "integer",
          "minimum": 1,
          "maximum": 9007199254740991
        }
      },
      "required": [
        "events",
        "claimed_cogs_numerator",
        "claimed_cogs_denominator"
      ],
      "additionalProperties": false
    }
  },
  "required": [
    "artifact"
  ],
  "additionalProperties": false
}

Originalschema öffnen

Veröffentlichtes Eingabebeispiel

{
  "artifact": {
    "events": [
      {
        "kind": "buy",
        "units": 4,
        "unit_cost": 19
      },
      {
        "kind": "buy",
        "units": 5,
        "unit_cost": 2
      },
      {
        "kind": "sell",
        "units": 2,
        "unit_cost": 0
      },
      {
        "kind": "sell",
        "units": 7,
        "unit_cost": 0
      },
      {
        "kind": "buy",
        "units": 4,
        "unit_cost": 12
      },
      {
        "kind": "sell",
        "units": 4,
        "unit_cost": 0
      }
    ],
    "claimed_cogs_numerator": 134,
    "claimed_cogs_denominator": 1
  }
}

Ergebnis & Dokumentation

Maschinenlesbare Dokumentation dieses Hubs

Quelle dieser Seite: der veröffentlichte HALOWERK-Katalog. Stand: 2026-11-01, 15:19 UTC.

Weitere Endpunkte dieses Hubs

Alle Endpunkte dieses Hubs →