Crear cliente
curl --request POST \
--url https://api.filexpress.app/api/external/customers \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"customer_name": "Juan Pérez",
"legal_name": "Juan Antonio Pérez García",
"register_number": "12345-6",
"tax_number": "0614-000101-000-0",
"document_type": "13",
"document_number": "00000000-0",
"address": "Col. San Benito, Av. La Revolución #123",
"country_id": "9d1c5a3e-4b7f-4e2a-9c1d-2f6b8a0e7c11",
"state_id": "9d1c5a3e-4b7f-4e2a-9c1d-2f6b8a0e7c11",
"city_id": "9d1c5a3e-4b7f-4e2a-9c1d-2f6b8a0e7c11",
"activity_id": "9d1c5a3e-4b7f-4e2a-9c1d-2f6b8a0e7c11",
"phone": "7777-1234",
"email": "juan@example.com",
"business_type": "natural",
"branch_id": "9d1c5a3e-4b7f-4e2a-9c1d-2f6b8a0e7c11"
}
'const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
customer_name: 'Juan Pérez',
legal_name: 'Juan Antonio Pérez García',
register_number: '12345-6',
tax_number: '0614-000101-000-0',
document_type: '13',
document_number: '00000000-0',
address: 'Col. San Benito, Av. La Revolución #123',
country_id: '9d1c5a3e-4b7f-4e2a-9c1d-2f6b8a0e7c11',
state_id: '9d1c5a3e-4b7f-4e2a-9c1d-2f6b8a0e7c11',
city_id: '9d1c5a3e-4b7f-4e2a-9c1d-2f6b8a0e7c11',
activity_id: '9d1c5a3e-4b7f-4e2a-9c1d-2f6b8a0e7c11',
phone: '7777-1234',
email: 'juan@example.com',
business_type: 'natural',
branch_id: '9d1c5a3e-4b7f-4e2a-9c1d-2f6b8a0e7c11'
})
};
fetch('https://api.filexpress.app/api/external/customers', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.filexpress.app/api/external/customers"
payload = {
"customer_name": "Juan Pérez",
"legal_name": "Juan Antonio Pérez García",
"register_number": "12345-6",
"tax_number": "0614-000101-000-0",
"document_type": "13",
"document_number": "00000000-0",
"address": "Col. San Benito, Av. La Revolución #123",
"country_id": "9d1c5a3e-4b7f-4e2a-9c1d-2f6b8a0e7c11",
"state_id": "9d1c5a3e-4b7f-4e2a-9c1d-2f6b8a0e7c11",
"city_id": "9d1c5a3e-4b7f-4e2a-9c1d-2f6b8a0e7c11",
"activity_id": "9d1c5a3e-4b7f-4e2a-9c1d-2f6b8a0e7c11",
"phone": "7777-1234",
"email": "juan@example.com",
"business_type": "natural",
"branch_id": "9d1c5a3e-4b7f-4e2a-9c1d-2f6b8a0e7c11"
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.filexpress.app/api/external/customers",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'customer_name' => 'Juan Pérez',
'legal_name' => 'Juan Antonio Pérez García',
'register_number' => '12345-6',
'tax_number' => '0614-000101-000-0',
'document_type' => '13',
'document_number' => '00000000-0',
'address' => 'Col. San Benito, Av. La Revolución #123',
'country_id' => '9d1c5a3e-4b7f-4e2a-9c1d-2f6b8a0e7c11',
'state_id' => '9d1c5a3e-4b7f-4e2a-9c1d-2f6b8a0e7c11',
'city_id' => '9d1c5a3e-4b7f-4e2a-9c1d-2f6b8a0e7c11',
'activity_id' => '9d1c5a3e-4b7f-4e2a-9c1d-2f6b8a0e7c11',
'phone' => '7777-1234',
'email' => 'juan@example.com',
'business_type' => 'natural',
'branch_id' => '9d1c5a3e-4b7f-4e2a-9c1d-2f6b8a0e7c11'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}{
"success": true,
"data": {
"id": "9d1c5a3e-4b7f-4e2a-9c1d-2f6b8a0e7c11",
"customer_name": "Juan Pérez",
"legal_name": "Juan Antonio Pérez García",
"register_number": "12345-6",
"tax_number": "0614-000101-000-0",
"document_type": "13",
"document_number": "00000000-0",
"address": "Col. San Benito, Av. La Revolución #123",
"country_id": "9d1c5a3e-4b7f-4e2a-9c1d-2f6b8a0e7c11",
"state_id": "9d1c5a3e-4b7f-4e2a-9c1d-2f6b8a0e7c11",
"city_id": "9d1c5a3e-4b7f-4e2a-9c1d-2f6b8a0e7c11",
"activity_id": "9d1c5a3e-4b7f-4e2a-9c1d-2f6b8a0e7c11",
"phone": "7777-1234",
"email": "juan@example.com",
"business_type": "natural"
},
"message": "Data retrieved successfully."
}{
"status": false,
"message": "Invalid API Key."
}{
"status": false,
"message": "This integration does not have the 'hr.employees' permission.",
"required_scope": "hr.employees"
}{
"success": false,
"message": "Validation Error.",
"data": {
"email": [
"The email field is required."
]
}
}{
"status": false,
"message": "Rate limit exceeded. Please try again later.",
"rate_limit": 100
}Crear cliente
Crea un cliente. Formato de respuesta heredado { success, data, message }.
Permiso requerido: customers
POST
/
customers
Crear cliente
curl --request POST \
--url https://api.filexpress.app/api/external/customers \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"customer_name": "Juan Pérez",
"legal_name": "Juan Antonio Pérez García",
"register_number": "12345-6",
"tax_number": "0614-000101-000-0",
"document_type": "13",
"document_number": "00000000-0",
"address": "Col. San Benito, Av. La Revolución #123",
"country_id": "9d1c5a3e-4b7f-4e2a-9c1d-2f6b8a0e7c11",
"state_id": "9d1c5a3e-4b7f-4e2a-9c1d-2f6b8a0e7c11",
"city_id": "9d1c5a3e-4b7f-4e2a-9c1d-2f6b8a0e7c11",
"activity_id": "9d1c5a3e-4b7f-4e2a-9c1d-2f6b8a0e7c11",
"phone": "7777-1234",
"email": "juan@example.com",
"business_type": "natural",
"branch_id": "9d1c5a3e-4b7f-4e2a-9c1d-2f6b8a0e7c11"
}
'const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
customer_name: 'Juan Pérez',
legal_name: 'Juan Antonio Pérez García',
register_number: '12345-6',
tax_number: '0614-000101-000-0',
document_type: '13',
document_number: '00000000-0',
address: 'Col. San Benito, Av. La Revolución #123',
country_id: '9d1c5a3e-4b7f-4e2a-9c1d-2f6b8a0e7c11',
state_id: '9d1c5a3e-4b7f-4e2a-9c1d-2f6b8a0e7c11',
city_id: '9d1c5a3e-4b7f-4e2a-9c1d-2f6b8a0e7c11',
activity_id: '9d1c5a3e-4b7f-4e2a-9c1d-2f6b8a0e7c11',
phone: '7777-1234',
email: 'juan@example.com',
business_type: 'natural',
branch_id: '9d1c5a3e-4b7f-4e2a-9c1d-2f6b8a0e7c11'
})
};
fetch('https://api.filexpress.app/api/external/customers', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.filexpress.app/api/external/customers"
payload = {
"customer_name": "Juan Pérez",
"legal_name": "Juan Antonio Pérez García",
"register_number": "12345-6",
"tax_number": "0614-000101-000-0",
"document_type": "13",
"document_number": "00000000-0",
"address": "Col. San Benito, Av. La Revolución #123",
"country_id": "9d1c5a3e-4b7f-4e2a-9c1d-2f6b8a0e7c11",
"state_id": "9d1c5a3e-4b7f-4e2a-9c1d-2f6b8a0e7c11",
"city_id": "9d1c5a3e-4b7f-4e2a-9c1d-2f6b8a0e7c11",
"activity_id": "9d1c5a3e-4b7f-4e2a-9c1d-2f6b8a0e7c11",
"phone": "7777-1234",
"email": "juan@example.com",
"business_type": "natural",
"branch_id": "9d1c5a3e-4b7f-4e2a-9c1d-2f6b8a0e7c11"
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.filexpress.app/api/external/customers",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'customer_name' => 'Juan Pérez',
'legal_name' => 'Juan Antonio Pérez García',
'register_number' => '12345-6',
'tax_number' => '0614-000101-000-0',
'document_type' => '13',
'document_number' => '00000000-0',
'address' => 'Col. San Benito, Av. La Revolución #123',
'country_id' => '9d1c5a3e-4b7f-4e2a-9c1d-2f6b8a0e7c11',
'state_id' => '9d1c5a3e-4b7f-4e2a-9c1d-2f6b8a0e7c11',
'city_id' => '9d1c5a3e-4b7f-4e2a-9c1d-2f6b8a0e7c11',
'activity_id' => '9d1c5a3e-4b7f-4e2a-9c1d-2f6b8a0e7c11',
'phone' => '7777-1234',
'email' => 'juan@example.com',
'business_type' => 'natural',
'branch_id' => '9d1c5a3e-4b7f-4e2a-9c1d-2f6b8a0e7c11'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}{
"success": true,
"data": {
"id": "9d1c5a3e-4b7f-4e2a-9c1d-2f6b8a0e7c11",
"customer_name": "Juan Pérez",
"legal_name": "Juan Antonio Pérez García",
"register_number": "12345-6",
"tax_number": "0614-000101-000-0",
"document_type": "13",
"document_number": "00000000-0",
"address": "Col. San Benito, Av. La Revolución #123",
"country_id": "9d1c5a3e-4b7f-4e2a-9c1d-2f6b8a0e7c11",
"state_id": "9d1c5a3e-4b7f-4e2a-9c1d-2f6b8a0e7c11",
"city_id": "9d1c5a3e-4b7f-4e2a-9c1d-2f6b8a0e7c11",
"activity_id": "9d1c5a3e-4b7f-4e2a-9c1d-2f6b8a0e7c11",
"phone": "7777-1234",
"email": "juan@example.com",
"business_type": "natural"
},
"message": "Data retrieved successfully."
}{
"status": false,
"message": "Invalid API Key."
}{
"status": false,
"message": "This integration does not have the 'hr.employees' permission.",
"required_scope": "hr.employees"
}{
"success": false,
"message": "Validation Error.",
"data": {
"email": [
"The email field is required."
]
}
}{
"status": false,
"message": "Rate limit exceeded. Please try again later.",
"rate_limit": 100
}Authorizations
API Key de la integración (Integraciones → Nueva Integración).
Body
application/json
Tipo de cliente.
Available options:
non-business, natural, legal NRC.
NIT.
Código de tipo de documento (13 = DUI, 36 = NIT...).
Response
Cliente creado