> For the complete documentation index, see [llms.txt](https://india-energy-stack.gitbook.io/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://india-energy-stack.gitbook.io/docs/schemas/external.md).

# External Schemas

Some schemas used across IES are **defined and published outside this repository** — served canonically at [schema.nfh.global](https://schema.nfh.global) — and documented here so the book carries a complete field reference. Each schema links to its canonical definition; each domain links to its use-case guide and deployable devkit.

{% hint style="info" %}
These tables are **auto-generated** from the schema sources by `scripts/generate_external_field_tables.py` (version `v2.0`). Don't edit by hand — re-run the generator to refresh. Where a field derives from a recognised standard, its description begins with **Based on** and the standard reference (from the source's `x-standard` annotation).
{% endhint %}

## Energy Trading (P2P)

[**Use case**](/docs/use-case-implementation-guides/p2p-energy-trading.md) **·** [**Devkit**](https://github.com/beckn/DEG/tree/main/devkits/p2p-trading-ies-wave2)

A peer-to-peer trade is modelled as a `P2PTrade` contract (a beckn `Contract` subclass) whose energy-specific attributes are carried by the offer, customer, order-item, settlement and resource schemas below. `EnergyResource`, `DEGContract`, `RevenueFlow` and `BecknTimeSeries` are shared primitives — Demand Flexibility reuses them.

### P2PTrade

*Defined at* [*`P2PTrade/v2.0`*](https://schema.nfh.global/P2PTrade/v2.0) *— P2PTrade.*

*Inherits all fields from **EnergyContract**.*

### EnergyTradeOffer

*Defined at* [*`EnergyTradeOffer/v2.0`*](https://schema.nfh.global/EnergyTradeOffer/v2.0) *— EnergyTradeOffer — Offer Attributes (v2.0).*

| Field                  | Type       | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |
| ---------------------- | ---------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `validityWindow`       | TimePeriod | Time window during which this offer can be selected/accepted. Typically set to expire before the earliest delivery starts. Present in catalog publish; may be omitted in downstream messages.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| `contractAttributes`   | object     | JSON-LD container for contract terms attached at catalog publish time. Only roles with a non-null participantId are included (unknown parties are omitted at publish time). MUST carry @context and @type (typically DEGContract). Present in catalog publish; omitted in downstream messages where Contract.contractAttributes carries the full party list.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
| `commitmentAttributes` | object     | Seller's BecknTimeSeries published at catalog time. Declares the full schema of the contract table via payloadDescriptors, each annotated with `insertedBy` (the role responsible for populating that column). Carries the seller's initial interval data (PRICE\_PER\_KWH + AVAILABLE\_QTY per slot). Immutable after publish — repeated verbatim in all downstream messages as the authoritative offer definition. MUST carry @context (BecknTimeSeries/v1.0/context.jsonld) and @type: TimeSeries. Standard payloadDescriptors and their insertedBy: PRICE\_PER\_KWH (EVENT) — insertedBy: seller AVAILABLE\_QTY (EVENT) — insertedBy: seller REQUESTED\_QTY (EVENT) — insertedBy: buyer BUYER\_DISCOM\_ALLOC (REPORT) — insertedBy: buyerDiscom BUYER\_DISCOM\_STATUS (REPORT) — insertedBy: buyerDiscom SELLER\_DISCOM\_ALLOC (REPORT) — insertedBy: sellerDiscom SELLER\_DISCOM\_STATUS (REPORT) — insertedBy: sellerDiscom FINAL\_ALLOC (REPORT) — insertedBy: sellerDiscom |

*Object: `EnergyTradeOffer.contractAttributes`*

| Field          | Type | Description |
| -------------- | ---- | ----------- |
| **`@type`** \* | text | —           |

*Object: `EnergyTradeOffer.commitmentAttributes`*

| Field          | Type         | Description |
| -------------- | ------------ | ----------- |
| **`@type`** \* | `TimeSeries` | —           |

### EnergyCustomer

*Defined at* [*`EnergyCustomer/v2.0`*](https://schema.nfh.global/EnergyCustomer/v2.0) *— EnergyCustomer — Customer Attributes (v2.0).*

| Field               | Type   | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |
| ------------------- | ------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **`meterId`** \*    | text   | Meter identifier in DER address format (der://meter/{id}). Used for customer identification and energy delivery tracking in P2P trading flows.                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |
| `sanctionedLoad`    | number | Sanctioned load capacity in kilowatts (kW). Optional field representing the approved electrical load capacity for the customer's connection. Used for load management and regulatory compliance.                                                                                                                                                                                                                                                                                                                                                                                                                           |
| `utilityCustomerId` | text   | Customer's account identifier with the utility company (e.g., PG\&E customer number). Used for billing, service identification, and utility system integration.                                                                                                                                                                                                                                                                                                                                                                                                                                                            |
| `utilityId`         | text   | Utility/DISCOM identifier for the customer's service territory (e.g., "TPDDL-DL", "BESCOM-KA"). Used in inter-utility / inter-DISCOM P2P trading to identify which utility serves this customer.                                                                                                                                                                                                                                                                                                                                                                                                                           |
| `platformUrl`       | uri    | Base URL (scheme + host\[:port]) of the Beckn trading platform that represents this customer on the network. The platform exposes the standard Beckn paths under this base: `/bap/caller`, `/bap/receiver`, `/bpp/caller`, `/bpp/receiver`. Used by downstream nodes to address this customer's platform for cascade sub-transactions — e.g. a seller-side adapter cascading a /status query into its own discom ledger and needing the discom's response routed back to its own /bap/receiver. The path appended depends on the action's BAP↔BPP direction (/bap/receiver for on\_\*, /bpp/receiver for request actions). |

### EnergyOrderItem

*Defined at* [*`EnergyOrderItem/v2.0`*](https://schema.nfh.global/EnergyOrderItem/v2.0) *— EnergyOrderItem.*

| Field                       | Type   | Description                                                                                                                                                                                                 |
| --------------------------- | ------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **`providerAttributes`** \* | object | Provider/customer information for this order item, including meter ID and utility account.                                                                                                                  |
| `fulfillmentAttributes`     | object | Optional fulfillment tracking for this order item. Only populated in on\_status and on\_update responses (not in init/confirm flows). Contains delivery status, meter readings, and energy allocation data. |

*Object: `EnergyOrderItem.providerAttributes`*

| Field   | Type             | Description                             |
| ------- | ---------------- | --------------------------------------- |
| `@type` | `EnergyCustomer` | Type identifier for provider attributes |

*Object: `EnergyOrderItem.fulfillmentAttributes`*

| Field   | Type                  | Description                                |
| ------- | --------------------- | ------------------------------------------ |
| `@type` | `EnergyTradeDelivery` | Type identifier for fulfillment attributes |

### RevenueFlow

*Defined at* [*`RevenueFlow/v2.0`*](https://schema.nfh.global/RevenueFlow/v2.0) *— RevenueFlow — Consideration Attributes (v2.0).*

| Field                 | Type           | Description                                                                                                               |
| --------------------- | -------------- | ------------------------------------------------------------------------------------------------------------------------- |
| **`revenueFlows`** \* | list of object | Per-role signed revenue-flow entries computed by the contract policy after settlement. Sum MUST be zero across the array. |

*Object: `RevenueFlow.revenueFlows[]`*

| Field             | Type   | Description                                                    |
| ----------------- | ------ | -------------------------------------------------------------- |
| **`role`** \*     | text   | —                                                              |
| **`value`** \*    | number | Signed amount. Positive = role receives; negative = role pays. |
| **`currency`** \* | text   | **Based on** ISO 4217. ISO-4217 currency code.                 |
| `description`     | text   | Human-readable rationale for the flow.                         |

### DEGContract

*Defined at* [*`DEGContract/v2.0`*](https://schema.nfh.global/DEGContract/v2.0) *— DEG — Contract (v2.0).*

| Field           | Type           | Description                                                                                                                                                                                                                                                                                                                                                             |
| --------------- | -------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **`roles`** \*  | list of object | Contract roles. The participantId key is required on every role entry, but its value MAY be null in the catalog/offer (buyer and buyerDiscom unknown until select/init) and is bound to a concrete participant id at select/init. Identity attributes (meter, utility, utilityCustomerId) for each bound role live at Contract.participants\[\*].participantAttributes. |
| **`policy`** \* | object         | OPA/Rego policy governing this contract.                                                                                                                                                                                                                                                                                                                                |
| `revenueFlows`  | list of object | Optional. Settlement-time per-role flows written by the `contractpolicyenforcer` plugin when it is configured with outputMode: raw and outputPath ending at this property (the legacy demand-flex shape). Wave2 P2P trading instead uses Contract.consideration\[\*].considerationAttributes (RevenueFlow JSON-LD) and leaves this array unset.                         |

*Object: `DEGContract.roles[]`*

| Field                  | Type            | Description                                                                                                                                                                                                                            |
| ---------------------- | --------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **`role`** \*          | text            | —                                                                                                                                                                                                                                      |
| **`participantId`** \* | text (nullable) | Concrete participant id once bound (buyerPlatform/sellerPlatform use the utilityId-meter compound id, e.g. "TPDDL-DL-seller-001"; discom roles use the discom-ledger participant id). Null at catalog publish for sides not yet bound. |

*Object: `DEGContract.policy`*

| Field              | Type | Description |
| ------------------ | ---- | ----------- |
| **`url`** \*       | uri  | —           |
| **`queryPath`** \* | text | —           |

*Object: `DEGContract.revenueFlows[]`*

| Field             | Type   | Description            |
| ----------------- | ------ | ---------------------- |
| **`role`** \*     | text   | —                      |
| **`value`** \*    | number | —                      |
| **`currency`** \* | text   | **Based on** ISO 4217. |
| `description`     | text   | —                      |

### EnergyResource

*Defined at* [*`EnergyResource/v2.0`*](https://schema.nfh.global/EnergyResource/v2.0) *— EnergyResource — Resource Attributes (v2.0).*

Discriminated union of all typed EnergyResource kinds. Dispatched by the 'type' field. Each kind lives in its own schema at schema.nfh.global//v1.0 and is referenced above. EnergyResourceCommon (id, type, subResources, parentResources, attributes) and EnergyResourceCommonAttributes (make, model, maxExportKw, maxImportKw, ratedPowerKw, telemetryProvider, commissioningDate, location) are defined in EnergyResourceCommon/v1.0 and inherited by all kinds via allOf external $ref. For P2P-trading: minimal usage is {id, type}. For demand-flex and credentials: add attributes fields as needed. For targeted validation: $ref the specific kind directly.

*Discriminated union (`oneOf`) of: `EnergyResourceMeter`, `EnergyResourceGenerator`, `EnergyResourceStorage`, `EnergyResourceEVCharger`, `EnergyResourceInverter`, `EnergyResourceLoad`, `EnergyResourceNetwork`.*

### BecknTimeSeries

*Defined at* [*`BecknTimeSeries/v1.0`*](https://schema.nfh.global/BecknTimeSeries/v1.0) *— BecknTimeSeries — Time-Series Payload (v1.0).*

*Based on **OpenADR 3.1.0**.*

A time-series payload. `intervalPeriod` sets the default temporal bounds; each `interval` carries one or more typed `payloads` (valuesMap rows). `payloadDescriptors` declare units/currency/ reading-type for each `payloadType` referenced in the rows; every type used in `intervals` SHOULD be declared in `payloadDescriptors`. `payloadType` follows OpenADR's open-string convention — consumer profiles (e.g. `DemandFlexPerformance`) MAY restrict it to a domain-specific set and add cross-field membership checks.

| Field                       | Type                                                      | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |
| --------------------------- | --------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `@type`                     | `TimeSeries`                                              | Optional JSON-LD type discriminator. Present when the embedder wants to surface the type in the payload; the parent schema's `$ref` to BecknTimeSeries is what drives validation.                                                                                                                                                                                                                                                                                                                                          |
| **`intervalPeriod`** \*     | intervalPeriod                                            | Default temporal bounds of the series — ISO 8601 `start` and `duration`. An individual interval may override these.                                                                                                                                                                                                                                                                                                                                                                                                        |
| **`payloadDescriptors`** \* | list of eventPayloadDescriptor or reportPayloadDescriptor | Sidecar describing each `payloadType` carried by the rows (units, currency, reading type, accuracy/confidence). Every `intervals[*].payloads[*].type` SHOULD appear here; consumer profiles enforce that as a cross-field constraint. Each descriptor must be either an OpenADR3 eventPayloadDescriptor (objectType: EVENT\_PAYLOAD\_DESCRIPTOR — for offer/bid signals) or a reportPayloadDescriptor (objectType: REPORT\_PAYLOAD\_DESCRIPTOR — for telemetry/meter readings). The objectType field is the discriminator. |
| **`intervals`** \*          | list of interval                                          | Series rows. Each row carries an integer `id` and a list of typed `payloads` (valuesMap). Per-row `intervalPeriod` is optional and overrides the default.                                                                                                                                                                                                                                                                                                                                                                  |
| `resourceName`              | text                                                      | Identifies the single resource these readings are about — the data source. Mirrors OpenADR 3.1.0's `Report.resources[].resourceName`. Use when the series captures telemetry from a specific physical device or asset; in energy domains this is typically the meter id. Omit (or set to `"0"`, following OpenADR convention) for aggregate / unattributed series. Optional, so existing payloads continue to validate without change.                                                                                     |
| `clientName`                | text                                                      | Identifies the reporting client — the party authoring this time-series and pushing it onto the wire. Mirrors OpenADR 3.1.0's `Report.clientName` (VEN name). In energy domains this is typically the utility / DISCOM / aggregator subscriber id. Optional.                                                                                                                                                                                                                                                                |

## Demand Flexibility

[**Guide**](https://github.com/beckn/DEG/tree/main/docs/implementation-guides/v2/Demand_Flexibility) **·** [**Devkit**](https://github.com/beckn/DEG/tree/main/devkits/demand-flex)

A flexibility programme advertises a `DemandFlexNeed`, contracts via a `DemandFlexBuyOffer`, and reports measurement & verification with `DemandFlexPerformance` (per-meter telemetry as a `BecknTimeSeries`). It reuses the shared `EnergyResource`, `DEGContract`, `RevenueFlow` and `BecknTimeSeries` schemas listed under Energy Trading.

### DemandFlexNeed

*Defined at* [*`DemandFlexNeed/v2.0`*](https://schema.nfh.global/DemandFlexNeed/v2.0) *— Demand Flex — Need Attributes (v2.0).*

*Based on **OpenADR 3.1.0 (event time series)**.*

Buyer-authored demand-flex procurement schedule as an OpenADR-aligned time series — one interval per tranche. This is the single, unified Need shape for every demand-flex market, from full price discovery (uc2 pay-as-clear auction: many aggregators bid, market clears) down to its monopsony degenerate (uc1: a single buyer, the DISCOM, fixes one clearing price for any quantity — a flat, self-cleared curve). The column set is intentionally NOT fixed by this schema. Each market profile carries different columns, and the governing CONTRACT POLICY REGO imposes the exact required set as a hard const: uc1 (deg.contracts.demand\_flex) — CAPACITY\_REQUESTED, PRICE, SHORTFALL\_PENALTY uc2 (deg.contracts.demand\_flex\_pac) — CAPACITY\_REQUESTED

| Field                       | Type                           | Description                                                                                                                                                                                                                                                                                                                                                                                                                      |
| --------------------------- | ------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `@type`                     | `DemandFlexNeed`               | JSON-LD type discriminator.                                                                                                                                                                                                                                                                                                                                                                                                      |
| `location`                  | Location                       | **Based on** GeoJSON (RFC 7946). Geographic area where flex is needed. Beckn Location — GeoJSON geometry (geo) plus optional address.                                                                                                                                                                                                                                                                                            |
| **`intervalPeriod`** \*     | intervalPeriod                 | Default temporal bounds of the schedule — ISO 8601 `start` and `duration` (e.g. PT30M). Interval `id` 0..n-1 index sequential tranches off this grid. This exact grid MUST be shared by the seller's CAPACITY\_OFFERED series and by every meter's telemetry.                                                                                                                                                                    |
| **`payloadDescriptors`** \* | list of eventPayloadDescriptor | Buyer-authored column descriptors (OpenADR eventPayloadDescriptor). The set is profile-specific and NOT fixed here — the governing contract policy rego imposes the exact required columns as a hard const (uc1: CAPACITY\_REQUESTED / PRICE / SHORTFALL\_PENALTY; uc2: CAPACITY\_REQUESTED). Downstream series extend the grid with CAPACITY\_OFFERED (seller, on commitmentAttributes) and BASELINE / USAGE (meter telemetry). |
| **`intervals`** \*          | list of interval               | One row per tranche. Each row carries integer `id` and typed `payloads` — CAPACITY\_REQUESTED, PRICE, SHORTFALL\_PENALTY.                                                                                                                                                                                                                                                                                                        |

### DemandFlexBuyOffer

*Defined at* [*`DemandFlexBuyOffer/v2.0`*](https://schema.nfh.global/DemandFlexBuyOffer/v2.0) *— Demand Flex — Buy Offer Attributes (v2.0).*

#### DemandFlexBuyOffer

| Field                | Type                        | Description                                                                                                                                                                                                   |
| -------------------- | --------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `contractAttributes` | object                      | Portable DEGContract template. Present only in catalog/discover. Promoted to Contract.contractAttributes at select/init.                                                                                      |
| **`inputs`** \*      | list of DemandFlexRoleInput | One entry per role. participantId is null until the role is bound (e.g. seller is null at catalog, filled at init). inputs object is optional when participantId is null, required when participantId is set. |

#### DemandFlexRoleInput

| Field                  | Type               | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| ---------------------- | ------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **`role`** \*          | `buyer` / `seller` | —                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |
| **`participantId`** \* | text (nullable)    | Participant bound to this role. Null until bound.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |
| `inputs`               | object             | Role-specific scalar inputs. Per-slot commercial terms are NOT here — they ride the DemandFlexNeed time series (buyer columns CAPACITY\_REQUESTED / PRICE / SHORTFALL\_PENALTY) and the commitment series (seller column CAPACITY\_OFFERED); these inputs carry only what does not vary by interval. For buyer: currency and baselineMethodology (a negative PRICE column pays for increased consumption, so there is no scalar incentive/penalty field). For seller: participatingMeters (or participatingMetersRef when the cohort is bulk), energyResources (or energyResourcesRef) — EnergyResource objects each linked to a participatingMeters\[\*] entry via meterId — and reportDescriptors (see below). The seller's per-slot CAPACITY\_OFFERED is added as a column on Commitment.commitmentAttributes at confirm, not here. Bulk delivery: the offer is bound at confirm and cannot span Beckn messages, so when the seller's cohort would stretch a single confirm payload beyond a reasonable wire budget (e.g. > 10k meters) the \*Ref siblings replace the inline arrays. participatingMetersRef / energyResourcesRef each carry a BecknResourceRef pointing at a content- addressed BPP-hosted bundle. participatingMetersDigest is an on-protocol tamper-evidence anchor that survives even if the ref URL later goes 404 — Beckn signing of the confirm payload commits the contract to that exact cohort. |

*Object: `DemandFlexRoleInput.inputs`*

| Field                       | Type                              | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
| --------------------------- | --------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `reportDescriptors`         | BecknReportDescriptors (nullable) | Seller-side declaration of what telemetry will be delivered for this contract. Set to `null` when the contract requires no telemetry. When non-null, the seller commits to delivering a BecknTimeSeries (per device, in performance.meters\[]. telemetry on the on\_status reply) whose payloadDescriptors cover every entry in this array. See BecknReportDescriptors for the canonical payloadType / units / cardinality table (USAGE, POWER, SOC\_END, GPS\_LAT, GPS\_LON, …).                                                 |
| `participatingMetersRef`    | BecknResourceRef                  | Optional. Off-protocol delivery of the participatingMeters cohort when it's too large to inline. Mutually exclusive with `participatingMeters`. Consumers MUST treat the fetched body as the authoritative meter list once the receiver has verified `contentHash` and `count` against the body's canonicalized form.                                                                                                                                                                                                             |
| `energyResources`           | list of EnergyResource            | Optional. EnergyResources enrolled in this contract. Each entry is an EnergyResource object whose `meterId` field references one of the meter URIs in `participatingMeters[*]` (many resources MAY share a meter). Identity and rated dimensioning live here; per-event state lives in BecknTimeSeries telemetry on the performance record's meters\[]. EnergyResource is the canonical, technology-neutral asset class — EV chargers, batteries, solar PV, smart HVAC, etc. — shared with P2P-trading and any future DEG domain. |
| `energyResourcesRef`        | BecknResourceRef                  | Optional. Off-protocol delivery of the energyResources cohort when it's too large to inline. Mutually exclusive with `energyResources`. Same verification rules as `participatingMetersRef`.                                                                                                                                                                                                                                                                                                                                      |
| `participatingMetersDigest` | object                            | Optional on-protocol tamper-evidence anchor for the meter cohort, regardless of whether it was delivered inline (`participatingMeters`) or by reference (`participatingMetersRef`). Computed as SHA-256 of the ASCII-sorted, newline-joined meter IDs. Beckn-signing of the confirm payload then commits the seller to this exact cohort permanently — useful for downstream audit long after any off-protocol bundle URL has expired.                                                                                            |

*Object: `DemandFlexRoleInput.inputs.participatingMetersDigest`*

| Field                      | Type    | Description                                                                                                                                                                     |
| -------------------------- | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **`count`** \*             | integer | Total meter count in the cohort.                                                                                                                                                |
| **`sha256OfSortedIds`** \* | text    | **Based on** SHA-256 (FIPS 180-4). `sha256:<64-hex>` of the cohort's meter IDs after they have been ASCII-sorted and joined with a single `\n` separator (no trailing newline). |

### DemandFlexPerformance

*Defined at* [*`DemandFlexPerformance/v2.0`*](https://schema.nfh.global/DemandFlexPerformance/v2.0) *— Demand Flex — Performance Attributes (v2.0).*

Performance attributes for demand-flex M\&V (Measurement & Verification). Attached to Performance.performanceAttributes in on\_status callbacks.

| Field         | Type             | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |
| ------------- | ---------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `eventId`     | text             | Identifier of the flex event being measured.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
| `methodology` | text             | Baseline methodology used across all meters (e.g., "5of10" means average of 5 highest-consumption days out of last 10).                                                                                                                                                                                                                                                                                                                                                                                                                                            |
| `meters`      | list of object   | Per-meter M\&V data. Each entry binds a meter ID to its time-series telemetry for the event window. When the cohort fits in a single message the BPP SHOULD inline the full array and omit `pageInfo` entirely. For larger cohorts the BPP either ships paged slices (sibling `pageInfo` present) or substitutes `metersRef` and omits `meters[]` from this message. Settlement rego runs only on the assembled view — receivers MUST NOT fire settlement-dependent actions until `pageInfo.isLast == true` or the `metersRef` body has been fetched and verified. |
| `pageInfo`    | BecknPageInfo    | Optional. Present only when the `meters[]` collection has been split across multiple on\_status messages (paged inline delivery). Receivers assemble all pages of the same (transactionId, performance.id) by `pageInfo.sequence` and defer settlement until `pageInfo.isLast == true`. Omit entirely when the whole cohort fits in one message — absence of `pageInfo` is the signal that this message is self-contained.                                                                                                                                         |
| `metersRef`   | BecknResourceRef | Optional. Off-protocol delivery of the per-meter telemetry bundle when even paged-inline (`pageInfo`) is too heavy. Mutually exclusive with `meters[]` and `pageInfo` on the same message — the BPP substitutes this reference for the entire collection. Receivers fetch `uri`, verify against `contentHash` and `count`, then run settlement against the fetched body.                                                                                                                                                                                           |

*Object: `DemandFlexPerformance.meters[]`*

| Field              | Type            | Description                                                                                                                                                                                                                                                                                              |
| ------------------ | --------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **`meterId`** \*   | text            | Meter identifier.                                                                                                                                                                                                                                                                                        |
| **`telemetry`** \* | BecknTimeSeries | BecknTimeSeries carrying BASELINE (always) and — once the event has completed — USAGE payloads, aligned to the same interval grid. Validated inline via `$ref`, so the embedded payload only needs `@type` (optional) — `@context` is declared once at the envelope level via `context.schemaContext[]`. |


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://india-energy-stack.gitbook.io/docs/schemas/external.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
