================================================== Generic Methods ================================================== .. meta:: :description: Generic API methods for E-BLOC platform :keywords: documentation, ebloc, methods, generic .. contents:: Table of Contents :depth: 2 :local: AjaxGetHomeAp -------------------------------------------------- This method returns a JSON with the apartment IDs (AP-ID) that the user has access to, based on the association ID (AS-ID). **Request** .. dropdown:: Using curl :color: primary :icon: info .. code-block:: shell :caption: cURL command :linenos: curl 'https://www.e-bloc.ro/ajax/AjaxGetHomeAp.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]&pTip=1' .. dropdown:: Using Postman :color: primary :icon: info .. image:: ../../resources/forge-postman-gethomeap.png :width: 400 :alt: Get Home AP in Postman :align: center .. code-block:: text :caption: Request Body :linenos: pIdAsoc=[AS-ID]&pTip=1 **Response** .. dropdown:: Success Response :color: success :icon: info .. code-block:: json :caption: Success response :linenos: [ { "status": "ok", "id_ap": "[AP-ID]", "prefix_smart": "", "titlu": "Apartament [AP-NR]" } ] **Error Response** .. dropdown:: Error Response :color: danger :icon: info .. code-block:: json :caption: Error response :linenos: { "1": { "status": "nologin" } }