CreateAddressInformationCommand
Overview
The CreateAddressInformationCommand allows you to create new address records for self-service users in the loan origination system. This command enables manual entry of customer address information required for loan applications.
Handler File: CB.Administration.Api/Commands/BPM/SelfService/SelfServiceserDetailCommandHandlers.cs
Use Cases
- Recording customer residential address during loan application
- Manual address entry for customers completing applications offline
- Updating address information for existing customers
- Supporting customers without automated address verification
Request Parameters
Required Parameters
| Parameter | Type | Description |
|---|---|---|
userId | long | The ID of the self-service user |
addressLine1 | string | Primary address line (street, building) |
city | string | City name |
state | string | State or province |
country | string | Country name |
Optional Parameters
| Parameter | Type | Description |
|---|---|---|
addressLine2 | string | Secondary address line (apartment, suite) |
postalCode | string | Postal or ZIP code |
Request Example
{
"commandName": "CreateAddressInformationCommand",
"data": {
"userId": 123,
"addressLine1": "123 Main Street",
"addressLine2": "Apt 4B",
"city": "Lagos",
"state": "Lagos State",
"country": "Nigeria",
"postalCode": "100001"
}
}
Response Format
Success Response
{
"isSuccessful": true,
"statusCode": "00",
"message": "Address information created successfully.",
"data": {
"addressId": 789,
"userId": 123,
"addressLine1": "123 Main Street",
"addressLine2": "Apt 4B",
"city": "Lagos",
"state": "Lagos State",
"country": "Nigeria",
"postalCode": "100001",
"verificationStatus": 0,
"verificationStatusDesc": "PENDING",
"createdAt": "2026-01-11T10:35:00Z"
}
}
Error Response
User Not Found
{
"isSuccessful": false,
"statusCode": "04",
"message": "User not found."
}
Validation Rules
- User Existence: The
userIdmust reference an existing self-service user - Required Fields: All required parameters must be provided
- Data Integrity: Address components should be valid (non-empty strings)
Verification Status
When an address is created, it automatically receives a verification status of PENDING (0). The address must then go through the approval workflow:
- Created: Address is created with status = PENDING
- Admin Review: Admin uses
ApproveCustomerAddressInformationCommandorRejectCustomerAddressInformationCommand - Approved/Rejected: Status changes to APPROVED or REJECTED
Related Commands
- ApproveCustomerAddressInformationCommand - Approve a pending address
- RejectCustomerAddressInformationCommand - Reject a pending address
- GetCustomerAddressDetailsQuery - Retrieve address information for a user
Integration Example
cURL Request
curl -X POST https://api.banklingo.com/execute \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_TOKEN" \
-d '{
"commandName": "CreateAddressInformationCommand",
"data": {
"userId": 123,
"addressLine1": "123 Main Street",
"addressLine2": "Apt 4B",
"city": "Lagos",
"state": "Lagos State",
"country": "Nigeria",
"postalCode": "100001"
}
}'
JavaScript Example
const response = await fetch('https://api.banklingo.com/execute', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'Authorization': `Bearer ${token}`
},
body: JSON.stringify({
commandName: 'CreateAddressInformationCommand',
data: {
userId: 123,
addressLine1: '123 Main Street',
addressLine2: 'Apt 4B',
city: 'Lagos',
state: 'Lagos State',
country: 'Nigeria',
postalCode: '100001'
}
})
});
const result = await response.json();
console.log('Address created:', result.data.addressId);
C# Example
var command = new
{
CommandName = "CreateAddressInformationCommand",
Data = new
{
UserId = 123,
AddressLine1 = "123 Main Street",
AddressLine2 = "Apt 4B",
City = "Lagos",
State = "Lagos State",
Country = "Nigeria",
PostalCode = "100001"
}
};
var result = await _mediator.Send(command);
Best Practices
- Address Validation: Validate address components against known formats or postal databases
- Geocoding: Consider integrating geocoding services to validate addresses
- Standardization: Use consistent address format conventions
- Multiple Addresses: A user can have multiple addresses (home, work, mailing)
- Privacy: Treat address information as sensitive personal data
Technical Notes
- Entity:
SelfServiceAddressInformation - Database Table:
BPMLoanSelfService.SelfServiceAddressInformation - LoanQuoteId: This field is commented out in the entity - addresses are user-level, not loan-specific
- User-Level Record: Unlike guarantors, addresses belong to the user, not specific loan applications