Documents
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
Using curl
cURL command
1curl 'https://www.e-bloc.ro/ajax/AjaxGetAvizierDoc.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=[MM]; 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]'
Using Postman
Request Body
1pIdAsoc=[AS-ID]&pLuna=[YYYY]-[MM]&pIdAp=[AP-ID]
Response
Success Response
Success response
1{
2 "1": {
3 "status": "ok",
4 "id": "[REP-ID]",
5 "ext": "pdf",
6 "titlu": "[TITLU]",
7 "descriere": "[DESC]",
8 "data": "[DATE]",
9 "luna": "[YYYY]-[MM]",
10 "pos": "[INDEX]"
11 }
12}
Error Response
Error Response
Error response
1{
2 "1": {
3 "status": "nologin"
4 }
5}
AjaxGetAvizierLuni
This method returns a JSON with all available date ranges for which E-BLOC has document data.
Request
Using curl
cURL command
1curl 'https://www.e-bloc.ro/ajax/AjaxGetAvizierLuni.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=[MM]; 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]'
Using Postman
Request Body
1pIdAsoc=[AS-ID]
Response
Success Response
Success response
1[
2 {
3 "status": "ok",
4 "luna": "[YYYY]-[MM]",
5 "open": "0"
6 },
7 {
8 "status": "ok",
9 "luna": "[YYYY]-[MM]",
10 "open": "0"
11 },
12 {
13 "status": "ok",
14 "luna": "[YYYY]-[MM]",
15 "open": "0"
16 }
17]
Error Response
Click to see the response
response
1{
2 "1": {
3 "status": "nologin"
4 }
5}
AjaxGetAccesBlocScara
This method will return a json with identification and the ownership of a specific AP-ID
Forge Request
Using curl
curl
1curl 'https://www.e-bloc.ro/ajax/AjaxGetAccesBlocScara.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]'
Using postman
Request Body
1pIdAsoc=[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": "[AP-ID]",
5 "id_bloc": "[BL-ID]",
6 "id_scara": "[SC-ID]"
7 }
8}
Reject Response
Click to see the response
response
1{
2 "1": {
3 "status": "nologin"
4 }
5}