Skip to main content

GET /api/v1/clients/by-document/

Retrieves client information using their identity document (cédula). Searches the WispHub system and returns the associated service details.

Path Parameters

document
string
required
The client’s identity document number (cédula). This should be provided without spaces or special characters.

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-document/1234567890" \
  -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 document number
{
  "ok": false,
  "type": "error",
  "action": "client_not_found",
  "data": null,
  "message": "Client not found"
}
400 Bad Request
Invalid document format
{
  "ok": false,
  "type": "error",
  "action": "invalid_document",
  "data": null,
  "message": "Invalid document format"
}
This is one of the most reliable ways to look up a client, as the identity document is a unique identifier. Ensure the document number is provided without spaces or special characters.