Ir al contenido

Crear una caja

POST
/boxes
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.

Media typeapplication/json
object
teamId
required
string format: uuid
code
required
string
>= 1 characters <= 50 characters
boxType
string
Allowed values: SECA REFRIGERADA PLATAFORMA OTRO
capacityM3
number
<= 9999
capacityKg
number
<= 999999
dailyRate
number
0 <= 999999
notes
string
<= 1000 characters
Example
{
"teamId": "550e8400-e29b-41d4-a716-446655440000",
"code": "CAJA-001",
"boxType": "SECA",
"capacityM3": 45.5,
"capacityKg": 8000,
"dailyRate": 250
}

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
Allowed values: SECA REFRIGERADA PLATAFORMA OTRO
capacityM3
number
nullable
capacityKg
number
nullable
dailyRate

Tarifa diaria por defecto para rentas de esta caja

number
status
string
Allowed values: DISPONIBLE EN_VIAJE APARTADA RENTADA MANTENIMIENTO DESACTIVADA
currentVehicleId
string
nullable
currentReservationId
string
nullable
currentClientId
string
nullable
currentClientName
string
nullable
currentLocation
object
notes
string
nullable
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"
}