================================================== Meters & Indexes ================================================== .. meta:: :description: Meter reading and index submission methods for E-BLOC platform :keywords: documentation, ebloc, meters, indexes, readings .. contents:: Table of Contents :depth: 2 :local: 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. .. dropdown:: Using curl :color: primary :icon: info .. code-block:: shell :caption: curl :linenos: curl 'https://www.e-bloc.ro/ajax/AjaxGetIndexLuni.php' \ -H 'Content-Type: application/x-www-form-urlencoded' \ -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]' \ -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' \ --data-raw 'pIdAsoc=[AS-ID]' .. .. dropdown:: Using postman .. :color: primary .. :icon: info .. .. image:: ../resources/forge-postman-getaccessblocscara.png .. :width: 400 .. :alt: getaccessblocscara .. :align: center .. .. code-block:: shell .. :caption: Request Body .. :linenos: .. pIdAsoc=[AS-ID]&pLuna=[YYYY]-[MM]&pIdAp=[AP-ID] **Response Structure** .. dropdown:: Click to see the response :color: success :icon: info .. code-block:: json :caption: response :linenos: { "1": { "status": "ok", "luna": "[YYY]-[MM]", "citiri_contoare_inceput": "[YYYY]-[MM]-[DD]", "citiri_contoare_sfarsit": "[YYYY]-[MM]-[DD]", "open": "[1 if still on else 0]" }, "2": { "status": "ok", "luna": "[YYY]-[MM]", "citiri_contoare_inceput": "[YYYY]-[MM]-[DD]", "citiri_contoare_sfarsit": "[YYYY]-[MM]-[DD]", "open": "[1 if still on else 0]" } } **Reject Response** .. dropdown:: Click to see the response :color: danger :icon: info .. code-block:: json :caption: response :linenos: { "1": { "status": "nologin" } } AjaxGetIndexContoare ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ This method will return a json with the last index and the current one for the meter **Forge Request** .. dropdown:: Using curl :color: primary :icon: info .. code-block:: shell :caption: curl :linenos: curl 'https://www.e-bloc.ro/ajax/AjaxGetIndexContoare.php' \ -H 'Content-Type: application/x-www-form-urlencoded' \ -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]' \ -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' \ --data-raw 'pIdAsoc=[AS-ID]&pLuna=[YYYY]=[MM]&pIdAp=[AP-ID]' .. .. dropdown:: Using postman .. :color: primary .. :icon: info .. .. image:: ../resources/forge-postman-getaccessblocscara.png .. :width: 400 .. :alt: getaccessblocscara .. :align: center .. .. code-block:: shell .. :caption: Request Body .. :linenos: .. pIdAsoc=[AS-ID]&pLuna=[YYYY]-[MM]&pIdAp=[AP-ID] **Response Structure** .. dropdown:: Click to see the response :color: success :icon: info .. code-block:: json :caption: response :linenos: { "1": { "status": "ok", "id_ap": "0", "id_contor": "0", "tip": "0", "titlu": "", "index_vechi": "0", "index_nou": "0", "flag": "0", "data": "", "flag_contor": "0", "guid": "" }, "2": { "status": "ok", "id_ap": "[AP-ID]", "id_contor": "[METER-ID]", "tip": "[METER-TYPE]", "titlu": "[METER-NAME]", "index_vechi": "[OLD-INDEX]", "index_nou": "[NEW-INDEX]", "flag": "[FLAG]", "data": "[YYYY]-[MM]-[DD]", "flag_contor": "[METER-FLAG]", "guid": "" } } **Reject Response** .. dropdown:: Click to see the response :color: danger :icon: info .. code-block:: json :caption: response :linenos: { "1": { "status": "nologin" } }