Skip to content

Data Models

OSCP 2.0 structures capacity, metering, and configuration data so Capacity Providers, Flexibility Providers, and Capacity Optimizers can exchange consistent payloads.

Essentials

  • ForecastedBlock captures interval capacity with type, value, unit, phase, and start/end times.
  • Capacity types cover normal, fallback, and optimum limits (CONSUMPTION, GENERATION, FALLBACK_CONSUMPTION, FALLBACK_GENERATION, OPTIMUM).
  • Measurements can be accumulated (energy) or instantaneous (power/current/SoC), tagged with phase, unit, and direction.
  • See docs/schemas/ for JSON Schemas used in validation.

Time Format Requirements

  • All datetimes MUST follow RFC3339 with an explicit time zone (Z or +/-HH:MM).
  • Receivers must always interpret timestamps unambiguously.
  • Use of UTC is recommended but not required.

Core Data Types

Structured datatypes used across OSCP 2.0 messages. Values and cardinalities align with the JSON Schemas in docs/schemas.

VersionURL

Represents a supported OSCP version and its base URL.

Field Type Card. Notes
version string 1..1 Example: 2.0
base_url URL 1..1 Should include protocol; avoid trailing slash

Example:

{
  "version": "2.0",
  "base_url": "https://server/oscp/cp/2.0"
}

RequiredBehaviour

Operational constraints exchanged during handshake.

Field Type Card. Notes
heartbeat_interval number 0..1 Seconds; recommended ≥ 1
measurement_configuration MeasurementConfiguration[] 1..* Required; array of unique items

An empty object is not allowed because measurement_configuration is required.

MeasurementConfiguration (enum)

Value Meaning
CONTINUOUS Meter values never reset (e.g., household meter)
INTERMITTENT Meter resets at defined events (e.g., EV session start)

If INTERMITTENT is used, the relevant measurement should include initial_measure_time.

CapacityForecastType (enum)

Value Meaning
CONSUMPTION Max import capacity
GENERATION Max export capacity
FALLBACK_CONSUMPTION Max import when offline
FALLBACK_GENERATION Max export when offline
OPTIMUM Preferred target (import or export)

ForecastedBlock

Single interval containing capacity information.

Field Type Card. Notes
capacity number 1..1 Non-negative forecast value
phase PhaseIndicator 1..1 Applies to this phase
unit ForecastedBlockUnit 1..1 A, W, KW, WH, or KWH
start_time datetime 1..1 Interval start
end_time datetime 1..1 Interval end

ForecastedBlockUnit (enum)

Value Meaning
A Amperes per phase (current)
W Watts (power)
KW Kilowatts (power)
WH Watt-hours (energy)
KWH Kilowatt-hours (energy)

PhaseIndicator (enum)

Value Meaning
UNKNOWN Phase not known / irrelevant
ONE Phase 1
TWO Phase 2
THREE Phase 3
ALL Sum across all phases

AssetMeasurement

Measurement payload for a single Flexibility Resource.

Field Type Card. Notes
asset_id string 1..1 Unique identifier
asset_category AssetCategory 1..1 Device type
energy_measurement EnergyMeasurement 0..1 Accumulated reading
instantaneous_measurement InstantaneousMeasurement 0..1 Real-time reading

Schema permits either or both measurement types; implementations typically send one at a time.

AssetCategory (enum)

Value Meaning
CHARGING EVSE (bidirectional or unidirectional)
CONSUMPTION Non-charging loads
GENERATION PV, wind, generators
STORAGE Stationary two-way storage (batteries)

EnergyFlowDirection (enum)

Value Meaning
NET Net energy (import minus export)
IMPORT Energy into the asset
EXPORT Energy out of the asset

EnergyMeasurement

Accumulated energy usage over time.

Field Type Card. Notes
value number 1..1 Energy value
phase PhaseIndicator 1..1 Phase reference
unit EnergyMeasurementUnit 1..1 WH or KWH
direction EnergyFlowDirection 1..1 Import, export, or net
energy_type EnergyType 0..1 Flexible, non-flexible, or total
measure_time datetime 1..1 Timestamp of reading
initial_measure_time datetime 0..1 Session start time if intermittent

If INTERMITTENT measurement configuration is required, include initial_measure_time.

EnergyMeasurementUnit (enum)

Value Meaning
WH Watt-hours
KWH Kilowatt-hours

EnergyType (enum)

Value Meaning
FLEXIBLE Energy from flexible assets
NONFLEXIBLE Energy from non-flexible loads
TOTAL Total energy (default if omitted)

InstantaneousMeasurement

Non-accumulated real-time values (power, current, or state of charge).

Field Type Card. Notes
value number 1..1 Instant value
phase PhaseIndicator 1..1 Relevant phase
unit InstantaneousMeasurementUnit 1..1 A, W, KW, WH, or KWH
measure_time datetime 1..1 Timestamp

InstantaneousMeasurementUnit (enum)

Value Meaning
A Amperes per phase
W Watts
KW Kilowatts
WH Watt-hours (e.g., battery SoC)
KWH Kilowatt-hours (e.g., battery SoC)