Skip to content

Latest commit

 

History

History
122 lines (90 loc) · 1.93 KB

datasync.md

File metadata and controls

122 lines (90 loc) · 1.93 KB

Data Sync Domain

Create relations

Request

POST /relations

{
    "ssn": null,
    "tin": 12345678
}

Parameters

  • ssn: Social security number
  • tin: Company tin number

ssn and tin are mutual exclusive, one must be set.

Response

{
    "success": true
}

Internal call structure

sequenceDiagram
    autonumber
    participant spa as Single Page Application
    participant auth as Auth Domain
    participant datasync as DataSync Domain

    spa->>+auth: login
        auth ->>+ datasync: POST: /relations  {tin=12345678}
        datasync -->>- auth: Success
    auth-->>-spa: jwt / opaque token (cookie)

Loading

Get Metering points

Request

GET /meteringpoints

Parameters

-

Response

{
    "meteringpoints": [
        {
            "gsrn": "57131300000000001",
            "gridArea": "Tennet",
            "address":
                {
                    "address1": "Dieselstraße 28",
                    "address2": "3. Stock", // omitted if null
                    "locality": "Niedersachsen", // omitted if null
                    "city": "Wolfsburg",
                    "postalCode": "38446",
                    "country": "DE",
                }
        }
    ]
}

Get Measurements

Request

GET /measurements
    ?gsrn=123;456;789
    &dateFrom=1514826000
    &dateTo=1514864000

Parameters

Response

{
    "measurements": [
        {
            "gsrn": 57131300000000001,
            "dateFrom": 1514826000,
            "dateTo": 1514864000,
            "quantity": 1865880,
            "quality": 10
        },...
    ]
}

Quality enum: Measured = 10 Revised = 20 Calculated = 30 Estimated = 40