Overview
The Customers API allows you to manage customer (contribuyente) records, including their contact information, tax identification (RUT), and credit account balances. Customers are entities to whom you sell products and services.
Create Customer
Request Body
Tax identification number (RUT) in format ‘12345678-9’. Must be unique and valid.
Legal or business name of the customer.
Business activity or industry.
Municipality or district.
Response
Unique customer identifier.
Tax identification number.
Current credit account balance. Positive values indicate customer owes money, negative values indicate credit in favor of customer.
Whether the customer is active.
Timestamp when the customer was created.
Timestamp of last update.
curl -X POST https://api.example.com/customers/ \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_TOKEN" \
-d '{
"rut": "12345678-9",
"razon_social": "Comercial Los Andes Ltda.",
"giro": "Venta al por menor",
"direccion": "Av. Libertador 1234",
"comuna": "Providencia",
"ciudad": "Santiago",
"email": "[email protected] "
}'
{
"id" : 1 ,
"rut" : "12345678-9" ,
"razon_social" : "Comercial Los Andes Ltda." ,
"giro" : "Venta al por menor" ,
"direccion" : "Av. Libertador 1234" ,
"comuna" : "Providencia" ,
"ciudad" : "Santiago" ,
"email" : "[email protected] " ,
"current_balance" : 0.00 ,
"is_active" : true ,
"created_at" : "2026-03-08T10:30:00Z" ,
"updated_at" : null
}
List Customers
Response
Returns an array of customer objects.
curl -X GET https://api.example.com/customers/ \
-H "Authorization: Bearer YOUR_TOKEN"
[
{
"id" : 1 ,
"rut" : "12345678-9" ,
"razon_social" : "Comercial Los Andes Ltda." ,
"giro" : "Venta al por menor" ,
"direccion" : "Av. Libertador 1234" ,
"comuna" : "Providencia" ,
"ciudad" : "Santiago" ,
"email" : "[email protected] " ,
"current_balance" : 150000.00 ,
"is_active" : true ,
"created_at" : "2026-03-08T10:30:00Z" ,
"updated_at" : null
},
{
"id" : 2 ,
"rut" : "98765432-1" ,
"razon_social" : "Distribuidora Sur SpA" ,
"giro" : "Distribución mayorista" ,
"direccion" : "Calle Principal 567" ,
"comuna" : "Las Condes" ,
"ciudad" : "Santiago" ,
"email" : "[email protected] " ,
"current_balance" : -50000.00 ,
"is_active" : true ,
"created_at" : "2026-03-07T14:20:00Z" ,
"updated_at" : "2026-03-08T09:15:00Z"
}
]
Search Customers
Query Parameters
Search query. Matches against RUT (with or without dots/dashes) or business name. Returns up to 10 results.
Response
Returns an array of matching customer objects (maximum 10).
curl -X GET "https://api.example.com/customers/search?q=Los%20Andes" \
-H "Authorization: Bearer YOUR_TOKEN"
[
{
"id" : 1 ,
"rut" : "12345678-9" ,
"razon_social" : "Comercial Los Andes Ltda." ,
"giro" : "Venta al por menor" ,
"direccion" : "Av. Libertador 1234" ,
"comuna" : "Providencia" ,
"ciudad" : "Santiago" ,
"email" : "[email protected] " ,
"current_balance" : 150000.00 ,
"is_active" : true ,
"created_at" : "2026-03-08T10:30:00Z" ,
"updated_at" : null
}
]
Get Customer by RUT
Path Parameters
Customer’s RUT in format ‘12345678-9’.
Response
Returns a single customer object.
curl -X GET https://api.example.com/customers/12345678-9 \
-H "Authorization: Bearer YOUR_TOKEN"
{
"id" : 1 ,
"rut" : "12345678-9" ,
"razon_social" : "Comercial Los Andes Ltda." ,
"giro" : "Venta al por menor" ,
"direccion" : "Av. Libertador 1234" ,
"comuna" : "Providencia" ,
"ciudad" : "Santiago" ,
"email" : "[email protected] " ,
"current_balance" : 150000.00 ,
"is_active" : true ,
"created_at" : "2026-03-08T10:30:00Z" ,
"updated_at" : null
}
Update Customer
Path Parameters
Customer’s RUT in format ‘12345678-9’.
Request Body
All fields are optional. Only provided fields will be updated.
New RUT value (must be unique and valid).
Response
Returns the updated customer object.
curl -X PUT https://api.example.com/customers/12345678-9 \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_TOKEN" \
-d '{
"email": "[email protected] ",
"telefono": "+56 2 2345 6789"
}'
{
"id" : 1 ,
"rut" : "12345678-9" ,
"razon_social" : "Comercial Los Andes Ltda." ,
"giro" : "Venta al por menor" ,
"direccion" : "Av. Libertador 1234" ,
"comuna" : "Providencia" ,
"ciudad" : "Santiago" ,
"email" : "[email protected] " ,
"current_balance" : 150000.00 ,
"is_active" : true ,
"created_at" : "2026-03-08T10:30:00Z" ,
"updated_at" : "2026-03-08T11:45:00Z"
}
Delete Customer
Path Parameters
Customer’s RUT in format ‘12345678-9’.
Response
Returns no content on success.
curl -X DELETE https://api.example.com/customers/12345678-9 \
-H "Authorization: Bearer YOUR_TOKEN"
204 No Content
404 Not Found
Credit Account Management
The current_balance field tracks the customer’s credit account:
Positive values : Customer owes money to your business
Negative values : Customer has credit in their favor
Zero : Account is settled
This balance is automatically updated when:
Sales are made on credit (increases balance)
Payments are received (decreases balance)
Credit notes are issued (decreases balance)
You can query customers with outstanding balances for accounts receivable management.