{"uid":"cap_IVQCeoCN9QgXKb8xPac5U","slug":"shipment-costs-secondary-measure-weighted-mean-f58c7a4a","name":"Shipment Costs Secondary-Measure Weighted Mean","description":"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.","url":"https://market.datapackvibe.com/x402/assistant-sector-analytics-shipment-costs-weighted-average?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"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"}}},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.01","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.01/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.01","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.01","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_4bw7wzESHzqypehPdWLri","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.01","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"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.","exampleAgentPrompt":"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.","exampleUseCases":[{"title":"Carrier cost efficiency comparison","prompt":"I have shipment data for two carriers over the past month — each row has a carrier name, date, weight in kg, and shipping cost. Can you compute the weight-kg weighted mean shipping cost across all those rows so I can see the true cost per unit weight?"},{"title":"Logistics budget weighted summary","prompt":"Here are 50 shipment records from our warehouse — row IDs, dates, weights, and costs. Calculate a secondary-measure weighted mean using shipping_cost as the weighting field so I can get a cost-adjusted average for our budget report."},{"title":"Freight rate benchmarking","prompt":"We're benchmarking our freight rates across carriers. I'll give you up to 150 shipment rows with carrier, date, weight_kg, and shipping_cost — please compute the weighted average cost using weight_kg as the weight so we can compare against industry benchmarks."}],"resultDescription":"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.","failureModes":["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"],"whenToPreferThis":"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.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-15T18:48:15.548Z","isFirstParty":false,"canonicalSlug":"shipment-costs-secondary-measure-weighted-mean-f58c7a4a"}