Ir al contenido

Crear punto de ruta

POST
/route-points
curl --request POST \
--url https://api.dev.lade.com.mx/route-points \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "teamId": "550e8400-e29b-41d4-a716-446655440000", "name": "Bodega Central", "address": "Av. Industrial 123, Col. Centro", "city": "Monterrey", "state": "Nuevo León", "zipCode": "64000", "coordsLat": 25.6866, "coordsLng": -100.3161, "pointType": "BOTH" }'

Crea un nuevo punto de ruta (ubicación) para el equipo

Media typeapplication/json
object
teamId
required
string format: uuid
clientId
string format: uuid
name
required
string
>= 1 characters <= 100 characters
address
required
string
>= 1 characters <= 300 characters
city
string
<= 100 characters
state
string
<= 100 characters
zipCode
string
<= 10 characters
coordsLat
number
>= -90 <= 90
coordsLng
number
>= -180 <= 180
pointType

Tipo de punto de ruta

string
default: BOTH
Allowed values: PICKUP DELIVERY BOTH
contactName
string
<= 100 characters
contactPhone
string
<= 20 characters
notes
string
<= 1000 characters
Example
{
"teamId": "550e8400-e29b-41d4-a716-446655440000",
"name": "Bodega Central",
"address": "Av. Industrial 123, Col. Centro",
"city": "Monterrey",
"state": "Nuevo León",
"zipCode": "64000",
"coordsLat": 25.6866,
"coordsLng": -100.3161,
"pointType": "BOTH"
}

Punto de ruta creado

Media typeapplication/json
object
id
string format: uuid
teamId
string format: uuid
clientId
string format: uuid
nullable
clientName
string
nullable
name
string
address
string
city
string
nullable
state
string
nullable
zipCode
string
nullable
country
string
default: Mexico
coordsLat
number
nullable >= -90 <= 90
coordsLng
number
nullable >= -180 <= 180
pointType

Tipo de punto de ruta

string
Allowed values: PICKUP DELIVERY BOTH
contactName
string
nullable
contactPhone
string
nullable
notes
string
nullable
isActive
boolean
default: true
createdAt
string format: date-time
Example
{
"country": "Mexico",
"pointType": "PICKUP",
"isActive": true
}

Solicitud inválida

Media typeapplication/json
object
error
required
string
message
string
field
string
Example
{
"error": "Validation failed",
"field": "email",
"message": "Invalid email format"
}

No autenticado

Media typeapplication/json
object
error
required
string
message
string
field
string
Example
{
"error": "Unauthorized",
"message": "Invalid or expired token"
}

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"
}