{"uid":"cap_dBJjCDagKioi9GjlMjpKi","slug":"promotion-observations-exact-row-deduplication-secondary-measure-291485f1","name":"Promotion Observations — Exact Row Deduplication + Secondary-Measure Weighted Mean","description":"Promotion observations — Exact row deduplication + Secondary-measure weighted mean: Exact row deduplication + Secondary-measure weighted mean for supplied promotion observations records (discount_amount, units_sold). Up to 200 rows; 2 independent reports using shared local analytical engines. No live lookup, prediction, professional assessment or external action. 0.01 USDC includes 2 supplied-data reports for up to 200 rows.","url":"https://market.datapackvibe.com/x402/assistant-ib26-retail-05-051?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"rows":{"type":"array","items":{"type":"object","required":["row_id","store_group","date","discount_amount","units_sold"],"properties":{"date":{"type":"string","default":"","pattern":"^\\d{4}-\\d{2}-\\d{2}$","maxLength":10},"row_id":{"type":"string","default":"","maxLength":80,"minLength":1},"units_sold":{"type":["number","null"],"maximum":1000000000000,"minimum":-1000000000000},"store_group":{"type":"string","default":"","maxLength":80},"discount_amount":{"type":["number","null"],"maximum":1000000000000,"minimum":-1000000000000}},"additionalProperties":false},"default":[{"date":"2026-10-01","row_id":"row-1","units_sold":1,"store_group":"group-a","discount_amount":10},{"date":"2026-10-02","row_id":"row-2","units_sold":2,"store_group":"group-b","discount_amount":20},{"date":"2026-10-03","row_id":"row-3","units_sold":3,"store_group":"group-a","discount_amount":15},{"date":"2026-10-04","row_id":"row-4","units_sold":4,"store_group":"group-b","discount_amount":30}],"maxItems":200,"minItems":1},"field":{"enum":["discount_amount","units_sold"],"type":"string","default":"discount_amount"}}},"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_QOnxFDoJAgQe7ZQ-28h3r","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":"Deduplicates promotion observation rows exactly and computes a secondary-measure weighted mean for discount_amount or units_sold data, returning two analytical reports from up to 200 rows.","exampleAgentPrompt":"Can you deduplicate these promotion observation rows and compute the secondary-measure weighted mean for discount_amount? I have 4 records: row-1 for group-a on 2026-10-01 with discount_amount 10 and units_sold 1, row-2 for group-b on 2026-10-02 with discount_amount 20 and units_sold 2, row-3 for group-a on 2026-10-03 with discount_amount 15 and units_sold 3, and row-4 for group-b on 2026-10-04 with discount_amount 30 and units_sold 4.","exampleUseCases":[{"title":"Clean retail promotion dataset for reporting","prompt":"I need to deduplicate my promotion records and get a weighted mean on discount_amount — here are my rows: row-1 group-a 2026-10-01 discount 10 units 1, row-2 group-b 2026-10-02 discount 20 units 2, row-3 group-a 2026-10-01 discount 10 units 1 (duplicate), row-4 group-b 2026-10-03 discount 25 units 3. Can you run exact row deduplication and the weighted mean report?"},{"title":"Analyze units sold weighted average by store group","prompt":"Run exact row deduplication and compute the secondary-measure weighted mean for units_sold across these promotion observations: row-1 store group-a date 2026-11-01 discount 5 units 100, row-2 store group-b date 2026-11-01 discount 8 units 200, row-3 store group-a date 2026-11-02 discount 5 units 150, row-4 store group-b date 2026-11-01 discount 8 units 200 — give me both analytical reports."},{"title":"Validate promotional discount data before campaign review","prompt":"Before our campaign review, can you deduplicate these 5 promotion observation records and give me the weighted mean report on discount_amount? Records: row-1 group-north 2026-09-15 discount 12 units 50, row-2 group-south 2026-09-15 discount 18 units 75, row-3 group-north 2026-09-16 discount 10 units 60, row-4 group-south 2026-09-16 discount 22 units 80, row-5 group-north 2026-09-15 discount 12 units 50."}],"resultDescription":"Returns two analytical reports: (1) an exact row-deduplicated version of the supplied promotion observation rows, and (2) a secondary-measure weighted mean computed over the specified field (discount_amount or units_sold) across the deduplicated dataset, covering up to 200 input rows.","failureModes":["More than 200 rows submitted — request rejected with validation error","Missing required fields (row_id, store_group, date, discount_amount, units_sold) — validation error per row","Invalid date format (not YYYY-MM-DD) — schema validation failure","Field value outside allowed numeric range (±1,000,000,000,000) — rejected","Payment not fulfilled (x402 protocol) — 402 response requiring USDC payment","Empty rows array — minItems constraint violation"],"whenToPreferThis":"Choose this endpoint when you have up to 200 promotion observation records with discount_amount and units_sold fields and need both exact row deduplication and a weighted mean computation in a single paid call. It is ideal for retail analytics pipelines where data quality (duplicates) and aggregated promotion metrics (weighted averages) are needed together without standing up local infrastructure. It is not suitable for live data lookups, predictions, datasets exceeding 200 rows, or fields other than discount_amount and units_sold.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-25T12:33:10.748Z","isFirstParty":false,"canonicalSlug":"promotion-observations-exact-row-deduplication-secondary-measure-291485f1"}