Meters & Indexes

Introduction

This section documents methods for managing meter readings and index submissions on the E-BLOC platform.

AjaxGetIndexLuni

This method returns JSON with a list of all periods available for submitting meter data.

Using curl
curl
1curl 'https://www.e-bloc.ro/ajax/AjaxGetIndexLuni.php' \
2   -H 'Content-Type: application/x-www-form-urlencoded' \
3   -b 'username=[EMAIL]; facturi-luna-cur=-; index-luna-cur=-; asoc-cur=[AS-ID]]; home-ap-cur=[AS-ID]-[AP-ID]; home-stat-cur=[?]; PHPSESSID=[COOKY]; avizier-luna-cur=[YYYY]-[MM]' \
4   -H 'User-Agent: Mozilla/5.0 (Linux; Android 6.0; Nexus 5 Build/MRA58N) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/143.0.0.0 Mobile Safari/537.36' \
5   --data-raw 'pIdAsoc=[AS-ID]'

Response Structure

Click to see the response
response
 1{
 2    "1": {
 3      "status": "ok",
 4      "luna": "[YYY]-[MM]",
 5      "citiri_contoare_inceput": "[YYYY]-[MM]-[DD]",
 6      "citiri_contoare_sfarsit": "[YYYY]-[MM]-[DD]",
 7      "open": "[1 if still on else 0]"
 8   },
 9   "2": {
10      "status": "ok",
11      "luna": "[YYY]-[MM]",
12      "citiri_contoare_inceput": "[YYYY]-[MM]-[DD]",
13      "citiri_contoare_sfarsit": "[YYYY]-[MM]-[DD]",
14      "open": "[1 if still on else 0]"
15   }
16}

Reject Response

Click to see the response
response
1{
2   "1": {
3      "status": "nologin"
4   }
5}

AjaxGetIndexContoare

This method will return a json with the last index and the current one for the meter

Forge Request

Using curl
curl
1curl 'https://www.e-bloc.ro/ajax/AjaxGetIndexContoare.php' \
2   -H 'Content-Type: application/x-www-form-urlencoded' \
3   -b 'username=[EMAIL]; facturi-luna-cur=-; index-luna-cur=-; asoc-cur=[AS-ID]]; home-ap-cur=[AS-ID]-[AP-ID]; home-stat-cur=[?]; PHPSESSID=[COOKY]; avizier-luna-cur=[YYYY]-[MM]' \
4   -H 'User-Agent: Mozilla/5.0 (Linux; Android 6.0; Nexus 5 Build/MRA58N) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/143.0.0.0 Mobile Safari/537.36' \
5   --data-raw 'pIdAsoc=[AS-ID]&pLuna=[YYYY]=[MM]&pIdAp=[AP-ID]'

Response Structure

Click to see the response
response
 1{
 2   "1": {
 3      "status": "ok",
 4      "id_ap": "0",
 5      "id_contor": "0",
 6      "tip": "0",
 7      "titlu": "",
 8      "index_vechi": "0",
 9      "index_nou": "0",
10      "flag": "0",
11      "data": "",
12      "flag_contor": "0",
13      "guid": ""
14   },
15   "2": {
16      "status": "ok",
17      "id_ap": "[AP-ID]",
18      "id_contor": "[METER-ID]",
19      "tip": "[METER-TYPE]",
20      "titlu": "[METER-NAME]",
21      "index_vechi": "[OLD-INDEX]",
22      "index_nou": "[NEW-INDEX]",
23      "flag": "[FLAG]",
24      "data": "[YYYY]-[MM]-[DD]",
25      "flag_contor": "[METER-FLAG]",
26      "guid": ""
27   }
28}

Reject Response

Click to see the response
response
1{
2   "1": {
3      "status": "nologin"
4   }
5}