---
title: "Run MaStR portfolio quality audit (8-step, deterministic)"
method: POST
path: "/api/mastr-quality/audit"
tags: ["MaStR Data Quality"]
---

# Run MaStR portfolio quality audit (8-step, deterministic)

`POST /api/mastr-quality/audit`

## Request

- Base URL: `https://api.cernion.de`
- URL: `https://api.cernion.de/api/mastr-quality/audit`
- Auth: none declared

Executes a deterministic 8-step MaStR data quality audit for a VNB portfolio: VNB identity → full inventory → status anomalies → capacity anomalies → connection point integrity → duplicate detection → geo spot check → audit trail. Returns a qualityScore (0–100) across 5 weighted dimensions. No LLM involvement — identical inputs always produce identical finding codes. Steps 3–7 can be skipped via the skipSteps parameter; scores are re-normalised. Steps 1, 2, and 8 are mandatory.

## Query parameters

- `token` string

## Request body

- object
  - `gridOperatorId` string: MaStR grid operator ID (SNB.../GNB...)
  - `gridOperatorBdew` string: 13-digit BDEW market-partner code
  - `gridOperatorName` string: Grid operator name (fuzzy match)
  - `bdewCode` string: Alias for gridOperatorBdew
  - `gridOperatorBnr` string: Alias BNR input (7/8 digits; tolerant format accepted)
  - `bnr` string: Alias for gridOperatorBnr
  - `datapointTags` string[]: Tags for datapoint snapshot (Weg B)
  - `maxAgeMinutes` integer: Datapoint freshness threshold in minutes
  - `skipSteps` integer[]: Steps to skip (valid: 3–7; steps 1, 2, 8 are mandatory)
  - `geoSampleSize` integer: Number of installations to geo-validate in step 7
  - `token` string: Optional Cernion MCP token for this request. Overrides CERNION_TOKEN when provided.

## Response `200`

Internal (non-gateway) call: direct AuditReport with qualityScore, dimensions, and findings from all executed pipeline steps

## Other responses

- `202`: REST/Gateway call accepted as async job. Poll /api/jobs/:jobId/status and /api/jobs/:jobId/result.

---

[API](https://skmtc.dev/cernion/apis/cernion-energy-tools-api.md) · [All operations](https://skmtc.dev/cernion/apis/cernion-energy-tools-api/llms.txt) · [OpenAPI document](https://skmtc.dev/cernion/apis/cernion-energy-tools-api/revisions/cdb94473b538?raw)
