bcgov / entity

ServiceBC Registry Team working on Legal Entities
Apache License 2.0
23 stars 59 forks source link

Entities: Missing business information in the business query from NameX. #24319

Open eve-git opened 6 days ago

eve-git commented 6 days ago

Namex has the following two queries from entities:

  1. get businesses ("ENTITY_SVC_URL")}/businesses/{corp_num}

  2. get corp from colin ("COLIN_SVC_URL")}/businesses/{corp_num}/public

the following info should be returned to make name-examination run properly:

BC CORP: {'identifier': corp_num,
          'incorporated': incorp_date_str,
          'directors': incorp_directors_list,
          'registered office delivery address': incorp_registered_addr_list,
          'records office delivery address': incorp_records_addr_list,
          'jurisdiction': 'BC',
          'nature of business': incorp_nob
}

XPRO CORP: {'identifier': corp_num,
            'incorporated': incorp_date_str,
            'directors': incorp_directors_list,
            'attorney names': incorp_attorneys_list,
            'head office': incorp_ho_addr_list,
            'jurisdiction': incorp_jurisdiction,
            'nature of business': incorp_nob
}

for example:

XPRO CORP:{
    "directors": "Not Available",
    "incorp #": "XS1000661",
    "incorporated": "2016-12-08",
    "jurisdiction": "BC",
    "nature of business": "Not Available",
    "records office delivery address": "Not Available",
    "registered office delivery address": [
        "VICTORIA",
        "BC",
        "CA",
        "V8Y 3B6"
    ]
}
ozamani9gh commented 1 day ago

Omid to discuss with @severinbeauvais about who should complete work.

severinbeauvais commented 1 day ago

We should talk about what you need. I see you want directors and addresses in the business response -- but we have separate endpoints for that already. As for the COLIN call, I haven't confirmed that COLIN provides all the information you want.

cc: @vysakh-menon-aot

severinbeauvais commented 1 day ago

Also, when do you need this by?

vysakh-menon-aot commented 1 day ago

public endpoint in colin is intent to provide the basic details of business.

I could see few endpoints, lear is not using these (but not sure if someone is using these). you can try if it works get party https://github.com/bcgov/lear/blob/main/colin-api/src/colin_api/resources/parties.py get office https://github.com/bcgov/lear/blob/main/colin-api/src/colin_api/resources/office.py

eve-git commented 18 hours ago

@vysakh-menon-aot The links provided above might work, but they require the 'colin' role for access. Namex accesses public business information through:

f'{current_app.config.get("COLIN_SVC_URL")}/businesses/{corp_num}/public

Is it possible to make the parties and offices endpoints publicly accessible in a similar way?

severinbeauvais commented 15 hours ago

@eve-git , you are right: the parties and office endpoints require the "COLIN_SVC_ROLE", while the public endpoint just requires an auth token.

@vysakh-menon-aot , is there any reason to not change parties and office to match public?

@OlgaPotiagalova Maybe we do need some changes to our COLIN API for this.

vysakh-menon-aot commented 14 hours ago

If we change similar to public anyone who logged in to registries can access other business parties and offices (which i don't think is right)

severinbeauvais commented 14 hours ago

Good point. What's the alternative?

Could the Namex API use a JWT with the COLIN role?

vysakh-menon-aot commented 14 hours ago

Yes. @eve-git use entity-service-account jwt token