================================================== Documents ================================================== .. meta:: :description: Document retrieval methods for E-BLOC platform :keywords: documentation, ebloc, documents, methods .. contents:: Table of Contents :depth: 2 :local: Introduction -------------------------------------------------- This section documents the methods available for retrieving document information and metadata from the E-BLOC platform. AjaxGetAvizierDoc -------------------------------------------------- This method returns a JSON with available documents for the specified request. Results are filtered by the month/year (YYYY-MM format). **Request** .. dropdown:: Using curl :color: primary :icon: info .. code-block:: shell :caption: cURL command :linenos: curl 'https://www.e-bloc.ro/ajax/AjaxGetAvizierDoc.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=[MM]; 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 .. code-block:: text :caption: Request Body :linenos: pIdAsoc=[AS-ID]&pLuna=[YYYY]-[MM]&pIdAp=[AP-ID] **Response** .. dropdown:: Success Response :color: success :icon: info .. code-block:: json :caption: Success response :linenos: { "1": { "status": "ok", "id": "[REP-ID]", "ext": "pdf", "titlu": "[TITLU]", "descriere": "[DESC]", "data": "[DATE]", "luna": "[YYYY]-[MM]", "pos": "[INDEX]" } } **Error Response** .. dropdown:: Error Response :color: danger :icon: info .. code-block:: json :caption: Error response :linenos: { "1": { "status": "nologin" } } AjaxGetAvizierLuni -------------------------------------------------- This method returns a JSON with all available date ranges for which E-BLOC has document data. **Request** .. dropdown:: Using curl :color: primary :icon: info .. code-block:: shell :caption: cURL command :linenos: curl 'https://www.e-bloc.ro/ajax/AjaxGetAvizierLuni.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=[MM]; 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-getavizierluni.png :width: 400 :alt: Get Avizier Luni in Postman :align: center .. code-block:: text :caption: Request Body :linenos: pIdAsoc=[AS-ID] **Response** .. dropdown:: Success Response :color: success :icon: info .. code-block:: json :caption: Success response :linenos: [ { "status": "ok", "luna": "[YYYY]-[MM]", "open": "0" }, { "status": "ok", "luna": "[YYYY]-[MM]", "open": "0" }, { "status": "ok", "luna": "[YYYY]-[MM]", "open": "0" } ] **Error Response** .. dropdown:: Click to see the response :color: danger :icon: info .. code-block:: json :caption: response :linenos: { "1": { "status": "nologin" } } AjaxGetAccesBlocScara ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ This method will return a json with identification and the ownership of a specific AP-ID **Forge Request** .. dropdown:: Using curl :color: primary :icon: info .. code-block:: shell :caption: curl :linenos: curl 'https://www.e-bloc.ro/ajax/AjaxGetAccesBlocScara.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": "[AP-ID]", "id_bloc": "[BL-ID]", "id_scara": "[SC-ID]" } } **Reject Response** .. dropdown:: Click to see the response :color: danger :icon: info .. code-block:: json :caption: response :linenos: { "1": { "status": "nologin" } }