Skip to main content
PUT
/
api
/
route-calls
/
:id
Update Route Call
curl --request PUT \
  --url https://api.example.com/api/route-calls/:id \
  --header 'Content-Type: application/json' \
  --data '
{
  "title": "<string>",
  "description": "<string>",
  "image": "<string>",
  "dateRoute": "<string>",
  "pace": "<string>"
}
'
{
  "success": true,
  "data": {},
  "message": "<string>",
  "400 Bad Request": {},
  "401 Unauthorized": {},
  "403 Forbidden": {},
  "404 Not Found": {}
}

Overview

Update an existing route call. Only the organizer who created the route call can update it. This endpoint requires authentication.

Authentication

This endpoint requires a valid Bearer token in the Authorization header:
Authorization: Bearer <your_token>
Authorization: Only the organizer who created the route call can update it.

Path Parameters

id
string
required
UUID of the route call to updateExample: 123e4567-e89b-12d3-a456-426614174000

Request Body

All fields are optional. Only include the fields you want to update.
title
string
Updated title for the route call. Must be 1-200 characters if provided.
description
string
Updated description. Maximum 1000 characters.
image
string
Updated image URL. Must be a valid URL.
dateRoute
string
Updated ISO 8601 datetime for when the route call takes place.Example: "2026-02-16T11:00:00Z"
pace
string
Updated pace level. Must be one of:
  • ROCA - Very slow pace (like a rock)
  • CARACOL - Slow pace (like a snail)
  • GUSANO - Moderate pace (like a worm)
  • MARIPOSA - Fast pace (like a butterfly)
  • EXPERIMENTADO - Very fast/experienced pace
  • LOCURA_TOTAL - Extreme pace (total madness)
  • MIAUCORNIA - Special/fun pace (meow-corn)

Response

success
boolean
Indicates if the request was successful
data
object
The updated route call object (see Get Route Call for full structure)
message
string
Success message: “Route call updated successfully”

Error Responses

400 Bad Request
object
Validation error (e.g., invalid URL, title too long)
401 Unauthorized
object
Invalid or missing authentication token
{
  "success": false,
  "error": "Unauthorized"
}
403 Forbidden
object
User is not the organizer of this route call
{
  "success": false,
  "error": "Only the organizer can update this route call"
}
404 Not Found
object
Route call with the specified ID does not exist
{
  "success": false,
  "error": "Route call not found"
}

Example Request

curl -X PUT "https://api.losinmaduros.com/api/route-calls/123e4567-e89b-12d3-a456-426614174000" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "title": "Ruta Actualizada Casa de Campo",
    "description": "Nueva descripción con más detalles...",
    "dateRoute": "2026-02-16T11:00:00Z",
    "pace": "GUSANO"
  }'

Example Response

{
  "success": true,
  "data": {
    "id": "123e4567-e89b-12d3-a456-426614174000",
    "routeId": "987e6543-e21b-12d3-a456-426614174000",
    "organizerId": "user_2abc123def456",
    "title": "Ruta Actualizada Casa de Campo",
    "description": "Nueva descripción con más detalles...",
    "image": "https://example.com/route-call.jpg",
    "dateRoute": "2026-02-16T11:00:00Z",
    "pace": "GUSANO",
    "status": "SCHEDULED",
    "createdAt": "2026-02-10T10:00:00Z",
    "updatedAt": "2026-02-11T14:30:00Z",
    "route": {
      "id": "987e6543-e21b-12d3-a456-426614174000",
      "name": "Casa de Campo",
      "slug": "casa-de-campo",
      "image": "https://example.com/route.jpg",
      "approximateDistance": "15 km",
      "level": ["INTERMEDIATE"]
    },
    "organizer": {
      "id": "user_2abc123def456",
      "name": "John",
      "imageUrl": "https://example.com/avatar.jpg"
    },
    "meetingPoints": [
      {
        "id": "abc12345-e89b-12d3-a456-426614174000",
        "type": "PRIMARY",
        "name": "Explanada",
        "customName": null,
        "location": "https://maps.app.goo.gl/gCJfpLSoy3D454Y19",
        "time": null,
        "createdAt": "2026-02-10T10:00:00Z"
      }
    ],
    "_count": {
      "attendances": 12
    }
  },
  "message": "Route call updated successfully"
}

Notes

  • Only the organizer who created the route call can update it
  • All request body fields are optional - only include what you want to change
  • The updatedAt timestamp will be automatically updated
  • Meeting points cannot be updated via this endpoint (they must be managed separately)
  • The routeId cannot be changed after creation

Build docs developers (and LLMs) love