Documentation Index
Fetch the complete documentation index at: https://mintlify.com/Glemynart/SaaS/llms.txt
Use this file to discover all available pages before exploring further.
Billing customers in La Oficina Nítida are stored as Customer records — a dedicated entity that is separate from payroll employees. Each customer holds the fiscal identity data required to generate an invoice: the NIT or identification number and optional contact fields. Every customer belongs to exactly one tenant, and NIT values are unique within a tenant. The status field (ACTIVE / INACTIVE) lets you retire customers without deleting their invoice history.
Customer Data Model
The following fields are accepted when creating or updating a customer. Required fields are marked with a check mark.
CreateCustomerDto
| Field | Type | Required | Description |
|---|
razonSocial | string | ✅ | Legal name or business name of the customer |
nit | string | ✅ | NIT or identity document number. Unique per tenant. |
email | string | — | Email address for invoice delivery |
telefono | string | — | Phone number |
direccion | string | — | Street address |
UpdateCustomerDto
All fields are optional. Only the fields included in the request body are updated.
| Field | Type | Description |
|---|
razonSocial | string | Updated legal name |
nit | string | Updated NIT |
email | string | Updated email address |
telefono | string | Updated phone number |
direccion | string | Updated street address |
status | CustomerStatus | Set to ACTIVE or INACTIVE |
Endpoints
List Customers
Returns all customers for the authenticated tenant, ordered by razonSocial ascending. Includes both active and inactive records.
Query parameters
| Parameter | Description |
|---|
search | Optional free-text search. Matches against razonSocial (case-insensitive) or nit (substring). |
Example
curl -X GET "https://api.example.com/billing/customers?search=Colegio" \
-H "Authorization: Bearer <token>"
Create a Customer
Roles allowed: ADMIN, OPERADOR.
The server checks for an existing customer with the same nit within the tenant and returns 400 Bad Request if one is found.
Request body
{
"razonSocial": "Colegio Los Andes S.A.S.",
"nit": "900123456",
"email": "facturacion@colegiolosandes.edu.co",
"telefono": "+57 601 3456789",
"direccion": "Calle 45 # 12-30"
}
Get a Single Customer
GET /billing/customers/:id
Returns the full customer record for the given UUID. Returns 404 Not Found if the customer does not belong to the authenticated tenant.
Update a Customer
PATCH /billing/customers/:id
Roles allowed: ADMIN, OPERADOR.
All fields are optional. Only the fields present in the request body are updated.
Example — deactivate a customer
Delete a Customer
DELETE /billing/customers/:id
Roles allowed: ADMIN only.
Permanently removes the customer record. If the customer has existing Invoice records, the database foreign key constraint will prevent deletion and return a database error.