Clientes

Get client by ID

Retrieves complete details of a specific client

GET
/clientes/{cliente_id}
X-API-Key<token>

API Key authentication.

Format: X-API-Key: beel_sk_<key>

Obtaining Keys: API Keys are managed from the BeeL dashboard

Security: API Keys are secret credentials. Do not share them or store them in source code

In: header

Path Parameters

cliente_idstring

Client ID

Formatuuid

Response Body

application/json

application/json

application/json

application/json

curl -X GET "https://app.beel.es/api/v1/clientes/550e8400-e29b-41d4-a716-446655440000"

Single client retrieved with full details, statistics, and recent invoices summary

{
  "success": true,
  "data": {
    "id": "123e4567-e89b-12d3-a456-426614174000",
    "nombre_fiscal": "Tech Solutions SL",
    "nif": "B12345678",
    "email": "admin@techsolutions.com",
    "telefono": "+34912345678",
    "direccion": {
      "calle": "Calle Mayor",
      "numero": "123",
      "piso": "2º B",
      "codigo_postal": "28013",
      "poblacion": "Madrid",
      "provincia": "Madrid",
      "pais": "España"
    },
    "observaciones": "Cliente prioritario - Pago puntual",
    "activo": true,
    "estadisticas": {
      "total_facturas": 15,
      "total_facturado": 28500,
      "total_pendiente_cobro": 0,
      "total_cobrado": 28500,
      "ultima_factura": {
        "id": "f47ac10b-58cc-4372-a567-0e02b2c3d479",
        "numero_factura": "A/2025/0042",
        "fecha_emision": "2025-01-20",
        "total": 1815,
        "estado": "PAGADA"
      }
    },
    "created_at": "2024-03-15T09:00:00Z",
    "updated_at": "2025-01-20T10:00:00Z"
  },
  "meta": {
    "timestamp": "2025-01-20T11:00:00Z",
    "request_id": "req_get_cliente_001"
  }
}

Missing, invalid, or expired API key in X-API-Key header

{
  "success": false,
  "error": {
    "code": "UNAUTHORIZED",
    "message": "API key is invalid or has expired",
    "details": {
      "header": "X-API-Key",
      "reason": "Invalid API key format or key not found"
    }
  },
  "meta": {
    "timestamp": "2025-01-20T10:00:00Z",
    "request_id": "req_error_001"
  }
}

Requested resource does not exist or belongs to another user (RLS)

{
  "success": false,
  "error": {
    "code": "NOT_FOUND",
    "message": "Resource not found",
    "details": {
      "resource_type": "Factura",
      "resource_id": "f47ac10b-58cc-4372-a567-0e02b2c3d479"
    }
  },
  "meta": {
    "timestamp": "2025-01-20T10:00:00Z",
    "request_id": "req_error_002"
  }
}
{
  "success": false,
  "error": {
    "code": "INTERNAL_ERROR",
    "message": "Internal server error"
  },
  "meta": {
    "timestamp": "2025-01-15T10:30:00Z",
    "request_id": "123e4567-e89b-12d3-a456-426614174000"
  }
}