Deactivate client
Deactivates (marks as deleted) a client. **Soft delete:** The client is not physically deleted, only marked as inactive. **Restriction:** Cannot deactivate a client with associated invoices.
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
Client ID
uuidResponse Body
application/json
application/json
application/json
application/json
application/json
curl -X DELETE "https://app.beel.es/api/v1/clientes/550e8400-e29b-41d4-a716-446655440000"{
"success": true,
"data": {
"mensaje": "Client deactivated successfully"
},
"meta": {
"timestamp": "2025-01-15T10:30:00Z",
"request_id": "123e4567-e89b-12d3-a456-426614174000"
}
}{
"success": false,
"error": {
"code": "VALIDATION_ERROR",
"message": "The provided data is not valid",
"details": {
"campo": "specific error message"
}
},
"meta": {
"timestamp": "2025-01-15T10:30:00Z",
"request_id": "123e4567-e89b-12d3-a456-426614174000"
}
}{
"success": false,
"error": {
"code": "UNAUTHORIZED",
"message": "Authentication required"
},
"meta": {
"timestamp": "2025-01-15T10:30:00Z",
"request_id": "123e4567-e89b-12d3-a456-426614174000"
}
}{
"success": false,
"error": {
"code": "NOT_FOUND",
"message": "Resource not found"
},
"meta": {
"timestamp": "2025-01-15T10:30:00Z",
"request_id": "123e4567-e89b-12d3-a456-426614174000"
}
}{
"success": false,
"error": {
"code": "INTERNAL_ERROR",
"message": "Internal server error"
},
"meta": {
"timestamp": "2025-01-15T10:30:00Z",
"request_id": "123e4567-e89b-12d3-a456-426614174000"
}
}Create or validate multiple clients POST
Creates multiple clients in a single operation or validates data without persisting. **Validation flow:** 1. `dry_run=true`: Full validation only (NIFs, duplicates, format) without persistence 2. `dry_run=false`: Validation + actual creation **Validations performed:** - Individual validation of each client (same rules as single client creation) - Detection of duplicate NIFs within the batch - Detection of duplicate NIFs against existing database - Parallel NIF validation against AEAT registry (VeriFactu) - Field format verification (email, phone, etc.) **Result statuses:** - `VALID`: Client valid, ready to create - `WARNING`: Client valid but with warnings (e.g., missing email) - `ERROR`: Client invalid, cannot process - `DUPLICATE`: Duplicate NIF (in batch or existing DB) - `NIF_INVALID`: NIF not valid in AEAT registry **Atomicity:** - `dry_run=true`: Validation only, no persistence - `dry_run=false`: If any client fails, ALL clients are rejected (full atomicity)
Delete multiple clients DELETE
Deactivates (marks as deleted) multiple clients in a single operation. **Soft delete:** Clients are not physically deleted, only marked as inactive. **Partial behavior:** Valid clients will be deactivated, failures are reported in the errors array.