# Moving Weighted-Average Cost (COGS) Transcript Verifier

> Moving Weighted-Average Cost (COGS) Transcript Verifier is a paid API for AI agents from detect.halowerk.com, paid per call via x402, $0.002/call, status unknown (last checked 2026-11-24).

Verifies a claimed cumulative cost of goods sold against exact moving weighted-average cost arithmetic applied to a sequence of buy and sell inventory events.

## Facts

- Endpoint: POST https://detect.halowerk.com/v1/commerce/commerce-moving-average-cost-transcript?utm_source=zero.xyz
- Price: $0.002/call
- Payment: x402
- Status: unknown
- Last checked: 2026-11-24
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/moving-weighted-average-cost-cogs-transcript-verifier-ebbb2afe
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_vD5v-gNM2q3pfCxKDZwUP

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability moving-weighted-average-cost-cogs-transcript-verifier-ebbb2afe -d '<json body>'
```

Example prompt: I have a perpetual inventory with these events: buy 10 units at 50, buy 5 units at 60, sell 8 units, buy 3 units at 70, sell 6 units — and I'm claiming my total COGS is 143000/2000 as a fraction. Can you verify that against exact moving weighted-average cost arithmetic?

## When to prefer this

Use this endpoint when you need to independently verify that a perpetual inventory system's moving weighted-average COGS calculation is arithmetically correct, especially when auditing ERP output, reconciling accounting claims, or validating agent-generated cost figures against a trusted computation.

## Known failure modes

- Sell event before sufficient inventory (units sold exceed current stock)
- claimed_cogs_denominator of zero (rejected by schema minimum:1)
- events array exceeding 512 items
- unit_cost or units exceeding maximum bounds
- Mismatch between claimed COGS and computed result — returns discrepancy detail

## How this service works

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.

## Output

The endpoint returns a detailed transcript of the moving weighted-average cost computation applied to each buy and sell event in sequence, along with a verdict on whether the claimed COGS fraction (numerator/denominator) matches the exact arithmetic result.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "artifact": {
   "type": "object",
   "required": [
    "events",
    "claimed_cogs_numerator",
    "claimed_cogs_denominator"
   ],
   "properties": {
    "events": {
     "type": "array",
     "items": {
      "type": "object",
      "required": [
       "kind",
       "units",
       "unit_cost"
      ],
      "properties": {
       "kind": {
        "enum": [
         "buy",
         "sell"
        ],
        "type": "string",
        "maxLength": 64,
        "minLength": 1
       },
       "units": {
        "type": "integer",
        "maximum": 1000000,
        "minimum": 1
       },
       "unit_cost": {
        "type": "integer",
        "maximum": 1000000,
        "minimum": 0
       }
      },
      "additionalProperties": false
     },
     "maxItems": 512,
     "minItems": 0
    },
    "claimed_cogs_numerator": {
     "type": "integer",
     "maximum": 9007199254740991,
     "minimum": 0
    },
    "claimed_cogs_denominator": {
     "type": "integer",
     "maximum": 9007199254740991,
     "minimum": 1
    }
   },
   "additionalProperties": false
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/moving-weighted-average-cost-cogs-transcript-verifier-ebbb2afe/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from detect.halowerk.com](https://www.zero.xyz/host/detect.halowerk.com/llms.txt)
