KYB
The KYB (Know Your Business) process is needed by Bcode in order to validate their own business and start to create DPPs for their products.
After the registration the platform will prompt a modal asking you to complete the KYB process in order to continue using the application at its full potential.

1. Verify Business
POST /verify-business
Description: Verifies the KYB data for a business based on the provided VAT or tax code and updates the status in the database.
Request Body:
{
    "userId": "string",
    "userData": {
        "vat_number": "string",
        "street_address": "string",
        "zip_or_postal_code": "string",
        "city_or_town": "string",
        "district_or_province": "string",
        "sdi_or_pec": "string",
        "rea_code": "string",
        "country_code": "string",
        "company_name": "string"
    }
}
Response:
| Status | Description | 
|---|---|
| 200 OK | The KYB verification is successful, and the status is updated. | 
| 406 Not Acceptable | KYB data not found for the provided user. | 
| 500 Internal Server Error | An error occurred during the KYB verification. | 
Response Object:
{
    "message": "string",
    "ok": true,
    "companyInfo": {
        "vat": "string",
        "street_address": "string",
        "zip_or_postal_code": "string",
        "city_or_town": "string",
        "district_or_province": "string",
        "rea_code": "string",
        "sdi_or_pec": "string",
        "status": "string"
    }
}
2. View KYB Data
GET /kyb-data/:userId
Description: Retrieves the KYB data for a user identified by their user ID.
Parameters:
- userId: The ID of the user for whom KYB data is being retrieved.
Response:
| Status | Description | 
|---|---|
| 200 OK | Successfully fetched the KYB data for the user. | 
| 406 Not Acceptable | KYB data not found for the provided user. | 
| 500 Internal Server Error | An error occurred while fetching KYB data. | 
Response Object:
{
    "data": {
        "company_name": "string",
        "vat_number": "string",
        "street_address": "string",
        "zip_or_postal_code": "string",
        "city_or_town": "string",
        "district_or_province": "string",
        "sdi_or_pec": "string",
        "rea_code": "string",
        "country_code": "string"
    }
}