Crear punto de ruta
POST
/route-points
const url = 'https://api.dev.lade.com.mx/route-points';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"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"}'};
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/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
Authorizations
Sección titulada «Authorizations»Request Bodyrequired
Sección titulada «Request Bodyrequired»Media typeapplication/json
object
teamId
required
string format: uuid
clientId
string format: uuid
name
required
string
address
required
string
city
string
state
string
zipCode
string
coordsLat
number
coordsLng
number
pointType
Tipo de punto de ruta
string
contactName
string
contactPhone
string
notes
string
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"}Responses
Sección titulada «Responses»Punto de ruta creado
Media typeapplication/json
object
id
string format: uuid
teamId
string format: uuid
clientId
string format: uuid
clientName
string
name
string
address
string
city
string
state
string
zipCode
string
country
string
coordsLat
number
coordsLng
number
pointType
Tipo de punto de ruta
string
contactName
string
contactPhone
string
notes
string
isActive
boolean
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"}