[api] Refactor: move into a module. Add bdrreg api for fetching old company data.