code4romania / code4romania/onghub

Pre-fill some NGO information based on their CUI

Open
#574 0 comments 0 reactions 0 assignees View on GitHub
enhancement :rocket:
Dominant language
TypeScript
Stars
6
Forks
5
PR merge metrics
No merged PRs in 30d

Description

**Is your feature request related to a problem? Please describe.**
Some of the data we request from NGOs already exists in _some_ public endpoints.
At the same time, some NGOs may provide wrong data (intentionally or by mistake).
Calling such an endpoint could help us pre-fill some of the information NGOs are supposed to give us and, at the same time, make sure that they are providing accurate information.

**Describe the solution you'd like**
On account creation, the `CUI Field` should be the first field to be filled by NGOs, and the `Official Name Field` should become read-only (while keeping the ability to edit it in the admin, after the organization joins NGO Hub – some organizations change their name).
The name of the organization should be filled out based on the information from a query made with the CUI of the NGO.

Sample request:
```sh
curl -H 'Content-Type: application/json' \
-d '[{"cui":36317167, "data": "2024-07-11"}]' \
-X POST \
https://webservicesp.anaf.ro/RegCult/api/v2/ws/cult
```

Corresponding response:
```json
{
"cod": 200,
"message": "SUCCESS",
"found": [
{
"cui": 36317167,
"data": "2024-07-11",
"denumire": "ASOCIATIA CODE FOR ROMANIA - CODEAZA PENTRU ROMANIA",
"adresa": "MUNICIPIUL BUCUREŞTI, SECTOR 3, PŢA. ALBA IULIA, NR.7, BL.I 6, SC.1, ET.1, AP.6",
"telefon": "0741151350",
"codPostal": "31103",
"act": "DOSAR NR.34426/301/17/20.01.2017, 18856/301/234/07.10.2020",
"stare_inregistrare": "INREGISTRAT din data 14.07.2016",
"dataInceputRegCult": "2019-04-17",
"dataAnulareRegCult": " ",
"statusRegCult": true
}
]
}
```

**Describe alternatives you've considered**
If better endpoint/endpoints, with more accurate information, exist we should use that.
We just need to make sure the information is obtained from a reliable state source.

**Additional context**
To better understand the information from the endpoint, the CUI of different NGOs from the National Registry can be checked to better verify how it works
https://www.just.ro/registrul-national-ong/
- how the different properties change
- how quickly NGOs are available in this list

Other relevant ANAF URLs:
> :link: ANAF Services
> https://www.anaf.ro/anaf/internet/ANAF/servicii_online/servicii_web_anaf
> :link: Endpoint docs
> https://static.anaf.ro/static/10/Anaf/Informatii_R/index_cult_v2.html

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.