POST /api/v1/clients/resolve
Identifies and verifies a client in a single call, without needing to know their service_id beforehand. The endpoint searches for candidate clients by name and tests each one against the provided data. Useful for users without a registered document or phone number.Request Body
The client’s name to search and verify. Used as the primary search criterion if provided.
The client’s address to verify. Used as a fallback search criterion if name is not provided. Common prefixes like “V/”, “VDA/”, “VEREDA”, “BARRIO”, “B/” are automatically normalized.
The name of the internet plan to verify.
The price of the internet plan to verify. Allows a tolerance of ±1.0 for matching.
At least 3 of the 4 fields (name, address, internet_plan_name, internet_plan_price) must be provided. The endpoint requires sufficient data to accurately identify and verify the client.
Response
Returns aBackendResponse containing the identified and verified client.
Indicates if the request was successful
Response type (e.g., “success”, “error”)
Action identifier:
client_verified, client_not_found, or client_verification_failedThe identified client’s complete information
Descriptive message about the resolution result
Example Request
Example Response
Successful resolution
Error Responses
400 Bad Request - Insufficient fields
Less than 3 fields were provided
404 Not Found - No candidates
No clients were found matching the search query
404 Not Found - No match
Candidates were found but none matched all the provided data
How It Works
- Search Phase: The endpoint first searches for candidate clients using the name (or address if name is not provided) as the search query
- Scoring Phase: Each candidate is scored based on how many fields match the provided data
- Verification Phase: A candidate is considered verified only if ALL provided fields match
Verification Logic
String Matching: Uses normalized partial string matching. For addresses, common prefixes like “V/”, “VDA/”, “VEREDA”, “BARRIO”, and “B/” are automatically stripped before comparison.
Price Tolerance: When comparing prices, a tolerance of ±1.0 is allowed to account for rounding differences.
Perfect Match Required: The client is only verified if the number of matched fields equals the number of fields provided. Partial matches are rejected to ensure identity accuracy.
Comparison with Verify Endpoint
| Feature | /resolve | /verify |
|---|---|---|
| Requires service_id | No | Yes |
| Searches for client | Yes | No |
| Returns client data | Yes | No (returns verification result) |
| Use case | Don’t know service_id | Already have service_id |
Use Cases
- WhatsApp Bot Onboarding: First-time users who don’t have document or phone registered can identify themselves
- Self-Service Portal: Allow clients to find their account using billing information
- Customer Support: Identify callers who don’t remember their account number
- Alternative Verification: Verify identity when traditional methods (document/phone) are not available
