Skip to main content

PUT /api/v1/clients/

Updates critical profile data for a client in WispHub, such as their phone number or identity document (cédula). Especially useful when linking users without previously structured data.

Path Parameters

service_id
integer
required
The unique WispHub service identifier of the client to update.

Request Body

document
string
The client’s identity document number (cédula). Only include this field if you want to update it.
phone
string
The client’s phone number. Only include this field if you want to update it.
At least one field (document or phone) must be provided. The endpoint only updates the fields that are explicitly included in the request body, preventing accidental overwrites.

Response

Returns a BackendResponse with no data payload.
ok
boolean
required
Indicates if the request was successful
type
string
required
Response type (e.g., “success”, “error”)
action
string
required
Action identifier: client_updated or client_update_failed
data
null
Always null for this endpoint
message
string
Descriptive message about the operation result

Example Request

curl -X PUT "https://api.wisphub.example/api/v1/clients/12345" \
  -H "Content-Type: application/json" \
  -d '{
    "phone": "+573001234567",
    "document": "1234567890"
  }'

Example Response

Successful update

{
  "ok": true,
  "type": "success",
  "action": "client_updated",
  "data": null,
  "message": "Perfil del cliente actualizado exitosamente."
}

Error Responses

400 Bad Request - No data provided
No valid data was provided for update
{
  "ok": false,
  "type": "error",
  "action": "client_update_failed",
  "data": null,
  "message": "No se brindaron datos válidos para actualizar."
}
404 Not Found
Client with the specified service_id was not found
{
  "ok": false,
  "type": "error",
  "action": "client_update_failed",
  "data": null,
  "message": "No se pudo actualizar el cliente. Verifique el ID."
}
500 Internal Server Error
WispHub update operation failed
{
  "ok": false,
  "type": "error",
  "action": "client_update_failed",
  "data": null,
  "message": "No se pudo actualizar el cliente. Verifique el ID."
}

Partial Updates

You can update just the phone number:
{
  "phone": "+573001234567"
}
Or just the document:
{
  "document": "1234567890"
}
Or both fields together:
{
  "phone": "+573001234567",
  "document": "1234567890"
}
Make sure to verify the service_id before updating. Updates are applied directly to the WispHub system and cannot be automatically reverted.
This endpoint only updates the fields provided in the request body. Fields that are not included will remain unchanged, preventing accidental data overwrites.