# ID Verification Service
The objective of this system is to create an API to receive a user’s personal identification number (ID number) and run a service to obtain and extract credit score data and other important information from a 3rd party API that will be used as a grounding for an AML (Anti Money Laundering) system.
### Technical Spec
- Allow a user / API to register and authenticate (Using JWT Authentication) to the service.
- Allow a user to hit an endpoint that will
check if the system has its details on file.
- If yes then return stored data (From a previous fetch to the `Consumer API`).
- If not, hit the 3rd party API (`consumer API`), parse and store received data. If the ID number is linked to a company and said company data (check via company ID) is not within the system hit 3rd party API (`Commercial API`), parse and store received company data.
### Data Models
- Users: APIs / users that register with email address to use our ID Verification Service API.
- AdminUsers: Users that will have access to the ActiveAdmin Dashboard (super users)
- PersonalInformation: A table to store the parsed data received from the `Consumer API`
- CompanyInformation: A table to store company registration information
- This table will have a relationship to PersonalInformation (PersonalInformation has_many CompanyInformations)
- ie When fetching PersonalInformation if the person in question returns company information create parsed instances for each company and store as CompanyInformation
> Note: If further tables are needed create them at discretion.
- Rails API
- Postman Collection
- Heroku Deployed system
> Note: All functions available within the API should be able to be done through the activeadmin tabs. (ie: search id number and review data or ping id number and retire 3rd party data)
### Technical Requirements
- Wherever relevant all fields should be validated to make sure that a value has been entered and that that value is valid (field validation)
- Add CRUD operations for API endpoints and create a Postman collection for the created API ([login to view URL])
- Add activeadmin pages and db tables wherever necessary
- Add tests for all required controllers, models and services
- Use environment variables to store any secrets or credentials (using [login to view URL]) where relevant (such as API keys)
### Provided Resources
- Empty Github Repo
- Heroku Access
- API docs (Consumer & Commerical)
- test credentials