# M2M Trust Data Quality Audit

> M2M Trust Data Quality Audit is a paid API for AI agents from energybilltoolkit.co.uk, paid per call via x402, $0.01/call, status unknown (last checked 2026-09-14).

Performs deterministic flat-JSON dataset audit checking for missingness, invalid values, duplicates, cardinality, and numeric ranges

## Facts

- Endpoint: POST https://energybilltoolkit.co.uk/m2m-trust/api/tools/data-quality-audit
- Price: $0.01/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/energybilltoolkit-co-uk-7a25f662
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_1wiBZTQtWhvpQ0i6KgK8A

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 energybilltoolkit-co-uk-7a25f662 -d '<json body>'
```

Example prompt: Run a full data quality audit on this flat JSON dataset and tell me about any missing values, duplicate rows, invalid entries, cardinality issues, and numeric fields that fall outside expected ranges.

## When to prefer this

Use this endpoint when you need deterministic, reproducible data quality checks on a flat JSON dataset — specifically when you need missingness, duplicate, cardinality, and range analysis in a single call. Prefer this over probabilistic or ML-based validators when audit reproducibility and exact counts matter, such as in compliance pipelines or before loading data into a database.

## Known failure modes

- Non-flat (nested) JSON structure returns schema validation error
- Empty dataset returns trivial audit with zero counts
- Malformed JSON returns parse error
- Extremely large dataset may exceed payload limits
- Non-numeric fields passed as numeric columns return type mismatch error

## How this service works

M2M Trust deterministic analysis tool: Deterministic flat-JSON dataset audit for missingness, invalid values, duplicates, cardinality and numeric ranges.

## Output

A structured JSON report detailing: missingness counts and percentages per field, invalid value instances, duplicate record counts, cardinality statistics per column, and numeric range violations — all computed deterministically with no probabilistic inference.

## Example request

```json
{
 "input": {
  "body": {
   "schema": {
    "status": {
     "type": "string",
     "required": true,
     "allowed_values": [
      "paid",
      "pending",
      "overdue"
     ]
    },
    "cost_gbp": {
     "max": 500,
     "min": 0,
     "type": "number",
     "required": true
    },
    "usage_kwh": {
     "max": 2000,
     "min": 0,
     "type": "number",
     "required": true
    },
    "customer_id": {
     "type": "string",
     "required": true
    },
    "billing_period": {
     "type": "string",
     "required": true,
     "max_length": 7,
     "min_length": 7
    }
   },
   "context": "Energy billing records for audit validation",
   "records": [
    {
     "status": "paid",
     "cost_gbp": 125.3,
     "usage_kwh": 450.5,
     "customer_id": "CUST001",
     "billing_period": "2024-01"
    },
    {
     "status": "pending",
     "cost_gbp": 89.75,
     "usage_kwh": 320,
     "customer_id": "CUST002",
     "billing_period": "2024-01"
    },
    {
     "status": "paid",
     "cost_gbp": 162.5,
     "usage_kwh": 580.25,
     "customer_id": "CUST003",
     "billing_period": "2024-01"
    }
   ]
  },
  "type": "http",
  "method": "POST",
  "bodyType": "json"
 }
}
```

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "schema": {
   "type": "object",
   "description": "Optional strict field rules for type/required/range/length/value validation.",
   "additionalProperties": {
    "type": "object",
    "required": [
     "type"
    ],
    "properties": {
     "max": {
      "type": "number"
     },
     "min": {
      "type": "number"
     },
     "type": {
      "enum": [
       "number",
       "integer",
       "string",
       "boolean"
      ],
      "type": "string"
     },
     "required": {
      "type": "boolean"
     },
     "max_length": {
      "type": "integer",
      "minimum": 0
     },
     "min_length": {
      "type": "integer",
      "minimum": 0
     },
     "allowed_values": {
      "type": "array",
      "items": {
       "type": [
        "string",
        "number",
        "integer",
        "boolean"
       ]
      },
      "minItems": 1
     }
    },
    "additionalProperties": false
   }
  },
  "context": {
   "type": "string",
   "description": "Short domain context for interpretation."
  },
  "records": {
   "type": "array",
   "items": {
    "type": "object",
    "additionalProperties": {
     "type": [
      "string",
      "number",
      "integer",
      "boolean",
      "null"
     ]
    }
   },
   "maxItems": 1000,
   "minItems": 1,
   "description": "Flat JSON objects only. Nested objects, arrays, files/blobs, NaN and infinities are rejected."
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/energybilltoolkit-co-uk-7a25f662/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from energybilltoolkit.co.uk](https://www.zero.xyz/host/energybilltoolkit.co.uk/llms.txt)
