Skip to main content

Endpoint

This is different from DELETE - cancel sets the status to CANCELLED but preserves the record.
PATCH /api/route-calls/:id/cancel

Authentication

This endpoint requires authentication. Include a valid Bearer token in the Authorization header. Only the organizer or an admin can cancel a route call.

Path Parameters

id
string
required
The unique identifier (UUID) of the route call to cancel

Response

success
boolean
Indicates if the request was successful
data
object
The updated route call object with status set to CANCELLED
message
string
Success message

Example Request

cURL
curl -X PATCH https://api.example.com/api/route-calls/123e4567-e89b-12d3-a456-426614174000/cancel \
  -H "Authorization: Bearer YOUR_JWT_TOKEN"

Example Response

{
  "success": true,
  "data": {
    "id": "123e4567-e89b-12d3-a456-426614174000",
    "title": "Saturday Morning Ride",
    "status": "CANCELLED",
    "dateRoute": "2024-04-15T10:00:00.000Z",
    "pace": "CARACOL",
    "organizerId": "user_abc123",
    "routeId": "987e6543-e21b-12d3-a456-426614174000"
  },
  "message": "Route call cancelled successfully"
}

Error Responses

Status CodeDescription
401Unauthorized - Invalid or missing token
403Forbidden - Only organizer or admin can cancel
404Not Found - Route call doesn’t exist

Delete Route Call

Permanently delete a route call

Update Route Call

Update route call details

Build docs developers (and LLMs) love