{
    "type": "object",
    "properties": {
        "transactionId": {
            "type": "integer"
        },
        "transactionData": {
            "type": "array",
            "items": {
                "type": "object",
                "properties": {
                    "values": {
                        "type": "array",
                        "items": {
                            "type": "object",
                            "properties": {
                                "timestamp": {
                                    "type": "string",
                                    "format": "date-time"
                                },
                                "value": {
                                    "type": "array",
                                    "items": {
                                        "type": "object",
                                        "properties": {
                                            "$value": {
                                                "type": "string"
                                            },
                                            "attributes": {
                                                "type": "object",
                                                "properties": {
                                                    "context": {
                                                        "type": "string",
                                                        "enum": [
                                                            "Interruption.Begin",
                                                            "Interruption.End",
                                                            "Sample.Clock",
                                                            "Sample.Periodic",
                                                            "Transaction.Begin",
                                                            "Transaction.End"
                                                        ]
                                                    },
                                                    "format": {
                                                        "type": "string",
                                                        "enum": [
                                                            "Raw",
                                                            "SignedData"
                                                        ]
                                                    },
                                                    "measurand": {
                                                        "type": "string",
                                                        "enum": [
                                                            "Energy.Active.Export.Register",
                                                            "Energy.Active.Import.Register",
                                                            "Energy.Reactive.Export.Register",
                                                            "Energy.Reactive.Import.Register",
                                                            "Energy.Active.Export.Interval",
                                                            "Energy.Active.Import.Interval",
                                                            "Energy.Reactive.Export.Interval",
                                                            "Energy.Reactive.Import.Interval",
                                                            "Power.Active.Export",
                                                            "Power.Active.Import",
                                                            "Power.Reactive.Export",
                                                            "Power.Reactive.Import",
                                                            "Current.Export",
                                                            "Current.Import",
                                                            "Voltage",
                                                            "Temperature"
                                                        ]
                                                    },
                                                    "location": {
                                                        "type": "string",
                                                        "enum": [
                                                            "Inlet",
                                                            "Outlet",
                                                            "Body"
                                                        ]
                                                    },
                                                    "unit": {
                                                        "type": "string",
                                                        "enum": [
                                                            "Wh",
                                                            "kWh",
                                                            "varh",
                                                            "kvarh",
                                                            "W",
                                                            "kW",
                                                            "var",
                                                            "kvar",
                                                            "Amp",
                                                            "Volt",
                                                            "Celsius"
                                                        ]
                                                    }
                                                }
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    }
                }
            }
        },
        "idTag": {
            "type": "string",
            "maxLength": 20
        },
        "timestamp": {
            "type": "string",
            "format": "date-time"
        },
        "meterStop": {
            "type": "integer"
        }
    },
    "additionalProperties": false,
    "required": [
        "transactionId",
        "timestamp",
        "meterStop"
    ]
}
