Crear una caja
POST
/boxes
const url = 'https://api.dev.lade.com.mx/boxes';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"teamId":"550e8400-e29b-41d4-a716-446655440000","code":"CAJA-001","boxType":"SECA","capacityM3":45.5,"capacityKg":8000,"dailyRate":250}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.dev.lade.com.mx/boxes \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "teamId": "550e8400-e29b-41d4-a716-446655440000", "code": "CAJA-001", "boxType": "SECA", "capacityM3": 45.5, "capacityKg": 8000, "dailyRate": 250 }'Crea una caja de traslado/almacenaje para el equipo, en estado inicial DISPONIBLE.
Authorizations
Sección titulada «Authorizations»Request Bodyrequired
Sección titulada «Request Bodyrequired»Media typeapplication/json
object
teamId
required
string format: uuid
code
required
string
boxType
string
capacityM3
number
capacityKg
number
dailyRate
number
notes
string
Example
{ "teamId": "550e8400-e29b-41d4-a716-446655440000", "code": "CAJA-001", "boxType": "SECA", "capacityM3": 45.5, "capacityKg": 8000, "dailyRate": 250}Responses
Sección titulada «Responses»Caja creada
Media typeapplication/json
object
message
string
box
Caja de traslado/almacenaje — contenedor de carga seca intercambiable, activo propio del equipo (no un atributo del vehículo)
object
id
string format: uuid
teamId
string format: uuid
code
Identificador visible de la caja, se normaliza a mayúsculas
string
boxType
string
capacityM3
number
capacityKg
number
dailyRate
Tarifa diaria por defecto para rentas de esta caja
number
status
string
currentVehicleId
string
currentReservationId
string
currentClientId
string
currentClientName
string
currentLocation
object
notes
string
createdAt
string format: date-time
updatedAt
string format: date-time
Example
{ "message": "Box created successfully", "box": { "id": "bb0e8400-e29b-41d4-a716-446655440006", "teamId": "550e8400-e29b-41d4-a716-446655440000", "code": "CAJA-001", "boxType": "SECA", "status": "DISPONIBLE", "dailyRate": 250 }}Solicitud inválida
Media typeapplication/json
object
error
required
string
message
string
field
string
Example
{ "error": "Validation failed", "field": "email", "message": "Invalid email format"}Sin permisos
Media typeapplication/json
object
error
required
string
message
string
field
string
Example
{ "error": "Forbidden", "message": "You don't have permission to access this resource"}