Skip to main content
POST
/
api
/
route-calls
Create Route Call
curl --request POST \
  --url https://api.example.com/api/route-calls \
  --header 'Content-Type: application/json' \
  --data '
{
  "routeId": "<string>",
  "title": "<string>",
  "description": "<string>",
  "image": "<string>",
  "dateRoute": "<string>",
  "pace": "<string>",
  "meetingPoints": [
    {
      "type": "<string>",
      "name": "<string>",
      "customName": "<string>",
      "location": "<string>",
      "time": "<string>"
    }
  ]
}
'
{
  "success": true,
  "data": {},
  "message": "<string>",
  "400 Bad Request": {},
  "401 Unauthorized": {},
  "404 Not Found": {}
}

Overview

Create a new route call for either a predefined route or a custom route. This endpoint requires authentication via Bearer token.

Authentication

This endpoint requires a valid Bearer token in the Authorization header:
Authorization: Bearer <your_token>

Request Body

routeId
string
UUID of a predefined route. If not provided, this will be a custom route and title becomes required.
title
string
Title for the route call. Required for custom routes (when routeId is not provided), optional for predefined routes (will be auto-generated). Maximum 200 characters.
description
string
Optional description of the route call. Maximum 1000 characters.
image
string
Optional custom image URL. Must be a valid URL.
dateRoute
string
required
ISO 8601 datetime when the route call takes place. Must be in the future.Example: "2026-02-15T10:00:00Z"
pace
string
required
Pace level of the route call. 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)
meetingPoints
array
required
Array of meeting point objects. Must include exactly 1 PRIMARY meeting point. Optionally can include 1 SECONDARY meeting point. Minimum 1, maximum 2.

Response

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

Error Responses

400 Bad Request
object
Validation errors:
  • Title is required for custom routes
  • Route call date must be in the future
  • At least one meeting point is required
  • Only one PRIMARY meeting point is allowed
  • Only Google Maps URLs are allowed
401 Unauthorized
object
Invalid or missing authentication token
404 Not Found
object
The specified routeId does not exist

Example Request - Predefined Route

curl -X POST "https://api.losinmaduros.com/api/route-calls" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "routeId": "987e6543-e21b-12d3-a456-426614174000",
    "dateRoute": "2026-02-15T10:00:00Z",
    "pace": "MARIPOSA",
    "description": "Ruta tranquila por el parque...",
    "meetingPoints": [
      {
        "type": "PRIMARY",
        "name": "Explanada",
        "location": "https://maps.app.goo.gl/gCJfpLSoy3D454Y19"
      },
      {
        "type": "SECONDARY",
        "name": "Puerta de Alcalá",
        "location": "https://maps.app.goo.gl/3kjrtMz9BtQ39BJYA",
        "time": "2026-02-15T10:15:00Z"
      }
    ]
  }'

Example Request - Custom Route

curl -X POST "https://api.losinmaduros.com/api/route-calls" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "title": "Ruta por Retiro - Sábado Mañana",
    "description": "Ruta personalizada por el Parque del Retiro",
    "image": "https://example.com/my-route.jpg",
    "dateRoute": "2026-02-20T09:00:00Z",
    "pace": "GUSANO",
    "meetingPoints": [
      {
        "type": "PRIMARY",
        "name": "Puerta de Felipe IV",
        "location": "https://maps.app.goo.gl/example123"
      }
    ]
  }'

Example Response

{
  "success": true,
  "data": {
    "id": "123e4567-e89b-12d3-a456-426614174000",
    "routeId": "987e6543-e21b-12d3-a456-426614174000",
    "organizerId": "user_2abc123def456",
    "title": "Ruta Casa de Campo - Domingo",
    "description": "Ruta tranquila por el parque...",
    "image": "https://example.com/route-call.jpg",
    "dateRoute": "2026-02-15T10:00:00Z",
    "pace": "MARIPOSA",
    "status": "SCHEDULED",
    "createdAt": "2026-02-10T10:00:00Z",
    "updatedAt": "2026-02-10T10:00: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"
      },
      {
        "id": "def67890-e89b-12d3-a456-426614174000",
        "type": "SECONDARY",
        "name": "Puerta de Alcalá",
        "customName": null,
        "location": "https://maps.app.goo.gl/3kjrtMz9BtQ39BJYA",
        "time": "2026-02-15T10:15:00Z",
        "createdAt": "2026-02-10T10:00:00Z"
      }
    ],
    "_count": {
      "attendances": 0
    }
  },
  "message": "Route call created successfully"
}

Validation Rules

  • Title: 1-200 characters. Required only for custom routes.
  • Description: Maximum 1000 characters.
  • Date: Must be in the future (ISO 8601 format).
  • Meeting Points:
    • Minimum 1, maximum 2
    • Exactly 1 PRIMARY required
    • Maximum 1 SECONDARY allowed
    • Google Maps URLs only (google.com, maps.google.com, goo.gl)
  • Custom vs Predefined: If no routeId is provided, title is required.

Build docs developers (and LLMs) love