Skip to main content
POST
/
api
/
clientes
curl -X POST https://your-domain.com/api/clientes \
  -H "Content-Type: application/json" \
  -H "Cookie: session=your-session-token" \
  -d '{
    "legal_name": "Nueva Empresa SA",
    "tax_id": "20-11223344-5",
    "phone": "+54 11 2233-4455",
    "email": "[email protected]",
    "client_type": "FFWW",
    "user_id": 3,
    "is_active": true
  }'
{
  "id": 15,
  "legal_name": "Nueva Empresa SA",
  "tax_id": "20-11223344-5",
  "phone": "+54 11 2233-4455",
  "email": "[email protected]",
  "client_type": "FFWW",
  "user_id": 3,
  "is_active": true,
  "created_at": "2026-03-04T10:30:00.000Z",
  "updated_at": "2026-03-04T10:30:00.000Z"
}
Creates a new client in the system.

Authentication

Admin only - This endpoint requires administrator privileges (DIRECTOR or GERENTE role).
Requires an active session with admin role. Non-admin users will receive a 403 error.

Request Body

Client’s legal business name (razón social)
tax_id
string
Tax identification number (CUIT/CUIL) for invoicing purposes
phone
string
Contact phone number
email
string
Contact email address
client_type
enum
default:"FFWW"
Type of client businessPossible values:
  • "FFWW" - Freight forwarder
  • "Final" - Final client
  • "Both" - Both types
user_id
integer
ID of the salesperson to assign to this client (must reference a valid user)
is_active
boolean
default:true
Whether the client should be active upon creation

Response

Returns the newly created client object with all fields including auto-generated timestamps.
id
integer
Unique client identifier (auto-generated)
Client’s legal business name
tax_id
string | null
Tax identification number
phone
string | null
Contact phone number
email
string | null
Contact email address
client_type
enum
Type of client business ("FFWW", "Final", or "Both")
user_id
integer | null
ID of the assigned salesperson
is_active
boolean
Whether the client is active
created_at
string
ISO 8601 timestamp of creation
updated_at
string
ISO 8601 timestamp of last update
curl -X POST https://your-domain.com/api/clientes \
  -H "Content-Type: application/json" \
  -H "Cookie: session=your-session-token" \
  -d '{
    "legal_name": "Nueva Empresa SA",
    "tax_id": "20-11223344-5",
    "phone": "+54 11 2233-4455",
    "email": "[email protected]",
    "client_type": "FFWW",
    "user_id": 3,
    "is_active": true
  }'
{
  "id": 15,
  "legal_name": "Nueva Empresa SA",
  "tax_id": "20-11223344-5",
  "phone": "+54 11 2233-4455",
  "email": "[email protected]",
  "client_type": "FFWW",
  "user_id": 3,
  "is_active": true,
  "created_at": "2026-03-04T10:30:00.000Z",
  "updated_at": "2026-03-04T10:30:00.000Z"
}

Build docs developers (and LLMs) love