# Shipment Costs Secondary-Measure Weighted Mean

> Shipment Costs Secondary-Measure Weighted Mean is a paid API for AI agents from market.datapackvibe.com, paid per call via x402, $0.01/call, status unknown (last checked 2026-10-15).

Computes a secondary-measure weighted mean for shipment cost records, weighting by a chosen numeric field (e.g. weight_kg) across up to 200 typed shipment rows.

## Facts

- Endpoint: POST https://market.datapackvibe.com/x402/assistant-sector-analytics-shipment-costs-weighted-average?utm_source=zero.xyz
- Price: $0.01/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/shipment-costs-secondary-measure-weighted-mean-f58c7a4a
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_IVQCeoCN9QgXKb8xPac5U

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 shipment-costs-secondary-measure-weighted-mean-f58c7a4a -d '<json body>'
```

Example prompt: Can you calculate the weight-kg weighted mean of shipping costs for these shipment records: row-1 carrier group-a 2026-10-01 weight 10kg cost $1, row-2 carrier group-b 2026-10-02 weight 20kg cost $2, row-3 carrier group-a 2026-10-03 weight 15kg cost $3? Use weight_kg as the weighting field.

## When to prefer this

Choose this endpoint when you need a statistically weighted mean of shipment cost data using a secondary numeric field as the weight, with up to 200 records processed locally and no external data enrichment. Ideal for logistics analytics, carrier benchmarking, or freight cost summarization where a simple arithmetic mean would be misleading due to varying shipment sizes.

## Known failure modes

- Empty or missing rows array returns a validation error
- Row count exceeding 200 items rejected with maxItems error
- Null values in weight_kg or shipping_cost may affect mean calculation
- Invalid date format (not YYYY-MM-DD) causes schema validation failure
- Invalid field enum value (not weight_kg or shipping_cost) causes rejection
- Payment failure or insufficient USDC balance prevents processing

## How this service works

Shipment costs - Secondary-measure weighted mean: Secondary-measure weighted mean for Shipment costs. Up to 200 supplied typed records. Local numeric and data-quality processing; no external enrichment or forecasting. One of 25 profiles or calculations across 20 shared operations in this sector. 0.01 USDC includes one bounded secondary-measure weighted mean deliverable.

## Output

Returns a single secondary-measure weighted mean value computed from the submitted shipment records, where one numeric field (weight_kg or shipping_cost) is used as the weight and the other as the value being averaged. All processing is local and numeric with no external enrichment.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "rows": {
   "type": "array",
   "items": {
    "type": "object",
    "required": [
     "row_id",
     "carrier",
     "date",
     "weight_kg",
     "shipping_cost"
    ],
    "properties": {
     "date": {
      "type": "string",
      "default": "",
      "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
      "maxLength": 10
     },
     "row_id": {
      "type": "string",
      "default": "",
      "maxLength": 80,
      "minLength": 1
     },
     "carrier": {
      "type": "string",
      "default": "",
      "maxLength": 80
     },
     "weight_kg": {
      "type": [
       "number",
       "null"
      ],
      "maximum": 1000000000000,
      "minimum": -1000000000000
     },
     "shipping_cost": {
      "type": [
       "number",
       "null"
      ],
      "maximum": 1000000000000,
      "minimum": -1000000000000
     }
    },
    "additionalProperties": false
   },
   "default": [
    {
     "date": "2026-10-01",
     "row_id": "row-1",
     "carrier": "group-a",
     "weight_kg": 10,
     "shipping_cost": 1
    },
    {
     "date": "2026-10-02",
     "row_id": "row-2",
     "carrier": "group-b",
     "weight_kg": 20,
     "shipping_cost": 2
    },
    {
     "date": "2026-10-03",
     "row_id": "row-3",
     "carrier": "group-a",
     "weight_kg": 15,
     "shipping_cost": 3
    },
    {
     "date": "2026-10-04",
     "row_id": "row-4",
     "carrier": "group-b",
     "weight_kg": 30,
     "shipping_cost": 4
    }
   ],
   "maxItems": 200,
   "minItems": 1
  },
  "field": {
   "enum": [
    "weight_kg",
    "shipping_cost"
   ],
   "type": "string",
   "default": "weight_kg"
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/shipment-costs-secondary-measure-weighted-mean-f58c7a4a/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from market.datapackvibe.com](https://www.zero.xyz/host/market.datapackvibe.com/llms.txt)
