Clientes
Obtener un cliente por ID
Devuelve el detalle completo de un cliente específico del negocio actual.
Autenticación requerida: Este endpoint requiere autenticación Bearer Token. Usar el campo tokenCurrent obtenido del servicio de login (/login) en el header: Authorization: Bearer {tokenCurrent}
Permiso requerido: CL_POST (Crear/Editar)
Comportamiento:
- El cliente debe pertenecer al negocio autenticado.
- Si el negocio tiene configurado compartir clientes con el negocio padre, también se busca en el negocio padre.
- Retorna null si el cliente no existe (sin error 404).
Ejemplo de Uso
GET /clients/507f1f77bcf86cd799439021
Authorization: Bearer tu_token_aqui
get/clients/{id}
Request
- Base URLhttps://api.pirpos.com
- URLhttps://api.pirpos.com/clients/{id}
- AuthHTTP bearer
Path parameters
idstring required
ID único del cliente (MongoDB ObjectId)
Response
Cliente encontrado exitosamente
Example response
{
"_id": "507f1f77bcf86cd799439021",
"business": "507f1f77bcf86cd799439012",
"responsibilities": "R-99-PN",
"responsibilityName": "Régimen Simplificado",
"name": "Juan",
"lastName": "Pérez",
"idDocumentType": 1,
"documentName": "Cédula de Ciudadanía",
"document": "12345678",
"checkDigit": 9,
"email": "juan@email.com",
"phone": "+57 300 123 4567",
"address": "Calle 123 #45-67",
"cityDetail": {
"countryCode": "CO",
"stateCode": "11",
"stateName": "Bogotá D.C.",
"cityCode": "11001",
"cityName": "Bogotá"
},
"city": "Bogotá",
"postalCode": "110111",
"notes": "Cliente preferencial con descuentos especiales",
"deletedInfo": {
"deletedBy": "507f1f77bcf86cd799439020",
"date": "2025-08-05T10:30:00.000Z"
},
"modifiedOn": "2025-08-05T10:30:00.000Z",
"createdOn": "2025-08-05T10:00:00.000Z",
"birthdate": "1990-05-15",
"points": 150,
"creditMovement": [
{
"paymentMethod": {
"internalId": "507f1f77bcf86cd799439030",
"name": "Efectivo"
},
"date": "2025-08-05T10:30:00.000Z",
"total": 50000,
"notes": "Abono a cuenta"
}
]
}Changes
No recorded changes to this operation across all 1 revision of this API.