17. Counter Reading

Interface

It allows you:

  • to insert new counter readings

    • to view counter readings data - ordered by counter, index type and date read

Columns that can be used as filters:

  • SerNo

  • IndexType

  • DateRead

  • CounterReadingType

  • NewIndex

  • Description

  • Processed

  • Active

Actions can be done:

  • list

  • insert

API Methods:

List:

URL: https://api.socratecloud.com/webapi/rest/counterreading/list/{version}?startRow={0}&endRow={100}&accessToken={access_token}

Method: GET

Return: JSON object with next format:

{

"data": [

{

"SerNo": "qwerty",

"BPartner": "Client 1 Piatra Online",

"Project": "test contoare",

"DateRead": "2018-08-28 00:00:00+0300",

"details": [

{

"IndexType": "Copii Alb Negru",

"CounterReadingType": "Reading",

"NewIndex": 5500,

"Description": "test1",

"Processed": "N",

"Active": "Y"

},

{

"IndexType": "Copii Color",

"CounterReadingType": "Reading",

"NewIndex": 50,

"Description": "test",

"Processed": "N",

"Active": "Y"

},

{

"IndexType": "Scanare",

"CounterReadingType": "Reading",

"NewIndex": 13,

"Description": "test2",

"Processed": "N",

"Active": "Y"

}

]

}

],

"totalRows": 3

}

Create:

URL: https://api.socratecloud.com/webapi/rest/counterreading/create/{version}?startRow={0}&endRow={100}&accessToken={access_token}

Method: POST

Return: counter reading ID for success or error message (start with "ERROR: ")

Data format:

{

"SerNo":"qwerty",

"DateRead":"2018-08-28",

"details":[

{

"IndexType":"Copii Color",

"CounterReadingType":"Reading",

"NewIndex":50,

"Description":"test"

},

{

"IndexType":"Copii Alb Negru",

"CounterReadingType":"Reading",

"NewIndex":5500,

"Description":"test1"

},

{

"IndexType":"Scanare",

"CounterReadingType":"Reading",

"NewIndex":13,

"Description":"test2"

}

]

}