Skip to main content
PUT
/
api
/
clientes
/
:id
curl -X PUT https://your-domain.com/api/clientes/15 \
  -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-4466",
    "email": "[email protected]",
    "client_type": "Both",
    "user_id": 5,
    "is_active": true
  }'
{
  "id": 15,
  "legal_name": "Nueva Empresa SA",
  "tax_id": "20-11223344-5",
  "phone": "+54 11 2233-4466",
  "email": "[email protected]",
  "client_type": "Both",
  "user_id": 5,
  "is_active": true,
  "created_at": "2026-03-04T10:30:00.000Z",
  "updated_at": "2026-03-04T15:45:30.000Z"
}
Updates an existing client record 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.

Path Parameters

id
integer
required
The unique identifier of the client to update

Request Body

All fields are technically optional in the request. The server will update the fields provided.
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
Whether the client is currently active

Response

Returns the updated client object with all fields including the refreshed updated_at timestamp.
id
integer
Unique client identifier
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 (automatically set to current time)
curl -X PUT https://your-domain.com/api/clientes/15 \
  -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-4466",
    "email": "[email protected]",
    "client_type": "Both",
    "user_id": 5,
    "is_active": true
  }'
{
  "id": 15,
  "legal_name": "Nueva Empresa SA",
  "tax_id": "20-11223344-5",
  "phone": "+54 11 2233-4466",
  "email": "[email protected]",
  "client_type": "Both",
  "user_id": 5,
  "is_active": true,
  "created_at": "2026-03-04T10:30:00.000Z",
  "updated_at": "2026-03-04T15:45:30.000Z"
}

Build docs developers (and LLMs) love