Skip to main content

GET /api/v1/clients/by-phone/

Retrieves client information using their phone number. The system automatically cleans the number (removes prefixes like ’+’) and performs the search in WispHub.

Path Parameters

phone
string
required
The client’s phone number. Can include country code and special characters (e.g., +573001234567, 3001234567). The system will automatically clean and normalize the number.

Response

Returns a BackendResponse containing a single ClientResponse object.
ok
boolean
required
Indicates if the request was successful
type
string
required
Response type (e.g., “success”, “error”)
action
string
required
Action identifier: client_found or client_not_found
data
object
Client information object
message
string
Optional message providing additional context

Example Request

curl -X GET "https://api.wisphub.example/api/v1/clients/by-phone/%2B573001234567" \
  -H "Content-Type: application/json"

Example Response

{
  "ok": true,
  "type": "success",
  "action": "client_found",
  "data": {
    "service_id": 12345,
    "name": "Juan Pérez",
    "document": "1234567890",
    "phone": "+573001234567",
    "address": "Calle 123 #45-67",
    "city": "Bogotá",
    "locality": "Centro",
    "payment_status": "active",
    "zone_id": 5,
    "antenna_ip": "192.168.1.1",
    "cut_off_date": "2026-03-15",
    "outstanding_balance": 0.0,
    "lan_interface": "eth0",
    "internet_plan_name": "Plan 50MB",
    "internet_plan_price": 50000.0,
    "technician_id": 10
  },
  "message": null
}

Error Responses

404 Not Found
No client found with the provided phone number
{
  "ok": false,
  "type": "error",
  "action": "client_not_found",
  "data": null,
  "message": "Client not found"
}
Phone numbers are automatically normalized by the system. You can provide the number with or without country code, and with or without special characters. The system will handle the formatting.
Remember to URL-encode the phone number if it contains special characters like ’+’ when making the request.