openapi: 3.1.1 info: title: Demand Flex — Buy Offer Attributes (v2.0) version: 2.0.0 description: > Offer attributes for demand-flex contracts. Contains an inputs array of DemandFlexRoleInput — one entry per role. At catalog time, entries have null participantId. As the contract progresses through init/confirm, participantIds and role-specific inputs are filled in. components: schemas: DemandFlexBuyOffer: type: object additionalProperties: true required: [inputs] x-jsonld: "@context": ./context.jsonld "@type": DemandFlexBuyOffer properties: contractTerms: description: > Portable DEGContract template. Present only in catalog/discover. Promoted to Contract.contractAttributes at select/init. type: object additionalProperties: true inputs: type: array description: > 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. items: $ref: "#/components/schemas/DemandFlexRoleInput" DemandFlexRoleInput: type: object required: [role, participantId] additionalProperties: true properties: role: type: string enum: [buyer, seller] participantId: type: ["string", "null"] description: > Participant bound to this role. Null until bound. inputs: type: object additionalProperties: true description: > Role-specific inputs. Structure varies by role and contract type. For buyer: incentivePerKwh, currency, penaltyRate, baselineMethodology, etc. For seller: plannedDemandChange (beckn:Quantity), participatingMeters, vendorDevices, and reportDescriptors (see below). properties: reportDescriptors: description: > 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, …). oneOf: - $ref: "https://raw.githubusercontent.com/beckn/DEG/refs/heads/main/specification/schema/BecknReportDescriptors/v1.0/attributes.yaml#/components/schemas/BecknReportDescriptors" - type: "null"