Skip to main content

CreateCorporateQuoteUserDetailCommand

Overview​

Creates the temporary corporate administrator profile used to start an anonymous corporate loan application. The command validates that the corporate customer already exists on BankOne, verifies that the supplied account belongs to that customer and is configured as a corporate savings/current account, creates the quote and pre-registration records, and sends the registration OTP to the administrator's mobile number.

This command does not create the loan application itself. Complete SMS OTP verification first, then call CreateSelfServiceLoanRequestCommand using the returned QuoteUserDetailId as quoteUserId.

Sample Request​

{
"cmd": "CreateCorporateQuoteUserDetailCommand",
"data": {
"firstName": "Amina",
"lastName": "Bello",
"middleName": "Zainab",
"mobileNumber": "08031234567",
"mobileCountryCode": "+234",
"emailAddress": "amina.bello@example.com",
"dateOfBirth": "1988-04-21",
"gender": "Female",
"biometricsId": "22200000001",
"companyName": "Bello Trading Limited",
"companyAddress": "15 Marina Road, Lagos",
"companyRegistrationNumber": "RC1234567",
"companyTaxNumber": "TIN-987654321",
"accountNumber": "0041234567",
"provider": 1
}
}

Parameters​

ParameterTypeRequiredDescription
firstNamestringYesCorporate administrator's first name.
lastNamestringYesCorporate administrator's last name.
middleNamestringNoCorporate administrator's middle name.
mobileNumberstringYesMobile number registered against the existing BankOne customer. Supply the local number because mobileCountryCode is sent separately.
mobileCountryCodestringYesCountry dialling code, for example +234.
emailAddressstringYesAdministrator's email address. The temporary first-time password is sent here after OTP verification.
dateOfBirthstringYesAdministrator's date of birth. ISO 8601 (YYYY-MM-DD) is recommended.
genderstringYesAdministrator's gender.
biometricsIdstringYesBVN used to locate the existing corporate customer on BankOne.
companyNamestringYesRegistered company name.
companyAddressstringYesRegistered company address.
companyRegistrationNumberstringYesCompany registration number, such as an RC number.
companyTaxNumberstringNoCompany tax identification number.
accountNumberstringYesCorporate NUBAN or internal BankOne account number belonging to the customer.
providerintegerNoCore banking provider. Defaults to 1 (BankOne_EmpireTrust). 2 selects BankOne_CityGate.

Validation​

The command rejects the request when:

  • A self-service profile already uses the supplied email address, BVN, or mobile number.
  • An incomplete pre-registration already uses the supplied email address, BVN, or mobile number.
  • The BVN does not resolve to an existing BankOne customer. Corporate quote onboarding does not create a new core-banking customer.
  • The supplied mobile number does not match the number held for the BankOne customer.
  • The supplied account does not belong to that customer or is not a savings/current account.
  • The account product code is not included in BankOne:CorporateAccountProductCodes.
  • The corporate administrator role or a self-service branch is not configured.

The company name, address, registration number, and tax number are captured for the new self-service corporate profile. BankOne validation is based on the existing customer, mobile number, account ownership, account type, and configured corporate product code.

Success Response​

The command returns status code 44 because OTP verification is still required.

{
"ok": true,
"statusCode": "44",
"message": "Corporate quote user created successfully. An OTP has been sent to the customer mobile number for verification.",
"outData": {
"QuoteUserDetailId": 451,
"DisplayName": "BELLO AMINA ZAINAB",
"CompanyName": "Bello Trading Limited",
"AccountNumber": "0041234567",
"RequestId": "5A2EDB21-92CB-4662-9C04-5165B3597220",
"UserId": 812,
"EmailAddress": "amina.bello@example.com",
"VerificationType": "REGISTRATION",
"AccountType": "CORPORATE"
}
}

Keep QuoteUserDetailId, RequestId, and UserId; they are required by the next steps.

Complete the Flow​

1. Validate the SMS OTP​

Send the OTP received on the mobile number together with the UserId and RequestId returned above. verificationMethodType: 2 means SMS.

{
"cmd": "ValidateOtpCommand",
"data": {
"userId": 812,
"requestId": "5A2EDB21-92CB-4662-9C04-5165B3597220",
"otp": "483921",
"verificationMethodType": 2
}
}

For a quote-originated registration, successful OTP validation automatically:

  1. Completes the pending registration on the backend.
  2. Creates the SelfServiceCorporateProfile.
  3. Creates its corporate administrator SelfServiceUser.
  4. Assigns that user as the corporate profile administrator.
  5. Links the new user to QuoteUserDetail.
  6. Sends a temporary first-time password to the administrator's email address.

Do not call CompleteRegistrationCommand separately for this flow.

2. Create the Loan Request​

The loan can be submitted without a bearer token by supplying the QuoteUserDetailId returned by the first command as quoteUserId. The server rejects this request if OTP verification has not completed.

{
"cmd": "CreateSelfServiceLoanRequestCommand",
"data": {
"quoteUserId": 451,
"productCode": "BUSINESS-LOAN-01",
"loanAmount": 5000000,
"loanPurpose": "Purchase additional inventory",
"loanTenor": 12,
"loanTenorType": 2,
"referredByType": 0
}
}

Alternatively, the administrator can log in using the emailed temporary password and submit CreateSelfServiceLoanRequestCommand as an authenticated user; in that case quoteUserId is not required.

3. Continue the Normal Loan Origination Journey​

Use the loanQuoteId returned by CreateSelfServiceLoanRequestCommand for the remaining application steps required by the selected product and workflow, such as documents, guarantors, KYC checks, collection details, and approval initiation.

Deployment and Configuration Prerequisites​

  • Apply the AddCorporateQuoteUserDetails database migration before using the command.
  • Configure BankOne:CorporateAccountProductCodes with the allowed corporate product codes.
  • Configure the CORPORATE_ADMINISTRATOR self-service role.
  • Configure at least one self-service branch; preferably mark one as the default branch.
  • Ensure SMS delivery is configured. Registration delivery is selected by SEND_REG_OTP_TO_SMS_INSTEAD_OF_EMAIL, which is currently true.
  • Ensure email delivery is configured for the temporary first-time password.
  • Configure the cmdBankLingoPreLoanQuoteRequestValidation command chain before submitting the loan request.