Skip to main content

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

FieldTypeRequiredDescription
razonSocialstringLegal name or business name of the customer
nitstringNIT or identity document number. Unique per tenant.
emailstringEmail address for invoice delivery
telefonostringPhone number
direccionstringStreet address

UpdateCustomerDto

All fields are optional. Only the fields included in the request body are updated.
FieldTypeDescription
razonSocialstringUpdated legal name
nitstringUpdated NIT
emailstringUpdated email address
telefonostringUpdated phone number
direccionstringUpdated street address
statusCustomerStatusSet to ACTIVE or INACTIVE

Endpoints

List Customers

GET /billing/customers
Returns all customers for the authenticated tenant, ordered by razonSocial ascending. Includes both active and inactive records. Query parameters
ParameterDescription
searchOptional 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

POST /billing/customers
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
{
  "status": "INACTIVE"
}

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.

Build docs developers (and LLMs) love