<back to all web services

ReadingsBulk

The following routes are available for this service:
GET/v8/readings-bulk
GET/v8/readings-bulk/{from}
using System;
using System.IO;
using System.Collections;
using System.Collections.Generic;
using System.Runtime.Serialization;
using ServiceStack;
using ServiceStack.DataAnnotations;
using SDS.V8.APIs.P4.EU.ServiceModel;
using SDS.V8.APIs.P4.EU.ServiceModel.Types;
using SDS.P4.Common.DTO.EDSN;

namespace SDS.P4.Common.DTO.EDSN
{
    public partial class P4ReadingDay
    {
        public virtual string Ean { get; set; }
        public virtual string MeterId { get; set; }
        public virtual DateOnly QueryDate { get; set; }
        public virtual string MeasureUnit { get; set; }
        public virtual decimal? R180 { get; set; }
        public virtual decimal? R181 { get; set; }
        public virtual decimal? R182 { get; set; }
        public virtual decimal? R280 { get; set; }
        public virtual decimal? R281 { get; set; }
        public virtual decimal? R282 { get; set; }
    }

    public partial class P4ReadingInterval
    {
        public virtual string Ean { get; set; }
        public virtual string MeterId { get; set; }
        public virtual DateOnly QueryDate { get; set; }
        public virtual string MeasureUnit { get; set; }
        public virtual List<P4ReadingIntervalItem> Items { get; set; }
    }

    public partial class P4ReadingIntervalItem
    {
        public virtual DateTimeOffset DateTimeOffset { get; set; }
        public virtual decimal R180 { get; set; }
        public virtual decimal? R280 { get; set; }
    }

    public partial class P4Rejection
    {
        public virtual string Ean { get; set; }
        public virtual DateOnly QueryDate { get; set; }
        public virtual string QueryReason { get; set; }
        public virtual string RejectionCode { get; set; }
        public virtual string RejectionText { get; set; }
    }

}

namespace SDS.V8.APIs.P4.EU.ServiceModel
{
    public partial class Generic
    {
        ///<summary>
        ///Api-key. Used to provide credentials to the api. Can also be provided through the request headers with key: X-API-KEY
        ///</summary>
        [ApiMember(DataType="String", Description="Api-key. Used to provide credentials to the api. Can also be provided through the request headers with key: X-API-KEY", IsRequired=true, Name="ApiKey")]
        public virtual string ApiKey { get; set; }
    }

    public partial class ReadingsBulk
        : Generic, IGet
    {
        ///<summary>
        ///If not given, the first object is given after the last request, otherwise gives the first ... data objects received from EDSN/Grid operator received after the given time stamp. Keep in mind, the time stamp is related to when SDS received the data from EDSN, not the date of the data itself!
        ///</summary>
        [ApiMember(DataType="Time stamp with format: yyyyMMdd-HHmmss-ffffff", Description="If not given, the first object is given after the last request, otherwise gives the first ... data objects received from EDSN/Grid operator received after the given time stamp. Keep in mind, the time stamp is related to when SDS received the data from EDSN, not the date of the data itself!", Name="From")]
        public virtual string From { get; set; }

        ///<summary>
        ///Include received interval objects in the result
        ///</summary>
        [ApiMember(DataType="Boolean, default: true", Description="Include received interval objects in the result", Name="IncludeIntervalObjects")]
        public virtual bool IncludeIntervalObjects { get; set; }

        ///<summary>
        ///Include received day objects in the result
        ///</summary>
        [ApiMember(DataType="Boolean, default: false", Description="Include received day objects in the result", Name="IncludeDayObjects")]
        public virtual bool IncludeDayObjects { get; set; }

        ///<summary>
        ///Gives option to filter return objects, for example to get always only hour records or day records
        ///</summary>
        [ApiMember(DataType="Enum: None, Hour, Day, LastDayOnly, Month", Description="Gives option to filter return objects, for example to get always only hour records or day records", Name="ObjectFilter")]
        public virtual Filter ObjectFilter { get; set; }
        public enum Filter
        {
            None,
            Hour,
            Day,
            LastDayOnly,
            Month,
        }

    }

}

namespace SDS.V8.APIs.P4.EU.ServiceModel.Types
{
    public partial class P4ReadingsBulk
    {
        public virtual string Message { get; set; }
        public virtual string TimeStamp { get; set; }
        public virtual int? DayObjectCount { get; set; }
        public virtual int? IntervalObjectCount { get; set; }
        public virtual int? RejectionObjectCount { get; set; }
        public virtual List<P4ReadingDay> DayObjects { get; set; }
        public virtual List<P4ReadingInterval> IntervalObjects { get; set; }
        public virtual List<P4Rejection> RejectionObjects { get; set; }
    }

}

C# ReadingsBulk DTOs

To override the Content-type in your clients, use the HTTP Accept Header, append the .other suffix or ?format=other

HTTP + OTHER

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

GET /v8/readings-bulk HTTP/1.1 
Host: p4.smartdatasolutions.eu 
Accept: text/jsonl
HTTP/1.1 200 OK
Content-Type: text/jsonl
Content-Length: length

{"message":"String","timeStamp":"String","dayObjectCount":0,"intervalObjectCount":0,"rejectionObjectCount":0,"dayObjects":[{"ean":"String","meterId":"String","queryDate":"0001-01-01","measureUnit":"String","r180":0,"r181":0,"r182":0,"r280":0,"r281":0,"r282":0}],"intervalObjects":[{"ean":"String","meterId":"String","queryDate":"0001-01-01","measureUnit":"String","items":[{"dateTimeOffset":"0001-01-01T00:00:00+00:00","r180":0,"r280":0}]}],"rejectionObjects":[{"ean":"String","queryDate":"0001-01-01","queryReason":"String","rejectionCode":"String","rejectionText":"String"}]}