{
  "openapi": "3.0.3",
  "info": {
    "title": "Polymath API",
    "description": "Use the Polymath API to find vehicles, check their state, and send commands.",
    "termsOfService": "https://www.polymathrobotics.com/legal/terms-of-service",
    "contact": {
      "name": "Polymath Support",
      "url": "https://www.polymathrobotics.com",
      "email": "api@polymathrobotics.com"
    },
    "license": {
      "name": "All rights reserved",
      "url": "https://www.polymathrobotics.com/legal/privacy-policy"
    },
    "version": "1.0.0"
  },
  "servers": [
    {
      "url": "https://api.polymathrobotics.dev",
      "description": "Polymath API"
    }
  ],
  "tags": [
    {
      "name": "Vehicles",
      "description": "Find vehicles your API client can access.",
      "x-displayName": "Vehicles"
    },
    {
      "name": "Power",
      "description": "Check a vehicle's power state and request power changes.",
      "x-displayName": "Power"
    },
    {
      "name": "Health Check",
      "description": "Contains UUID endpoint that can be used to health check the robot",
      "x-displayName": "Health Check"
    },
    {
      "name": "Vehicle Autonomy",
      "description": "All endpoints related to interacting with Robot's autonomy operations here",
      "x-displayName": "Vehicle Autonomy"
    },
    {
      "name": "Vehicle Operations",
      "description": "All endpoints related to interacting with Robot's vehicle operations here",
      "x-displayName": "Vehicle Operations"
    },
    {
      "name": "Site Management",
      "x-displayName": "Site Management"
    },
    {
      "name": "Route Management",
      "x-displayName": "Route Management"
    },
    {
      "name": "Zone Set Management",
      "x-displayName": "Zone Set Management"
    }
  ],
  "paths": {
    "/v1/vehicles": {
      "get": {
        "tags": [
          "Vehicles"
        ],
        "summary": "List vehicles",
        "description": "Lists the vehicles your API client can access and shows whether each vehicle is connected to the Polymath VPN.",
        "operationId": "list_vehicles",
        "responses": {
          "200": {
            "description": "The vehicles your API client can access.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VehiclesResponse"
                },
                "example": {
                  "status": "success",
                  "data": [
                    {
                      "id": "your_vehicle_id",
                      "ipAddress": "100.64.0.1",
                      "vpnConnected": true
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ]
      }
    },
    "/v1/vehicles/{vehicleId}/power/status": {
      "get": {
        "tags": [
          "Power"
        ],
        "summary": "Get vehicle power status",
        "description": "Returns the vehicle's most recently reported power state and any pending power command.",
        "operationId": "get_vehicle_power_status",
        "parameters": [
          {
            "$ref": "#/components/parameters/VehicleId"
          }
        ],
        "responses": {
          "200": {
            "description": "The vehicle's most recently reported power state.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PowerStatusResponse"
                },
                "example": {
                  "status": "success",
                  "data": {
                    "state": "on",
                    "pendingCommand": null,
                    "updatedAt": "2026-06-29T12:00:00.000Z"
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/VehicleNotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "502": {
            "$ref": "#/components/responses/BadGateway"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          },
          "504": {
            "$ref": "#/components/responses/GatewayTimeout"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ]
      }
    },
    "/v1/vehicles/{vehicleId}/power/on": {
      "post": {
        "tags": [
          "Power"
        ],
        "summary": "Request vehicle power on",
        "description": "Requests that the vehicle turn on. Send this request without a body. A `202 Accepted` response means Polymath accepted the command, but the vehicle may still be off. Poll the power status endpoint until the vehicle is `on` and no command is pending.",
        "operationId": "request_vehicle_power_on",
        "parameters": [
          {
            "$ref": "#/components/parameters/VehicleId"
          }
        ],
        "responses": {
          "202": {
            "$ref": "#/components/responses/CommandAccepted"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/VehicleNotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "502": {
            "$ref": "#/components/responses/BadGateway"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          },
          "504": {
            "$ref": "#/components/responses/GatewayTimeout"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ]
      }
    },
    "/v1/vehicles/{vehicleId}/power/off": {
      "post": {
        "tags": [
          "Power"
        ],
        "summary": "Request vehicle power off",
        "description": "Requests that the vehicle turn off. Send this request without a body. A `202 Accepted` response means Polymath accepted the command, but the vehicle may still be on. Poll the power status endpoint until the vehicle is `off` and no command is pending.",
        "operationId": "request_vehicle_power_off",
        "parameters": [
          {
            "$ref": "#/components/parameters/VehicleId"
          }
        ],
        "responses": {
          "202": {
            "$ref": "#/components/responses/CommandAccepted"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/VehicleNotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "502": {
            "$ref": "#/components/responses/BadGateway"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          },
          "504": {
            "$ref": "#/components/responses/GatewayTimeout"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ]
      }
    },
    "/v1/vehicles/{vehicleId}/restart": {
      "post": {
        "tags": [
          "Vehicles"
        ],
        "summary": "Request vehicle restart",
        "description": "Requests that the vehicle restart. Send this request without a body. A `202 Accepted` response means Polymath accepted the command, but the vehicle may not have restarted yet.",
        "operationId": "request_vehicle_restart",
        "parameters": [
          {
            "$ref": "#/components/parameters/VehicleId"
          }
        ],
        "responses": {
          "202": {
            "$ref": "#/components/responses/CommandAccepted"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/VehicleNotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ]
      }
    },
    "/v1/vehicles/{vehicleId}/active-site": {
      "get": {
        "tags": [
          "Site Management"
        ],
        "summary": "Read the currently active site",
        "description": "Reads the site that is currently active for vehicle operation. This will not return the site that is staged for activation to take effect on next restart, only the site that with activation in-effect.",
        "operationId": "read_active_site",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReadSiteResponse"
                }
              }
            }
          },
          "404": {
            "description": "No site is currently active",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorldModelErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorldModelErrorResponse"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "vehicleId",
            "in": "path",
            "required": true,
            "description": "Vehicle ID issued by Polymath",
            "schema": {
              "type": "string"
            }
          }
        ],
        "security": [
          {
            "HTTPBearer": []
          }
        ]
      }
    },
    "/v1/vehicles/{vehicleId}/command-history": {
      "get": {
        "tags": [
          "Vehicle Autonomy"
        ],
        "summary": "Get the history of commands the robot has finished",
        "description": "Returns command records that have reached a terminal state, newest first, from cortex's bounded history ring. Each record carries the command id that was returned when the command was submitted, so a caller can look up how one of its own commands ended. Filters are optional and combine.",
        "operationId": "get_command_history",
        "parameters": [
          {
            "name": "vehicleId",
            "in": "path",
            "required": true,
            "description": "Vehicle ID issued by Polymath",
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Maximum number of records to return. Zero means no limit.",
            "required": false,
            "schema": {
              "title": "Max Count",
              "maximum": 4294967295,
              "minimum": 0,
              "type": "integer",
              "description": "Maximum number of records to return. Zero means no limit.",
              "default": 0
            },
            "name": "max_count",
            "in": "query"
          },
          {
            "description": "Only return records completed at or after this time, in seconds. Zero disables.",
            "required": false,
            "schema": {
              "title": "Since Sec",
              "maximum": 2147483647,
              "minimum": 0,
              "type": "integer",
              "description": "Only return records completed at or after this time, in seconds. Zero disables.",
              "default": 0
            },
            "name": "since_sec",
            "in": "query"
          },
          {
            "description": "Nanosecond part of the since filter.",
            "required": false,
            "schema": {
              "title": "Since Nanosec",
              "maximum": 4294967295,
              "minimum": 0,
              "type": "integer",
              "description": "Nanosecond part of the since filter.",
              "default": 0
            },
            "name": "since_nanosec",
            "in": "query"
          },
          {
            "description": "Only return the record with this command id. Empty disables the filter.",
            "required": false,
            "schema": {
              "title": "Command Id",
              "type": "string",
              "description": "Only return the record with this command id. Empty disables the filter.",
              "default": ""
            },
            "name": "command_id",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "Terminal command records, newest first.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CommandHistoryResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ]
      }
    },
    "/v1/vehicles/{vehicleId}/command-queue": {
      "get": {
        "tags": [
          "Vehicle Autonomy"
        ],
        "summary": "Get the commands the robot has queued up",
        "description": "Returns a snapshot of the live command queue in dispatch order, plus the id of the command currently being executed. The snapshot is refreshed once per cortex tick, so it may lag the live queue by one tick.",
        "operationId": "get_command_queue",
        "responses": {
          "200": {
            "description": "Queued command records, the active command id, and the number remaining.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CommandQueueResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "vehicleId",
            "in": "path",
            "required": true,
            "description": "Vehicle ID issued by Polymath",
            "schema": {
              "type": "string"
            }
          }
        ],
        "security": [
          {
            "HTTPBearer": []
          }
        ]
      }
    },
    "/v1/vehicles/{vehicleId}/feedback": {
      "get": {
        "tags": [
          "Vehicle Autonomy"
        ],
        "summary": "Get the combined Autonomy, Navigation and Vehicle feedback from the Polymath system",
        "description": "Returns combined autonomy, navigation, and vehicle feedback from the Polymath system.",
        "operationId": "polymath_feedback",
        "responses": {
          "200": {
            "description": "Combined autonomy, navigation, and vehicle feedback.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PolymathFeedbackResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "vehicleId",
            "in": "path",
            "required": true,
            "description": "Vehicle ID issued by Polymath",
            "schema": {
              "type": "string"
            }
          }
        ],
        "security": [
          {
            "HTTPBearer": []
          }
        ]
      }
    },
    "/v1/vehicles/{vehicleId}/gps-waypoints": {
      "post": {
        "tags": [
          "Vehicle Autonomy"
        ],
        "summary": "Send a set of gps waypoints to the robot",
        "description": "Sends GPS waypoints and navigation options to the robot.",
        "operationId": "gps_waypoints",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/GPSWaypoints"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Sent GPS waypoints and upstream service response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GPSWaypointTransmissionResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "vehicleId",
            "in": "path",
            "required": true,
            "description": "Vehicle ID issued by Polymath",
            "schema": {
              "type": "string"
            }
          }
        ],
        "security": [
          {
            "HTTPBearer": []
          }
        ]
      }
    },
    "/v1/vehicles/{vehicleId}/health": {
      "get": {
        "tags": [
          "Health Check"
        ],
        "summary": "System health check endpoint",
        "description": "Returns a summary of the system fault status, Reports an overall `health_summary` and per-subsystem states, each subsystem carrying its list of active faults. If the fault source is unreachable, `fault_source_available` is false and the summary state is `UNKNOWN`.",
        "operationId": "get_health",
        "responses": {
          "200": {
            "description": "System fault-status summary.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HealthStatusResponse"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "vehicleId",
            "in": "path",
            "required": true,
            "description": "Vehicle ID issued by Polymath",
            "schema": {
              "type": "string"
            }
          }
        ],
        "security": [
          {
            "HTTPBearer": []
          }
        ]
      }
    },
    "/v1/vehicles/{vehicleId}/loaded-route": {
      "get": {
        "tags": [
          "Route Management"
        ],
        "summary": "Read the currently loaded route",
        "operationId": "read_loaded_route",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReadRouteGraphResponse"
                }
              }
            }
          },
          "404": {
            "description": "No route is currently loaded",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorldModelErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorldModelErrorResponse"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "vehicleId",
            "in": "path",
            "required": true,
            "description": "Vehicle ID issued by Polymath",
            "schema": {
              "type": "string"
            }
          }
        ],
        "security": [
          {
            "HTTPBearer": []
          }
        ]
      }
    },
    "/v1/vehicles/{vehicleId}/loaded-zone-set": {
      "get": {
        "tags": [
          "Zone Set Management"
        ],
        "summary": "Read the currently loaded zone set",
        "operationId": "read_loaded_zone_set",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReadZoneSetResponse"
                }
              }
            }
          },
          "404": {
            "description": "No zone set is currently loaded",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorldModelErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorldModelErrorResponse"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "vehicleId",
            "in": "path",
            "required": true,
            "description": "Vehicle ID issued by Polymath",
            "schema": {
              "type": "string"
            }
          }
        ],
        "security": [
          {
            "HTTPBearer": []
          }
        ]
      }
    },
    "/v1/vehicles/{vehicleId}/loaded-zone-set/clear": {
      "post": {
        "tags": [
          "Zone Set Management"
        ],
        "summary": "Clear the currently loaded zone set",
        "operationId": "clear_zone_set",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorldModelSuccessResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorldModelErrorResponse"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "vehicleId",
            "in": "path",
            "required": true,
            "description": "Vehicle ID issued by Polymath",
            "schema": {
              "type": "string"
            }
          }
        ],
        "security": [
          {
            "HTTPBearer": []
          }
        ]
      }
    },
    "/v1/vehicles/{vehicleId}/loaded-zone-set/enabled": {
      "patch": {
        "tags": [
          "Zone Set Management"
        ],
        "summary": "Enable/disable individual zones in the loaded set",
        "description": "Enables or disables named zones within the currently loaded zone set. Adjusts runtime state only, does not modify any saved artifact.",
        "operationId": "set_zones_enabled",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SetZonesEnabledRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorldModelSuccessResponse"
                }
              }
            }
          },
          "404": {
            "description": "A named zone was not found in the active set",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorldModelErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "No zone set is currently loaded",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorldModelErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorldModelErrorResponse"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "vehicleId",
            "in": "path",
            "required": true,
            "description": "Vehicle ID issued by Polymath",
            "schema": {
              "type": "string"
            }
          }
        ],
        "security": [
          {
            "HTTPBearer": []
          }
        ]
      }
    },
    "/v1/vehicles/{vehicleId}/motion-command": {
      "post": {
        "tags": [
          "Vehicle Autonomy"
        ],
        "summary": "Send a motion command to the robot to change its current state",
        "description": "Sends a motion command to change the robot motion state. Supported commands: `STOP` (0), `PAUSE` (1), and `RESUME` (2).",
        "operationId": "nav_cmd",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MotionCommandAction"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Motion command execution response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MotionCommandExecutionResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "vehicleId",
            "in": "path",
            "required": true,
            "description": "Vehicle ID issued by Polymath",
            "schema": {
              "type": "string"
            }
          }
        ],
        "security": [
          {
            "HTTPBearer": []
          }
        ]
      }
    },
    "/v1/vehicles/{vehicleId}/motion-commands": {
      "get": {
        "tags": [
          "Vehicle Autonomy"
        ],
        "summary": "Get the available motion commands",
        "description": "Returns available motion commands that can be sent to the Polymath system.",
        "operationId": "get_nav_cmds",
        "responses": {
          "200": {
            "description": "Available motion command names and numeric alternatives.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MotionCommandListResponse"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "vehicleId",
            "in": "path",
            "required": true,
            "description": "Vehicle ID issued by Polymath",
            "schema": {
              "type": "string"
            }
          }
        ],
        "security": [
          {
            "HTTPBearer": []
          }
        ]
      }
    },
    "/v1/vehicles/{vehicleId}/navigation-path-options": {
      "get": {
        "tags": [
          "Vehicle Autonomy"
        ],
        "summary": "Get the available Navigation Path Options and associated Parameters",
        "description": "Returns available navigation path options and configurable parameters.",
        "operationId": "navigation_path_options",
        "responses": {
          "200": {
            "description": "Available navigation path options and parameters.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PathLogicOptionResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "vehicleId",
            "in": "path",
            "required": true,
            "description": "Vehicle ID issued by Polymath",
            "schema": {
              "type": "string"
            }
          }
        ],
        "security": [
          {
            "HTTPBearer": []
          }
        ]
      }
    },
    "/v1/vehicles/{vehicleId}/reference-targets": {
      "get": {
        "tags": [
          "Vehicle Autonomy"
        ],
        "summary": "Get all previously set reference targets",
        "description": "Returns all previously set reference targets.",
        "operationId": "reference_targets",
        "responses": {
          "200": {
            "description": "All previously set reference targets.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReferenceTargetsResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "vehicleId",
            "in": "path",
            "required": true,
            "description": "Vehicle ID issued by Polymath",
            "schema": {
              "type": "string"
            }
          }
        ],
        "security": [
          {
            "HTTPBearer": []
          }
        ]
      },
      "post": {
        "tags": [
          "Vehicle Autonomy"
        ],
        "summary": "Set the location and details of a reference location or an object",
        "description": "Sets one or more reference targets for relative navigation. Each target may include optional `time_validity` and `recorded_speed_m_s` metadata. Use `POST /relative-waypoints` to send waypoints relative to these targets.",
        "operationId": "set_reference_targets",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ReferenceTargetsModel"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Sent reference targets and upstream service response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReferenceTargetSetResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "vehicleId",
            "in": "path",
            "required": true,
            "description": "Vehicle ID issued by Polymath",
            "schema": {
              "type": "string"
            }
          }
        ],
        "security": [
          {
            "HTTPBearer": []
          }
        ]
      }
    },
    "/v1/vehicles/{vehicleId}/reference-targets/current-location": {
      "post": {
        "tags": [
          "Vehicle Autonomy"
        ],
        "summary": "Set a reference target at the current robot location",
        "description": "Creates a `previous_location` reference target from the robot's current GPS pose for subsequent relative navigation.",
        "operationId": "set_reference_target_current_location",
        "responses": {
          "200": {
            "description": "Generated current-location reference target and upstream service response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReferenceTargetSetResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "vehicleId",
            "in": "path",
            "required": true,
            "description": "Vehicle ID issued by Polymath",
            "schema": {
              "type": "string"
            }
          }
        ],
        "security": [
          {
            "HTTPBearer": []
          }
        ]
      }
    },
    "/v1/vehicles/{vehicleId}/relative-waypoints": {
      "post": {
        "tags": [
          "Vehicle Autonomy"
        ],
        "summary": "Send a set of relative waypoints to the robot",
        "description": "Sends relative waypoints and navigation options to the robot.",
        "operationId": "relative_waypoints",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RelativeWaypoints"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Sent relative waypoints and upstream service response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RelativeWaypointTransmissionResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "vehicleId",
            "in": "path",
            "required": true,
            "description": "Vehicle ID issued by Polymath",
            "schema": {
              "type": "string"
            }
          }
        ],
        "security": [
          {
            "HTTPBearer": []
          }
        ]
      }
    },
    "/v1/vehicles/{vehicleId}/release-stop-zone-hold": {
      "post": {
        "tags": [
          "Zone Set Management"
        ],
        "summary": "Release the active stop zone hold",
        "description": "Releases the vehicle from a stop zone hold so navigation can continue. Requires a loaded zone set containing at least one stop zone.",
        "operationId": "release_stop_zone_hold",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorldModelSuccessResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorldModelErrorResponse"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "vehicleId",
            "in": "path",
            "required": true,
            "description": "Vehicle ID issued by Polymath",
            "schema": {
              "type": "string"
            }
          }
        ],
        "security": [
          {
            "HTTPBearer": []
          }
        ]
      }
    },
    "/v1/vehicles/{vehicleId}/routes": {
      "get": {
        "tags": [
          "Route Management"
        ],
        "summary": "List all routes on the vehicle",
        "operationId": "list_routes",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ListRoutesResponse"
                }
              }
            }
          },
          "404": {
            "description": "No routes found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorldModelErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorldModelErrorResponse"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "vehicleId",
            "in": "path",
            "required": true,
            "description": "Vehicle ID issued by Polymath",
            "schema": {
              "type": "string"
            }
          }
        ],
        "security": [
          {
            "HTTPBearer": []
          }
        ]
      }
    },
    "/v1/vehicles/{vehicleId}/routes/{name}": {
      "get": {
        "tags": [
          "Route Management"
        ],
        "summary": "Read a named route in full",
        "operationId": "read_route",
        "parameters": [
          {
            "name": "vehicleId",
            "in": "path",
            "required": true,
            "description": "Vehicle ID issued by Polymath",
            "schema": {
              "type": "string"
            }
          },
          {
            "required": true,
            "schema": {
              "title": "Name",
              "type": "string"
            },
            "name": "name",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReadRouteGraphResponse"
                }
              }
            }
          },
          "404": {
            "description": "Route not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorldModelErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorldModelErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ]
      },
      "post": {
        "tags": [
          "Route Management"
        ],
        "summary": "Create a route",
        "description": "Creates a new route. The route is validated and written as a single whole artifact.",
        "operationId": "create_route",
        "parameters": [
          {
            "name": "vehicleId",
            "in": "path",
            "required": true,
            "description": "Vehicle ID issued by Polymath",
            "schema": {
              "type": "string"
            }
          },
          {
            "required": true,
            "schema": {
              "title": "Name",
              "type": "string"
            },
            "name": "name",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WriteRouteGraphRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Confirmation that the route was created or updated.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WriteRouteGraphResponse"
                }
              }
            }
          },
          "400": {
            "description": "Route failed server-side validation",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorldModelErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "A route with this name already exists",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorldModelErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "Request body failed validation",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorldModelErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorldModelErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ]
      },
      "put": {
        "tags": [
          "Route Management"
        ],
        "summary": "Update existing route",
        "description": "Updates an existing route with this name by replacing the entire route.",
        "operationId": "update_route",
        "parameters": [
          {
            "name": "vehicleId",
            "in": "path",
            "required": true,
            "description": "Vehicle ID issued by Polymath",
            "schema": {
              "type": "string"
            }
          },
          {
            "required": true,
            "schema": {
              "title": "Name",
              "type": "string"
            },
            "name": "name",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WriteRouteGraphRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WriteRouteGraphResponse"
                }
              }
            }
          },
          "400": {
            "description": "Route failed server-side validation",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorldModelErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Route to update was not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorldModelErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "Request body failed validation",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorldModelErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorldModelErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ]
      },
      "delete": {
        "tags": [
          "Route Management"
        ],
        "summary": "Delete a named route",
        "description": "Deletes the route with the given name.",
        "operationId": "delete_route",
        "parameters": [
          {
            "name": "vehicleId",
            "in": "path",
            "required": true,
            "description": "Vehicle ID issued by Polymath",
            "schema": {
              "type": "string"
            }
          },
          {
            "required": true,
            "schema": {
              "title": "Name",
              "type": "string"
            },
            "name": "name",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorldModelSuccessResponse"
                }
              }
            }
          },
          "404": {
            "description": "Route not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorldModelErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorldModelErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ]
      }
    },
    "/v1/vehicles/{vehicleId}/routes/{name}/load": {
      "post": {
        "tags": [
          "Route Management"
        ],
        "summary": "Load a route for navigation",
        "description": "Loads the named route for navigation.",
        "operationId": "load_route",
        "parameters": [
          {
            "name": "vehicleId",
            "in": "path",
            "required": true,
            "description": "Vehicle ID issued by Polymath",
            "schema": {
              "type": "string"
            }
          },
          {
            "required": true,
            "schema": {
              "title": "Name",
              "type": "string"
            },
            "name": "name",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorldModelSuccessResponse"
                }
              }
            }
          },
          "404": {
            "description": "Route not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorldModelErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorldModelErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ]
      }
    },
    "/v1/vehicles/{vehicleId}/sites": {
      "get": {
        "tags": [
          "Site Management"
        ],
        "summary": "List all sites on the vehicle",
        "operationId": "list_sites",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ListSitesResponse"
                }
              }
            }
          },
          "404": {
            "description": "No sites found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorldModelErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorldModelErrorResponse"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "vehicleId",
            "in": "path",
            "required": true,
            "description": "Vehicle ID issued by Polymath",
            "schema": {
              "type": "string"
            }
          }
        ],
        "security": [
          {
            "HTTPBearer": []
          }
        ]
      }
    },
    "/v1/vehicles/{vehicleId}/sites/{name}": {
      "get": {
        "tags": [
          "Site Management"
        ],
        "summary": "Read a named site in full",
        "operationId": "read_site",
        "parameters": [
          {
            "name": "vehicleId",
            "in": "path",
            "required": true,
            "description": "Vehicle ID issued by Polymath",
            "schema": {
              "type": "string"
            }
          },
          {
            "required": true,
            "schema": {
              "title": "Name",
              "type": "string"
            },
            "name": "name",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReadSiteResponse"
                }
              }
            }
          },
          "404": {
            "description": "Site not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorldModelErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorldModelErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ]
      },
      "post": {
        "tags": [
          "Site Management"
        ],
        "summary": "Create a site",
        "description": "Creates a new site for vehicle operation.",
        "operationId": "create_site",
        "parameters": [
          {
            "name": "vehicleId",
            "in": "path",
            "required": true,
            "description": "Vehicle ID issued by Polymath",
            "schema": {
              "type": "string"
            }
          },
          {
            "required": true,
            "schema": {
              "title": "Name",
              "type": "string"
            },
            "name": "name",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WriteSiteRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Confirmation that the site was created.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WriteSiteResponse"
                }
              }
            }
          },
          "400": {
            "description": "Site failed server-side validation",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorldModelErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "A site with this name already exists",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorldModelErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "Request body failed validation",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorldModelErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorldModelErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ]
      },
      "put": {
        "tags": [
          "Site Management"
        ],
        "summary": "Update an existing site",
        "description": "Updates an existing site with this name by replacing the entire site.",
        "operationId": "update_site",
        "parameters": [
          {
            "name": "vehicleId",
            "in": "path",
            "required": true,
            "description": "Vehicle ID issued by Polymath",
            "schema": {
              "type": "string"
            }
          },
          {
            "required": true,
            "schema": {
              "title": "Name",
              "type": "string"
            },
            "name": "name",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WriteSiteRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WriteSiteResponse"
                }
              }
            }
          },
          "400": {
            "description": "Site failed server-side validation",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorldModelErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Site to update was not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorldModelErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "Request body failed validation",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorldModelErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorldModelErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ]
      },
      "delete": {
        "tags": [
          "Site Management"
        ],
        "summary": "Delete a named site",
        "operationId": "delete_site",
        "parameters": [
          {
            "name": "vehicleId",
            "in": "path",
            "required": true,
            "description": "Vehicle ID issued by Polymath",
            "schema": {
              "type": "string"
            }
          },
          {
            "required": true,
            "schema": {
              "title": "Name",
              "type": "string"
            },
            "name": "name",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorldModelSuccessResponse"
                }
              }
            }
          },
          "404": {
            "description": "Site not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorldModelErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorldModelErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ]
      }
    },
    "/v1/vehicles/{vehicleId}/sites/{name}/activate": {
      "post": {
        "tags": [
          "Site Management"
        ],
        "summary": "Stage a site for activation",
        "description": "Stages the named site for activation. The activation will take effect the next time the vehicle starts. Optionally, a route and zone set can be provided, which will be loaded everytime the vehicle starts while this site remains active.",
        "operationId": "activate_site",
        "parameters": [
          {
            "name": "vehicleId",
            "in": "path",
            "required": true,
            "description": "Vehicle ID issued by Polymath",
            "schema": {
              "type": "string"
            }
          },
          {
            "required": true,
            "schema": {
              "title": "Name",
              "type": "string"
            },
            "name": "name",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ActivateSiteRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorldModelSuccessResponse"
                }
              }
            }
          },
          "404": {
            "description": "Site, route, or zone set not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorldModelErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorldModelErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ]
      }
    },
    "/v1/vehicles/{vehicleId}/vehicle-command": {
      "post": {
        "tags": [
          "Vehicle Operations"
        ],
        "summary": "Send a vehicle command to the robot",
        "description": "Sends a vehicle command to the robot.",
        "operationId": "vehicle_command",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/VehicleCommandAction"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Sent vehicle command and upstream service response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VehicleCommandResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "vehicleId",
            "in": "path",
            "required": true,
            "description": "Vehicle ID issued by Polymath",
            "schema": {
              "type": "string"
            }
          }
        ],
        "security": [
          {
            "HTTPBearer": []
          }
        ]
      }
    },
    "/v1/vehicles/{vehicleId}/vehicle-commands": {
      "get": {
        "tags": [
          "Vehicle Operations"
        ],
        "summary": "Get the available Vehicle Commands and associated Parameters",
        "description": "Returns available vehicle command options and configurable parameters.",
        "operationId": "vehicle_commands",
        "responses": {
          "200": {
            "description": "Available vehicle command options and parameters.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VehicleCommandOptionResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "vehicleId",
            "in": "path",
            "required": true,
            "description": "Vehicle ID issued by Polymath",
            "schema": {
              "type": "string"
            }
          }
        ],
        "security": [
          {
            "HTTPBearer": []
          }
        ]
      }
    },
    "/v1/vehicles/{vehicleId}/zone-sets": {
      "get": {
        "tags": [
          "Zone Set Management"
        ],
        "summary": "List all zone sets on the vehicle",
        "operationId": "list_zone_sets",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ListZoneSetsResponse"
                }
              }
            }
          },
          "404": {
            "description": "No zone sets found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorldModelErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorldModelErrorResponse"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "vehicleId",
            "in": "path",
            "required": true,
            "description": "Vehicle ID issued by Polymath",
            "schema": {
              "type": "string"
            }
          }
        ],
        "security": [
          {
            "HTTPBearer": []
          }
        ]
      }
    },
    "/v1/vehicles/{vehicleId}/zone-sets/{name}": {
      "get": {
        "tags": [
          "Zone Set Management"
        ],
        "summary": "Read a named zone set in full",
        "operationId": "read_zone_set",
        "parameters": [
          {
            "name": "vehicleId",
            "in": "path",
            "required": true,
            "description": "Vehicle ID issued by Polymath",
            "schema": {
              "type": "string"
            }
          },
          {
            "required": true,
            "schema": {
              "title": "Name",
              "type": "string"
            },
            "name": "name",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReadZoneSetResponse"
                }
              }
            }
          },
          "404": {
            "description": "Zone set not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorldModelErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorldModelErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ]
      },
      "post": {
        "tags": [
          "Zone Set Management"
        ],
        "summary": "Create a zone set",
        "description": "Creates a new zone set. Validated and written as a single whole artifact.",
        "operationId": "create_zone_set",
        "parameters": [
          {
            "name": "vehicleId",
            "in": "path",
            "required": true,
            "description": "Vehicle ID issued by Polymath",
            "schema": {
              "type": "string"
            }
          },
          {
            "required": true,
            "schema": {
              "title": "Name",
              "type": "string"
            },
            "name": "name",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WriteZoneSetRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WriteZoneSetResponse"
                }
              }
            }
          },
          "400": {
            "description": "Zone set failed server-side validation",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorldModelErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "A zone set with this name already exists",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorldModelErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "Request body failed validation",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorldModelErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorldModelErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ]
      },
      "put": {
        "tags": [
          "Zone Set Management"
        ],
        "summary": "Update an existing zone set",
        "description": "Replaces the entire zone set with this name.",
        "operationId": "update_zone_set",
        "parameters": [
          {
            "name": "vehicleId",
            "in": "path",
            "required": true,
            "description": "Vehicle ID issued by Polymath",
            "schema": {
              "type": "string"
            }
          },
          {
            "required": true,
            "schema": {
              "title": "Name",
              "type": "string"
            },
            "name": "name",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WriteZoneSetRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WriteZoneSetResponse"
                }
              }
            }
          },
          "400": {
            "description": "Zone set failed server-side validation",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorldModelErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Zone set to update was not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorldModelErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "Request body failed validation",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorldModelErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorldModelErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ]
      },
      "delete": {
        "tags": [
          "Zone Set Management"
        ],
        "summary": "Delete a named zone set",
        "operationId": "delete_zone_set",
        "parameters": [
          {
            "name": "vehicleId",
            "in": "path",
            "required": true,
            "description": "Vehicle ID issued by Polymath",
            "schema": {
              "type": "string"
            }
          },
          {
            "required": true,
            "schema": {
              "title": "Name",
              "type": "string"
            },
            "name": "name",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorldModelSuccessResponse"
                }
              }
            }
          },
          "404": {
            "description": "Zone set not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorldModelErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorldModelErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ]
      }
    },
    "/v1/vehicles/{vehicleId}/zone-sets/{name}/load": {
      "post": {
        "tags": [
          "Zone Set Management"
        ],
        "summary": "Load a zone set for navigation",
        "operationId": "load_zone_set",
        "parameters": [
          {
            "name": "vehicleId",
            "in": "path",
            "required": true,
            "description": "Vehicle ID issued by Polymath",
            "schema": {
              "type": "string"
            }
          },
          {
            "required": true,
            "schema": {
              "title": "Name",
              "type": "string"
            },
            "name": "name",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorldModelSuccessResponse"
                }
              }
            }
          },
          "404": {
            "description": "Zone set not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorldModelErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorldModelErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ]
      }
    }
  },
  "components": {
    "parameters": {
      "VehicleId": {
        "name": "vehicleId",
        "in": "path",
        "required": true,
        "description": "The vehicle ID provided by Polymath.",
        "schema": {
          "type": "string"
        },
        "example": "your_vehicle_id"
      }
    },
    "schemas": {
      "VehiclesResponse": {
        "type": "object",
        "required": [
          "status",
          "data"
        ],
        "properties": {
          "status": {
            "type": "string",
            "enum": [
              "success"
            ]
          },
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/VehicleSummary"
            }
          }
        }
      },
      "VehicleSummary": {
        "type": "object",
        "required": [
          "id",
          "vpnConnected"
        ],
        "properties": {
          "id": {
            "type": "string",
            "description": "The vehicle ID provided by Polymath."
          },
          "ipAddress": {
            "type": "string",
            "format": "ipv4",
            "description": "The vehicle's Polymath VPN address. This field is omitted when no address is available."
          },
          "vpnConnected": {
            "type": "boolean",
            "description": "Whether the vehicle is connected to the Polymath VPN."
          }
        }
      },
      "PowerStatusResponse": {
        "type": "object",
        "required": [
          "status",
          "data"
        ],
        "properties": {
          "status": {
            "type": "string",
            "enum": [
              "success"
            ]
          },
          "data": {
            "$ref": "#/components/schemas/PowerStatus"
          }
        }
      },
      "PowerStatus": {
        "type": "object",
        "required": [
          "state",
          "pendingCommand",
          "updatedAt"
        ],
        "properties": {
          "state": {
            "type": "string",
            "description": "The vehicle's most recently reported power state.",
            "enum": [
              "on",
              "off",
              "unknown"
            ]
          },
          "pendingCommand": {
            "$ref": "#/components/schemas/PowerPendingCommand"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "description": "When the vehicle's power state was last reported, or `null` if no state has been reported.",
            "nullable": true
          }
        }
      },
      "PowerPendingCommand": {
        "type": "object",
        "description": "A power command that Polymath accepted but the vehicle has not completed, or `null` if no command is pending.",
        "nullable": true,
        "required": [
          "state"
        ],
        "properties": {
          "state": {
            "type": "string",
            "description": "The power state requested by the pending command.",
            "enum": [
              "on",
              "off"
            ]
          }
        }
      },
      "SuccessResponse": {
        "type": "object",
        "required": [
          "status"
        ],
        "properties": {
          "status": {
            "type": "string",
            "enum": [
              "success"
            ]
          }
        }
      },
      "ActivateSiteRequest": {
        "title": "ActivateSiteRequest",
        "type": "object",
        "properties": {
          "route": {
            "title": "Route",
            "type": "string",
            "description": "Optional route to load every time the vehicle starts while operating with this site as active. "
          },
          "zone_set": {
            "title": "Zone Set",
            "type": "string",
            "description": "Optional zone set to load every time the vehicle starts while operating with this site as active. "
          }
        },
        "additionalProperties": false,
        "description": "Base for request bodies: unknown fields are rejected instead of silently dropped.",
        "example": {
          "route": "",
          "zone_set": ""
        }
      },
      "ActiveAlert": {
        "title": "ActiveAlert",
        "required": [
          "fault_code",
          "severity",
          "status"
        ],
        "type": "object",
        "properties": {
          "fault_code": {
            "title": "Fault Code",
            "type": "string"
          },
          "severity": {
            "title": "Severity",
            "type": "string"
          },
          "status": {
            "title": "Status",
            "type": "string"
          },
          "description": {
            "title": "Description",
            "type": "string",
            "default": ""
          },
          "occurrence_count": {
            "title": "Occurrence Count",
            "type": "integer",
            "default": 0
          },
          "reporting_sources": {
            "title": "Reporting Sources",
            "type": "array",
            "items": {
              "type": "string"
            },
            "default": []
          },
          "first_occurred": {
            "title": "First Occurred",
            "type": "object",
            "additionalProperties": {
              "type": "integer"
            }
          },
          "last_occurred": {
            "title": "Last Occurred",
            "type": "object",
            "additionalProperties": {
              "type": "integer"
            }
          }
        }
      },
      "CommandHistoryData": {
        "title": "CommandHistoryData",
        "type": "object",
        "properties": {
          "records": {
            "title": "Records",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CortexCommandRecordModel"
            },
            "description": "Terminal command records, newest first."
          }
        }
      },
      "CommandHistoryResponse": {
        "title": "CommandHistoryResponse",
        "required": [
          "status",
          "message",
          "data"
        ],
        "type": "object",
        "properties": {
          "status": {
            "title": "Status",
            "type": "string"
          },
          "message": {
            "title": "Message",
            "type": "string"
          },
          "data": {
            "$ref": "#/components/schemas/CommandHistoryData"
          }
        }
      },
      "CommandMode": {
        "title": "CommandMode",
        "enum": [
          0,
          1
        ],
        "description": "An enumeration."
      },
      "CommandQueueData": {
        "title": "CommandQueueData",
        "required": [
          "active_command_id",
          "number_commands_remaining"
        ],
        "type": "object",
        "properties": {
          "queued": {
            "title": "Queued",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CortexCommandRecordModel"
            },
            "description": "Queued commands in dispatch order. The active command, if any, is the front entry and is reported with state ACTIVE."
          },
          "active_command_id": {
            "title": "Active Command Id",
            "type": "string",
            "description": "Id of the currently active command, in canonical UUID string form. The nil UUID when nothing is active."
          },
          "number_commands_remaining": {
            "title": "Number Commands Remaining",
            "type": "integer",
            "description": "Number of commands remaining in the queue."
          }
        }
      },
      "CommandQueueResponse": {
        "title": "CommandQueueResponse",
        "required": [
          "status",
          "message",
          "data"
        ],
        "type": "object",
        "properties": {
          "status": {
            "title": "Status",
            "type": "string"
          },
          "message": {
            "title": "Message",
            "type": "string"
          },
          "data": {
            "$ref": "#/components/schemas/CommandQueueData"
          }
        }
      },
      "CortexCommandOutcomeEnum": {
        "title": "CortexCommandOutcomeEnum",
        "enum": [
          0,
          1,
          2,
          3,
          4,
          5
        ],
        "description": "Terminal outcome of a cortex command; mirrors CortexCommandRecord's outcome constants."
      },
      "CortexCommandRecordModel": {
        "title": "CortexCommandRecordModel",
        "required": [
          "id",
          "queued_time",
          "started_time",
          "completed_time"
        ],
        "type": "object",
        "properties": {
          "id": {
            "title": "Id",
            "type": "string",
            "description": "Cortex-assigned command id, in canonical UUID string form."
          },
          "summary": {
            "title": "Summary",
            "type": "string",
            "description": "Short human-readable description of the command.",
            "default": ""
          },
          "state": {
            "allOf": [
              {
                "$ref": "#/components/schemas/CortexCommandStateEnum"
              }
            ],
            "description": "Lifecycle state. Pass the integer value."
          },
          "state_text": {
            "title": "State Text",
            "type": "string",
            "description": "Name of the state, e.g. TERMINAL.",
            "default": ""
          },
          "outcome": {
            "allOf": [
              {
                "$ref": "#/components/schemas/CortexCommandOutcomeEnum"
              }
            ],
            "description": "Terminal outcome, OUTCOME_UNKNOWN until the command finishes. Pass the integer value."
          },
          "outcome_text": {
            "title": "Outcome Text",
            "type": "string",
            "description": "Name of the outcome, e.g. REJECTED.",
            "default": ""
          },
          "detail": {
            "title": "Detail",
            "type": "string",
            "description": "Outcome context, e.g. the validation message for a rejection.",
            "default": ""
          },
          "queued_time": {
            "title": "Queued Time",
            "allOf": [
              {
                "$ref": "#/components/schemas/Stamp"
              }
            ],
            "description": "Time the command was accepted and queued."
          },
          "started_time": {
            "title": "Started Time",
            "allOf": [
              {
                "$ref": "#/components/schemas/Stamp"
              }
            ],
            "description": "Time the command became active. Zero until started."
          },
          "completed_time": {
            "title": "Completed Time",
            "allOf": [
              {
                "$ref": "#/components/schemas/Stamp"
              }
            ],
            "description": "Time the command reached a terminal state. Zero until terminal."
          }
        },
        "description": "Cortex's bookkeeping record for a single command: its identity, lifecycle and outcome.",
        "example": {
          "id": "25b0db0f-083c-4cb4-9e7f-dc91613071b7",
          "summary": "NAVIGATION: geo path with 3 waypoints",
          "state": 2,
          "state_text": "TERMINAL",
          "outcome": 1,
          "outcome_text": "SUCCEEDED",
          "detail": "",
          "queued_time": {
            "sec": 1786949841,
            "nanosec": 893512222
          },
          "started_time": {
            "sec": 1786949842,
            "nanosec": 100000000
          },
          "completed_time": {
            "sec": 1786949844,
            "nanosec": 112000000
          }
        }
      },
      "CortexCommandStateEnum": {
        "title": "CortexCommandStateEnum",
        "enum": [
          0,
          1,
          2
        ],
        "description": "Lifecycle state of a cortex command; mirrors CortexCommandRecord's state constants."
      },
      "CortexNavigationOptions": {
        "title": "CortexNavigationOptions",
        "type": "object",
        "properties": {
          "path_option": {
            "title": "Path Option",
            "allOf": [
              {
                "$ref": "#/components/schemas/CortexOption"
              }
            ],
            "description": "Navigation path logic option to set. See the GET /navigation-path-options endpoint for the available path options and their parameters.",
            "example": {
              "name": "target_follower",
              "params": [
                {
                  "key": "speed",
                  "value": "0.5"
                }
              ]
            }
          },
          "mode": {
            "allOf": [
              {
                "$ref": "#/components/schemas/CommandMode"
              }
            ],
            "description": "Mode of execution of previous and current waypoints. Available options: 'ADD','PREEMPT'. ADD or 0: Add a new waypoint to existing queue of waypoints, PREEMPT or 1: Delete the existing queue and adds the new waypoint.",
            "default": 0,
            "example": "ADD"
          }
        },
        "additionalProperties": false,
        "description": "Base for request bodies: unknown fields are rejected instead of silently dropped."
      },
      "CortexOption": {
        "title": "CortexOption",
        "required": [
          "name",
          "params"
        ],
        "type": "object",
        "properties": {
          "name": {
            "title": "Name",
            "type": "string"
          },
          "params": {
            "title": "Params",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/KeyValuePair"
            }
          }
        },
        "additionalProperties": false,
        "description": "Base for request bodies: unknown fields are rejected instead of silently dropped."
      },
      "CortexStatus": {
        "title": "CortexStatus",
        "type": "object",
        "properties": {
          "status": {
            "$ref": "#/components/schemas/CortexStatusEnum"
          },
          "status_text": {
            "title": "Status Text",
            "type": "string",
            "default": ""
          },
          "description": {
            "title": "Description",
            "type": "string"
          }
        }
      },
      "CortexStatusEnum": {
        "title": "CortexStatusEnum",
        "enum": [
          0,
          1,
          2,
          3,
          4
        ],
        "description": "An enumeration."
      },
      "ErrorDetails": {
        "title": "ErrorDetails",
        "required": [
          "details"
        ],
        "type": "object",
        "properties": {
          "details": {
            "title": "Details",
            "type": "string"
          }
        }
      },
      "ErrorResponse": {
        "title": "ErrorResponse",
        "required": [
          "status",
          "message"
        ],
        "type": "object",
        "properties": {
          "status": {
            "title": "Status",
            "enum": [
              "error"
            ],
            "type": "string"
          },
          "message": {
            "title": "Message",
            "type": "string"
          },
          "error": {
            "$ref": "#/components/schemas/ErrorDetails"
          }
        }
      },
      "GPSWaypointTransmissionData": {
        "title": "GPSWaypointTransmissionData",
        "required": [
          "sent"
        ],
        "type": "object",
        "properties": {
          "sent": {
            "$ref": "#/components/schemas/GPSWaypoints"
          },
          "received": {
            "title": "Received"
          },
          "command_ids": {
            "title": "Command Ids",
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Cortex-assigned ids for the accepted commands, aligned 1:1 with the commands sent and in the same order. Each is the goal id for its command; pass one to GET /command-history as command_id to look that command up once it finishes. Empty when cortex handled the request without queueing commands, as a RESUME motion command does."
          }
        }
      },
      "GPSWaypointTransmissionResponse": {
        "title": "GPSWaypointTransmissionResponse",
        "required": [
          "status",
          "message",
          "data"
        ],
        "type": "object",
        "properties": {
          "status": {
            "title": "Status",
            "type": "string"
          },
          "message": {
            "title": "Message",
            "type": "string"
          },
          "data": {
            "$ref": "#/components/schemas/GPSWaypointTransmissionData"
          }
        }
      },
      "GPSWaypoints": {
        "title": "GPSWaypoints",
        "required": [
          "goals"
        ],
        "type": "object",
        "properties": {
          "timestamp_utc": {
            "title": "Timestamp Utc",
            "type": "string",
            "description": "Timestamp in UTC ISO format. Should be provided in ISO 8601 format: 'YYYY-MM-DDTHH:MM:SSZ'. If not provided, it will default to the current UTC time.",
            "default": ""
          },
          "goals": {
            "title": "Goals",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/GoalPoses"
            },
            "description": "Ordered list of GPS waypoints. When multiple waypoints are provided, the robot navigates through them continuously as a single path rather than stopping discretely at each one."
          },
          "navigation_options": {
            "title": "Navigation Options",
            "allOf": [
              {
                "$ref": "#/components/schemas/CortexNavigationOptions"
              }
            ],
            "description": "Optional navigation options for this command, including the path logic option and execution mode. See the GET /navigation-path-options endpoint for the available path options and their parameters."
          }
        },
        "additionalProperties": false,
        "description": "Base for request bodies: unknown fields are rejected instead of silently dropped."
      },
      "GeoPoint": {
        "title": "GeoPoint",
        "required": [
          "lat",
          "lon"
        ],
        "type": "object",
        "properties": {
          "lat": {
            "title": "Lat",
            "type": "number",
            "description": "Latitude"
          },
          "lon": {
            "title": "Lon",
            "type": "number",
            "description": "Longitude"
          },
          "altitude": {
            "title": "Altitude",
            "type": "number",
            "description": "Altitude (meters)"
          },
          "yaw": {
            "title": "Yaw",
            "type": "number",
            "description": "Yaw (radians). Robot body frame: x forward, y left, z up; positive yaw is counter-clockwise."
          }
        },
        "additionalProperties": false,
        "description": "Base for request bodies: unknown fields are rejected instead of silently dropped."
      },
      "GoalInfo": {
        "title": "GoalInfo",
        "required": [
          "stamp"
        ],
        "type": "object",
        "properties": {
          "goal_id": {
            "$ref": "#/components/schemas/UUID"
          },
          "stamp": {
            "$ref": "#/components/schemas/Stamp"
          }
        }
      },
      "GoalPoses": {
        "title": "GoalPoses",
        "required": [
          "lat",
          "lon"
        ],
        "type": "object",
        "properties": {
          "timestamp_utc": {
            "title": "Timestamp Utc",
            "type": "string",
            "description": "Timestamp in UTC ISO format. Should be provided in ISO 8601 format: 'YYYY-MM-DDTHH:MM:SSZ'. If not provided, it will default to the current UTC time.",
            "default": ""
          },
          "lat": {
            "title": "Lat",
            "type": "number",
            "description": "Latitude"
          },
          "lon": {
            "title": "Lon",
            "type": "number",
            "description": "Longitude"
          },
          "yaw": {
            "title": "Yaw",
            "type": "number",
            "description": "Yaw (radians). 0.0 indicates east. positive yaw is counter-clockwise."
          }
        },
        "additionalProperties": false,
        "description": "Base for request bodies: unknown fields are rejected instead of silently dropped."
      },
      "HTTPValidationError": {
        "title": "HTTPValidationError",
        "type": "object",
        "properties": {
          "detail": {
            "title": "Detail",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ValidationError"
            }
          }
        }
      },
      "Header": {
        "title": "Header",
        "required": [
          "stamp",
          "frame_id"
        ],
        "type": "object",
        "properties": {
          "stamp": {
            "$ref": "#/components/schemas/Stamp"
          },
          "frame_id": {
            "title": "Frame Id",
            "type": "string"
          }
        }
      },
      "HealthStatusResponse": {
        "title": "HealthStatusResponse",
        "type": "object",
        "properties": {
          "fault_source_available": {
            "title": "Fault Source Available",
            "type": "boolean",
            "default": false
          },
          "health_summary": {
            "$ref": "#/components/schemas/HealthSummary"
          },
          "subsystems": {
            "title": "Subsystems",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SubsystemHealth"
            },
            "default": []
          }
        }
      },
      "HealthSummary": {
        "title": "HealthSummary",
        "required": [
          "summary",
          "highest_severity"
        ],
        "type": "object",
        "properties": {
          "summary": {
            "title": "Summary",
            "type": "string"
          },
          "highest_severity": {
            "title": "Highest Severity",
            "type": "string"
          },
          "highest_severity_alert": {
            "title": "Highest Severity Alert",
            "type": "string"
          },
          "active_alert_count": {
            "title": "Active Alert Count",
            "type": "integer",
            "default": 0
          }
        }
      },
      "KeyValuePair": {
        "title": "KeyValuePair",
        "required": [
          "key",
          "value"
        ],
        "type": "object",
        "properties": {
          "key": {
            "title": "Key",
            "type": "string"
          },
          "value": {
            "title": "Value",
            "type": "string"
          }
        },
        "additionalProperties": false,
        "description": "Base for request bodies: unknown fields are rejected instead of silently dropped."
      },
      "ListRoutesResponse": {
        "title": "ListRoutesResponse",
        "required": [
          "message",
          "routes_list"
        ],
        "type": "object",
        "properties": {
          "status": {
            "title": "Status",
            "enum": [
              "success"
            ],
            "type": "string",
            "description": "JSend status.",
            "default": "success"
          },
          "message": {
            "title": "Message",
            "type": "string",
            "description": "Human-readable message."
          },
          "routes_list": {
            "title": "Routes List",
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Names of all saved routes available."
          }
        }
      },
      "ListSitesResponse": {
        "title": "ListSitesResponse",
        "required": [
          "message",
          "sites_list"
        ],
        "type": "object",
        "properties": {
          "status": {
            "title": "Status",
            "enum": [
              "success"
            ],
            "type": "string",
            "description": "JSend status.",
            "default": "success"
          },
          "message": {
            "title": "Message",
            "type": "string",
            "description": "Human-readable message."
          },
          "sites_list": {
            "title": "Sites List",
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "List of all saved sites."
          }
        }
      },
      "ListZoneSetsResponse": {
        "title": "ListZoneSetsResponse",
        "required": [
          "message",
          "zone_sets_list"
        ],
        "type": "object",
        "properties": {
          "status": {
            "title": "Status",
            "enum": [
              "success"
            ],
            "type": "string",
            "description": "JSend status.",
            "default": "success"
          },
          "message": {
            "title": "Message",
            "type": "string",
            "description": "Human-readable message."
          },
          "zone_sets_list": {
            "title": "Zone Sets List",
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Names of all saved zone sets."
          }
        }
      },
      "MapPoint": {
        "title": "MapPoint",
        "required": [
          "x",
          "y"
        ],
        "type": "object",
        "properties": {
          "x": {
            "title": "X",
            "type": "number",
            "description": "X position in the map frame (meters)."
          },
          "y": {
            "title": "Y",
            "type": "number",
            "description": "Y position in the map frame (meters)."
          }
        },
        "additionalProperties": false,
        "description": "Base for request bodies: unknown fields are rejected instead of silently dropped."
      },
      "MotionCommandAction": {
        "title": "MotionCommandAction",
        "type": "object",
        "properties": {
          "motion_command": {
            "allOf": [
              {
                "$ref": "#/components/schemas/MotionCommandOptions"
              }
            ],
            "description": "Motion command options. STOP (0) will cancel all current and queued navigation or vehicle commands. When in STOP, no new commands will be added to the queue until resumed. PAUSE (1) will pause the current command execution, leaving remaining commands in the queue, and RESUME (2) will resume the paused waypoint execution and place the autonomy state back to IDLE if the queue is empty.",
            "default": 0
          },
          "mode": {
            "allOf": [
              {
                "$ref": "#/components/schemas/CommandMode"
              }
            ],
            "description": "Mode of execution of previous and current waypoints. Available options: 'ADD','PREEMPT'. ADD or 0: Add a new waypoint to existing queue of waypoints, PREEMPT or 1: Delete the existing queue and adds the new waypoint.",
            "default": 1,
            "example": "PREEMPT"
          }
        },
        "additionalProperties": false,
        "description": "Base for request bodies: unknown fields are rejected instead of silently dropped."
      },
      "MotionCommandExecutionData": {
        "title": "MotionCommandExecutionData",
        "type": "object",
        "properties": {
          "received": {
            "title": "Received"
          },
          "command_ids": {
            "title": "Command Ids",
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Cortex-assigned ids for the accepted commands, aligned 1:1 with the commands sent and in the same order. Each is the goal id for its command; pass one to GET /command-history as command_id to look that command up once it finishes. Empty when cortex handled the request without queueing commands, as a RESUME motion command does."
          }
        }
      },
      "MotionCommandExecutionResponse": {
        "title": "MotionCommandExecutionResponse",
        "required": [
          "status",
          "message",
          "data"
        ],
        "type": "object",
        "properties": {
          "status": {
            "title": "Status",
            "type": "string"
          },
          "message": {
            "title": "Message",
            "type": "string"
          },
          "data": {
            "$ref": "#/components/schemas/MotionCommandExecutionData"
          }
        }
      },
      "MotionCommandListResponse": {
        "title": "MotionCommandListResponse",
        "required": [
          "status",
          "message",
          "data"
        ],
        "type": "object",
        "properties": {
          "status": {
            "title": "Status",
            "type": "string"
          },
          "message": {
            "title": "Message",
            "type": "string"
          },
          "data": {
            "title": "Data",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MotionCommandSummary"
            }
          }
        }
      },
      "MotionCommandOptions": {
        "title": "MotionCommandOptions",
        "enum": [
          0,
          1,
          2
        ],
        "description": "An enumeration."
      },
      "MotionCommandSummary": {
        "title": "MotionCommandSummary",
        "required": [
          "motion_command",
          "alternative"
        ],
        "type": "object",
        "properties": {
          "motion_command": {
            "title": "Motion Command",
            "type": "string"
          },
          "alternative": {
            "title": "Alternative",
            "type": "integer"
          }
        }
      },
      "NavigationFeedback": {
        "title": "NavigationFeedback",
        "type": "object",
        "properties": {
          "nav2_goal_status": {
            "$ref": "#/components/schemas/NavigationGoalStatus"
          },
          "total_distance_remaining": {
            "title": "Total Distance Remaining",
            "type": "number",
            "description": "Total remaining distance to the goal, in meters."
          },
          "target_pose": {
            "$ref": "#/components/schemas/PoseWithHeader"
          },
          "final_pose": {
            "$ref": "#/components/schemas/PoseWithHeader"
          },
          "current_pose_index": {
            "title": "Current Pose Index",
            "type": "integer"
          },
          "number_of_poses_remaining": {
            "title": "Number Of Poses Remaining",
            "type": "integer"
          },
          "navigation_time": {
            "title": "Navigation Time",
            "allOf": [
              {
                "$ref": "#/components/schemas/Stamp"
              }
            ],
            "description": "Elapsed navigation time as a duration (seconds and nanoseconds)."
          },
          "estimated_time_remaining": {
            "title": "Estimated Time Remaining",
            "allOf": [
              {
                "$ref": "#/components/schemas/Stamp"
              }
            ],
            "description": "Estimated time remaining as a duration (seconds and nanoseconds)."
          }
        }
      },
      "NavigationGoalStatus": {
        "title": "NavigationGoalStatus",
        "required": [
          "goal_info",
          "status"
        ],
        "type": "object",
        "properties": {
          "goal_info": {
            "$ref": "#/components/schemas/GoalInfo"
          },
          "status": {
            "$ref": "#/components/schemas/Ros2ActionServerGoalStatus"
          },
          "status_text": {
            "title": "Status Text",
            "type": "string"
          },
          "text": {
            "title": "Text",
            "type": "string"
          }
        }
      },
      "Orientation": {
        "title": "Orientation",
        "required": [
          "x",
          "y",
          "z",
          "w"
        ],
        "type": "object",
        "properties": {
          "x": {
            "title": "X",
            "type": "number"
          },
          "y": {
            "title": "Y",
            "type": "number"
          },
          "z": {
            "title": "Z",
            "type": "number"
          },
          "w": {
            "title": "W",
            "type": "number"
          }
        }
      },
      "PathLogicOptionResponse": {
        "title": "PathLogicOptionResponse",
        "type": "object",
        "properties": {
          "status": {
            "title": "Status",
            "type": "string"
          },
          "message": {
            "title": "Message",
            "type": "string"
          },
          "data": {
            "title": "Data",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CortexOption"
            }
          }
        }
      },
      "PolymathFeedback": {
        "title": "PolymathFeedback",
        "required": [
          "navigation_feedback",
          "vehicle_feedback",
          "current_pose",
          "current_command_index",
          "number_commands_remaining"
        ],
        "type": "object",
        "properties": {
          "timestamp_utc": {
            "$ref": "#/components/schemas/TimeStamp"
          },
          "cortex_status": {
            "$ref": "#/components/schemas/CortexStatus"
          },
          "navigation_feedback": {
            "$ref": "#/components/schemas/NavigationFeedback"
          },
          "vehicle_feedback": {
            "$ref": "#/components/schemas/VehicleFeedback"
          },
          "current_pose": {
            "$ref": "#/components/schemas/PoseWithHeader"
          },
          "current_command_index": {
            "title": "Current Command Index",
            "type": "integer",
            "description": "DEPRECATED: has always meant \"front of queue\". Use current_command_id instead."
          },
          "current_command_id": {
            "title": "Current Command Id",
            "type": "string",
            "description": "Id of the command currently executing, in canonical UUID string form. Matches one of the command_ids returned when the command was submitted. The nil UUID when nothing is active.",
            "default": ""
          },
          "number_commands_remaining": {
            "title": "Number Commands Remaining",
            "type": "integer"
          }
        }
      },
      "PolymathFeedbackData": {
        "title": "PolymathFeedbackData",
        "required": [
          "polymath_feedback"
        ],
        "type": "object",
        "properties": {
          "polymath_feedback": {
            "$ref": "#/components/schemas/PolymathFeedback"
          }
        }
      },
      "PolymathFeedbackResponse": {
        "title": "PolymathFeedbackResponse",
        "type": "object",
        "properties": {
          "status": {
            "title": "Status",
            "type": "string"
          },
          "message": {
            "title": "Message",
            "type": "string"
          },
          "data": {
            "$ref": "#/components/schemas/PolymathFeedbackData"
          }
        }
      },
      "Pose": {
        "title": "Pose",
        "required": [
          "position",
          "orientation"
        ],
        "type": "object",
        "properties": {
          "position": {
            "$ref": "#/components/schemas/Position"
          },
          "orientation": {
            "$ref": "#/components/schemas/Orientation"
          }
        }
      },
      "PoseWithHeader": {
        "title": "PoseWithHeader",
        "required": [
          "header",
          "pose"
        ],
        "type": "object",
        "properties": {
          "header": {
            "$ref": "#/components/schemas/Header"
          },
          "pose": {
            "$ref": "#/components/schemas/Pose"
          }
        }
      },
      "Position": {
        "title": "Position",
        "required": [
          "latitude",
          "longitude",
          "altitude"
        ],
        "type": "object",
        "properties": {
          "latitude": {
            "title": "Latitude",
            "type": "number"
          },
          "longitude": {
            "title": "Longitude",
            "type": "number"
          },
          "altitude": {
            "title": "Altitude",
            "type": "number"
          }
        }
      },
      "ReadRouteGraphResponse": {
        "title": "ReadRouteGraphResponse",
        "required": [
          "message",
          "route"
        ],
        "type": "object",
        "properties": {
          "status": {
            "title": "Status",
            "enum": [
              "success"
            ],
            "type": "string",
            "description": "JSend status.",
            "default": "success"
          },
          "message": {
            "title": "Message",
            "type": "string",
            "description": "Human-readable message."
          },
          "route": {
            "title": "Route",
            "allOf": [
              {
                "$ref": "#/components/schemas/RouteGraph"
              }
            ],
            "description": "The requested route."
          }
        }
      },
      "ReadSiteResponse": {
        "title": "ReadSiteResponse",
        "required": [
          "message",
          "site"
        ],
        "type": "object",
        "properties": {
          "status": {
            "title": "Status",
            "enum": [
              "success"
            ],
            "type": "string",
            "description": "JSend status.",
            "default": "success"
          },
          "message": {
            "title": "Message",
            "type": "string",
            "description": "Human-readable message."
          },
          "site": {
            "title": "Site",
            "allOf": [
              {
                "$ref": "#/components/schemas/Site"
              }
            ],
            "description": "The requested site."
          }
        }
      },
      "ReadZoneSetResponse": {
        "title": "ReadZoneSetResponse",
        "required": [
          "message",
          "zone_set"
        ],
        "type": "object",
        "properties": {
          "status": {
            "title": "Status",
            "enum": [
              "success"
            ],
            "type": "string",
            "description": "JSend status.",
            "default": "success"
          },
          "message": {
            "title": "Message",
            "type": "string",
            "description": "Human-readable message."
          },
          "zone_set": {
            "title": "Zone Set",
            "allOf": [
              {
                "$ref": "#/components/schemas/ZoneSet"
              }
            ],
            "description": "The requested zone set."
          }
        }
      },
      "ReferenceTarget": {
        "title": "ReferenceTarget",
        "required": [
          "pose"
        ],
        "type": "object",
        "properties": {
          "target_id": {
            "title": "Target Id",
            "type": "string",
            "description": "Unique name or ID of the reference target",
            "default": "string"
          },
          "timestamp_utc": {
            "title": "Timestamp Utc",
            "type": "string",
            "description": "Timestamp in UTC ISO format. Should be provided in ISO 8601 format: 'YYYY-MM-DDTHH:MM:SSZ'. If not provided, it will default to the current UTC time."
          },
          "pose": {
            "$ref": "#/components/schemas/GeoPoint"
          },
          "time_validity": {
            "title": "Time Validity",
            "type": "number",
            "description": "Time validity in seconds. -1 means forever.",
            "default": -1
          },
          "recorded_speed_m_s": {
            "title": "Recorded Speed M S",
            "type": "number",
            "description": "Recorded speed of the object in m/s. `None` indicates no measurement available."
          }
        },
        "additionalProperties": false,
        "description": "Base for request bodies: unknown fields are rejected instead of silently dropped."
      },
      "ReferenceTargetSetData": {
        "title": "ReferenceTargetSetData",
        "required": [
          "sent"
        ],
        "type": "object",
        "properties": {
          "sent": {
            "$ref": "#/components/schemas/ReferenceTargetsModel"
          },
          "received": {
            "title": "Received"
          }
        }
      },
      "ReferenceTargetSetResponse": {
        "title": "ReferenceTargetSetResponse",
        "required": [
          "status",
          "message",
          "data"
        ],
        "type": "object",
        "properties": {
          "status": {
            "title": "Status",
            "type": "string"
          },
          "message": {
            "title": "Message",
            "type": "string"
          },
          "data": {
            "$ref": "#/components/schemas/ReferenceTargetSetData"
          }
        }
      },
      "ReferenceTargetsModel": {
        "title": "ReferenceTargetsModel",
        "required": [
          "reference_targets"
        ],
        "type": "object",
        "properties": {
          "reference_targets": {
            "title": "Reference Targets",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ReferenceTarget"
            }
          }
        },
        "additionalProperties": false,
        "description": "Base for request bodies: unknown fields are rejected instead of silently dropped."
      },
      "ReferenceTargetsResponse": {
        "title": "ReferenceTargetsResponse",
        "required": [
          "status",
          "message",
          "data"
        ],
        "type": "object",
        "properties": {
          "status": {
            "title": "Status",
            "type": "string"
          },
          "message": {
            "title": "Message",
            "type": "string"
          },
          "data": {
            "$ref": "#/components/schemas/ReferenceTargetsModel"
          }
        }
      },
      "RelativeCommand": {
        "title": "RelativeCommand",
        "type": "object",
        "properties": {
          "timestamp_utc": {
            "title": "Timestamp Utc",
            "type": "string",
            "description": "Timestamp in UTC ISO format. Should be provided in ISO 8601 format: 'YYYY-MM-DDTHH:MM:SSZ'. If not provided, it will default to the current UTC time.",
            "default": ""
          },
          "x": {
            "title": "X",
            "type": "number",
            "description": "Offset distance in meters along the X axis.",
            "default": 0
          },
          "y": {
            "title": "Y",
            "type": "number",
            "description": "Offset distance in meters along the Y axis.",
            "default": 0
          },
          "z": {
            "title": "Z",
            "type": "number",
            "description": "Offset distance in meters along the Z axis.",
            "default": 0
          },
          "yaw": {
            "title": "Yaw",
            "type": "number",
            "description": "Yaw (radians) angular offset indicating the direction the robot should face relative to the target.",
            "default": 0
          }
        },
        "additionalProperties": false,
        "description": "Base for request bodies: unknown fields are rejected instead of silently dropped."
      },
      "RelativeWaypointTransmissionData": {
        "title": "RelativeWaypointTransmissionData",
        "required": [
          "sent"
        ],
        "type": "object",
        "properties": {
          "sent": {
            "$ref": "#/components/schemas/RelativeWaypoints"
          },
          "received": {
            "title": "Received"
          },
          "command_ids": {
            "title": "Command Ids",
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Cortex-assigned ids for the accepted commands, aligned 1:1 with the commands sent and in the same order. Each is the goal id for its command; pass one to GET /command-history as command_id to look that command up once it finishes. Empty when cortex handled the request without queueing commands, as a RESUME motion command does."
          }
        }
      },
      "RelativeWaypointTransmissionResponse": {
        "title": "RelativeWaypointTransmissionResponse",
        "required": [
          "status",
          "message",
          "data"
        ],
        "type": "object",
        "properties": {
          "status": {
            "title": "Status",
            "type": "string"
          },
          "message": {
            "title": "Message",
            "type": "string"
          },
          "data": {
            "$ref": "#/components/schemas/RelativeWaypointTransmissionData"
          }
        }
      },
      "RelativeWaypoints": {
        "title": "RelativeWaypoints",
        "required": [
          "move_to"
        ],
        "type": "object",
        "properties": {
          "relative_to": {
            "title": "Relative To",
            "anyOf": [
              {
                "type": "string"
              },
              {
                "$ref": "#/components/schemas/ReferenceTarget"
              }
            ],
            "description": "The target that waypoints are specified relative to. Accepts either a name as string or a fully specified ReferenceTarget. The name can be 'current_position', a previously set ReferenceTarget, or the name of a frame in the transform tree, such as 'base_link'. Unknown strings are passed through verbatim and will fail downstream if the reference does not exist. Defaults to 'current_position' so waypoints are interpreted relative to the robot's current pose.",
            "default": "current_position"
          },
          "timestamp_utc": {
            "title": "Timestamp Utc",
            "type": "string",
            "description": "Timestamp in UTC ISO format. Should be provided in ISO 8601 format: 'YYYY-MM-DDTHH:MM:SSZ'. If not provided, it will default to the current UTC time.",
            "default": ""
          },
          "move_to": {
            "title": "Move To",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/RelativeCommand"
            },
            "description": "Ordered list of relative waypoints. When multiple waypoints are provided, the robot navigates through them continuously as a single path rather than stopping discretely at each one. Robot body frame: x forward, y left, z up; positive yaw is counter-clockwise."
          },
          "navigation_options": {
            "title": "Navigation Options",
            "allOf": [
              {
                "$ref": "#/components/schemas/CortexNavigationOptions"
              }
            ],
            "description": "Optional navigation options for this command, including the path logic option and execution mode. See the GET /navigation-path-options endpoint for the available path options and their parameters."
          }
        },
        "additionalProperties": false,
        "description": "Base for request bodies: unknown fields are rejected instead of silently dropped."
      },
      "Ros2ActionServerGoalStatus": {
        "title": "Ros2ActionServerGoalStatus",
        "enum": [
          0,
          1,
          2,
          3,
          4,
          5,
          6
        ],
        "description": "An enumeration."
      },
      "RouteEdge": {
        "title": "RouteEdge",
        "required": [
          "from_node_id",
          "to_node_id",
          "id"
        ],
        "type": "object",
        "properties": {
          "from_node_id": {
            "title": "From Node Id",
            "maximum": 65535,
            "minimum": 0,
            "type": "integer",
            "description": "ID of the node this edge starts from."
          },
          "to_node_id": {
            "title": "To Node Id",
            "maximum": 65535,
            "minimum": 0,
            "type": "integer",
            "description": "ID of the node this edge ends at."
          },
          "id": {
            "title": "Id",
            "maximum": 65535,
            "minimum": 0,
            "type": "integer",
            "description": "16-bit unique identifier of this edge."
          },
          "cost": {
            "title": "Cost",
            "maximum": 20000,
            "minimum": 0,
            "type": "integer",
            "description": "Cost/penalty of traversing this edge.",
            "default": 0
          }
        },
        "additionalProperties": false,
        "description": "Base for request bodies: unknown fields are rejected instead of silently dropped."
      },
      "RouteGraph": {
        "title": "RouteGraph",
        "required": [
          "name",
          "nodes",
          "edges"
        ],
        "type": "object",
        "properties": {
          "name": {
            "title": "Name",
            "type": "string",
            "description": "Name of the route."
          },
          "nodes": {
            "title": "Nodes",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/RouteNode"
            },
            "description": "Nodes that make up the route."
          },
          "edges": {
            "title": "Edges",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/RouteEdge"
            },
            "description": "Edges connecting the nodes."
          }
        }
      },
      "RouteNode": {
        "title": "RouteNode",
        "required": [
          "id"
        ],
        "type": "object",
        "properties": {
          "id": {
            "title": "Id",
            "maximum": 65535,
            "minimum": 0,
            "type": "integer",
            "description": "16-bit unique identifier of the node within this route graph, which can also be used to send a navigation goal later."
          },
          "coordinate_system": {
            "allOf": [
              {
                "$ref": "#/components/schemas/RouteNodeCoordinateSystem"
              }
            ],
            "description": "Coordinate system for this node's position. 0: use wgs84_position. 1: use map_position. Pass the integer value.",
            "default": 0
          },
          "wgs84_position": {
            "title": "Wgs84 Position",
            "allOf": [
              {
                "$ref": "#/components/schemas/GeoPoint"
              }
            ],
            "description": "Node position in WGS84 lat/lon. Required when coordinate_system is WGS84."
          },
          "map_position": {
            "title": "Map Position",
            "allOf": [
              {
                "$ref": "#/components/schemas/MapPoint"
              }
            ],
            "description": "Node position in the map frame. Required when coordinate_system is MAP."
          },
          "name": {
            "title": "Name",
            "type": "string",
            "description": "Optional human-readable name for the node, which can be used to send a navigation goal later.",
            "default": ""
          }
        },
        "additionalProperties": false,
        "description": "Base for request bodies: unknown fields are rejected instead of silently dropped."
      },
      "RouteNodeCoordinateSystem": {
        "title": "RouteNodeCoordinateSystem",
        "enum": [
          0,
          1
        ],
        "description": "An enumeration.",
        "type": "integer"
      },
      "SetZonesEnabledRequest": {
        "title": "SetZonesEnabledRequest",
        "type": "object",
        "properties": {
          "enable_zones": {
            "title": "Enable Zones",
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Zone names to enable in the active set."
          },
          "disable_zones": {
            "title": "Disable Zones",
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Zone names to disable in the active set."
          }
        },
        "additionalProperties": false,
        "description": "Base for request bodies: unknown fields are rejected instead of silently dropped."
      },
      "Site": {
        "title": "Site",
        "required": [
          "name",
          "boundary"
        ],
        "type": "object",
        "properties": {
          "name": {
            "title": "Name",
            "type": "string",
            "description": "Name of the site."
          },
          "boundary": {
            "title": "Boundary",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SiteGeoPoint"
            },
            "description": "Boundary vertices of the site in WGS84 lat/lon."
          }
        }
      },
      "SiteGeoPoint": {
        "title": "SiteGeoPoint",
        "required": [
          "latitude",
          "longitude"
        ],
        "type": "object",
        "properties": {
          "latitude": {
            "title": "Latitude",
            "type": "number",
            "description": "Latitude"
          },
          "longitude": {
            "title": "Longitude",
            "type": "number",
            "description": "Longitude"
          }
        },
        "additionalProperties": false,
        "description": "Base for request bodies: unknown fields are rejected instead of silently dropped."
      },
      "Stamp": {
        "title": "Stamp",
        "type": "object",
        "properties": {
          "sec": {
            "title": "Sec",
            "type": "integer"
          },
          "nanosec": {
            "title": "Nanosec",
            "type": "integer"
          }
        }
      },
      "SubsystemHealth": {
        "title": "SubsystemHealth",
        "required": [
          "name",
          "severity"
        ],
        "type": "object",
        "properties": {
          "name": {
            "title": "Name",
            "type": "string"
          },
          "severity": {
            "title": "Severity",
            "type": "string"
          },
          "faults": {
            "title": "Faults",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ActiveAlert"
            },
            "default": []
          }
        }
      },
      "TimeStamp": {
        "title": "TimeStamp",
        "type": "object",
        "properties": {
          "sec": {
            "title": "Sec",
            "type": "integer"
          },
          "nanosec": {
            "title": "Nanosec",
            "type": "integer"
          }
        }
      },
      "UUID": {
        "title": "UUID",
        "required": [
          "uuid"
        ],
        "type": "object",
        "properties": {
          "uuid": {
            "title": "Uuid",
            "type": "array",
            "items": {
              "type": "integer"
            }
          }
        }
      },
      "ValidationError": {
        "title": "ValidationError",
        "required": [
          "loc",
          "msg",
          "type"
        ],
        "type": "object",
        "properties": {
          "loc": {
            "title": "Location",
            "type": "array",
            "items": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "integer"
                }
              ]
            }
          },
          "msg": {
            "title": "Message",
            "type": "string"
          },
          "type": {
            "title": "Error Type",
            "type": "string"
          }
        }
      },
      "VehicleCommandAction": {
        "title": "VehicleCommandAction",
        "type": "object",
        "properties": {
          "vehicle_command": {
            "title": "Vehicle Command",
            "allOf": [
              {
                "$ref": "#/components/schemas/CortexOption"
              }
            ],
            "description": "Vehicle command to execute"
          },
          "mode": {
            "allOf": [
              {
                "$ref": "#/components/schemas/CommandMode"
              }
            ],
            "description": "Mode of execution of previous and current waypoints. Available options: 'ADD','PREEMPT'. ADD or 0: Add a new waypoint to existing queue of waypoints, PREEMPT or 1: Delete the existing queue and adds the new waypoint.",
            "default": 0,
            "example": "ADD"
          }
        },
        "additionalProperties": false,
        "description": "Base for request bodies: unknown fields are rejected instead of silently dropped."
      },
      "VehicleCommandData": {
        "title": "VehicleCommandData",
        "required": [
          "sent",
          "received"
        ],
        "type": "object",
        "properties": {
          "sent": {
            "$ref": "#/components/schemas/VehicleCommandAction"
          },
          "received": {
            "title": "Received",
            "type": "object"
          },
          "command_ids": {
            "title": "Command Ids",
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Cortex-assigned ids for the accepted commands, aligned 1:1 with the commands sent and in the same order. Each is the goal id for its command; pass one to GET /command-history as command_id to look that command up once it finishes. Empty when cortex handled the request without queueing commands, as a RESUME motion command does."
          }
        }
      },
      "VehicleCommandOptionResponse": {
        "title": "VehicleCommandOptionResponse",
        "required": [
          "status",
          "message",
          "data"
        ],
        "type": "object",
        "properties": {
          "status": {
            "title": "Status",
            "type": "string"
          },
          "message": {
            "title": "Message",
            "type": "string"
          },
          "data": {
            "title": "Data",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CortexOption"
            }
          }
        }
      },
      "VehicleCommandResponse": {
        "title": "VehicleCommandResponse",
        "required": [
          "status",
          "message",
          "data"
        ],
        "type": "object",
        "properties": {
          "status": {
            "title": "Status",
            "type": "string"
          },
          "message": {
            "title": "Message",
            "type": "string"
          },
          "data": {
            "$ref": "#/components/schemas/VehicleCommandData"
          }
        }
      },
      "VehicleFeedback": {
        "title": "VehicleFeedback",
        "type": "object",
        "properties": {
          "state": {
            "title": "State",
            "type": "string"
          },
          "description": {
            "title": "Description",
            "type": "string"
          },
          "data": {
            "title": "Data",
            "type": "array",
            "items": {}
          }
        }
      },
      "WorldModelErrorResponse": {
        "title": "WorldModelErrorResponse",
        "required": [
          "message"
        ],
        "type": "object",
        "properties": {
          "status": {
            "title": "Status",
            "enum": [
              "error"
            ],
            "type": "string",
            "description": "JSend status.",
            "default": "error"
          },
          "message": {
            "title": "Message",
            "type": "string",
            "description": "Human-readable message, propagated from the ROS service."
          }
        },
        "example": {
          "status": "error",
          "message": "string"
        }
      },
      "WorldModelSuccessResponse": {
        "title": "WorldModelSuccessResponse",
        "required": [
          "message"
        ],
        "type": "object",
        "properties": {
          "status": {
            "title": "Status",
            "enum": [
              "success"
            ],
            "type": "string",
            "description": "JSend status.",
            "default": "success"
          },
          "message": {
            "title": "Message",
            "type": "string",
            "description": "Human-readable message, propagated from the ROS service."
          }
        },
        "example": {
          "status": "success",
          "message": "string"
        }
      },
      "WriteRouteGraphRequest": {
        "title": "WriteRouteGraphRequest",
        "required": [
          "nodes",
          "edges"
        ],
        "type": "object",
        "properties": {
          "nodes": {
            "title": "Nodes",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/RouteNode"
            },
            "description": "Nodes that make up the route."
          },
          "edges": {
            "title": "Edges",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/RouteEdge"
            },
            "description": "Edges connecting the nodes, referencing node IDs via from_node_id/to_node_id."
          }
        },
        "additionalProperties": false,
        "description": "Base for request bodies: unknown fields are rejected instead of silently dropped.",
        "example": {
          "nodes": [
            {
              "id": 0,
              "coordinate_system": 0,
              "wgs84_position": {
                "lat": 37.7749,
                "lon": -122.4194
              }
            },
            {
              "id": 1,
              "coordinate_system": 0,
              "wgs84_position": {
                "lat": 37.7752,
                "lon": -122.4189
              }
            }
          ],
          "edges": [
            {
              "from_node_id": 0,
              "to_node_id": 1,
              "id": 0,
              "cost": 1
            }
          ]
        }
      },
      "WriteRouteGraphResponse": {
        "title": "WriteRouteGraphResponse",
        "required": [
          "status",
          "message"
        ],
        "type": "object",
        "properties": {
          "status": {
            "title": "Status",
            "enum": [
              "success"
            ],
            "type": "string",
            "description": "JSend status."
          },
          "message": {
            "title": "Message",
            "type": "string",
            "description": "Human-readable message, propagated from the ROS service."
          }
        },
        "example": {
          "status": "success",
          "message": "string"
        }
      },
      "WriteSiteRequest": {
        "title": "WriteSiteRequest",
        "required": [
          "boundary"
        ],
        "type": "object",
        "properties": {
          "boundary": {
            "title": "Boundary",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SiteGeoPoint"
            },
            "description": "Boundary vertices of the site in WGS84 lat/lon."
          }
        },
        "additionalProperties": false,
        "description": "Base for request bodies: unknown fields are rejected instead of silently dropped.",
        "example": {
          "boundary": [
            {
              "latitude": 37.828258,
              "longitude": -122.425726
            },
            {
              "latitude": 37.828385,
              "longitude": -122.420642
            },
            {
              "latitude": 37.825124,
              "longitude": -122.420416
            },
            {
              "latitude": 37.825183,
              "longitude": -122.425443
            }
          ]
        }
      },
      "WriteSiteResponse": {
        "title": "WriteSiteResponse",
        "required": [
          "status",
          "message"
        ],
        "type": "object",
        "properties": {
          "status": {
            "title": "Status",
            "enum": [
              "success"
            ],
            "type": "string",
            "description": "JSend status."
          },
          "message": {
            "title": "Message",
            "type": "string",
            "description": "Human-readable message, propagated from the ROS service."
          }
        }
      },
      "WriteZoneSetRequest": {
        "title": "WriteZoneSetRequest",
        "required": [
          "zones"
        ],
        "type": "object",
        "properties": {
          "zones": {
            "title": "Zones",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ZoneInfo"
            },
            "description": "List of zones that make up the set."
          }
        },
        "additionalProperties": false,
        "description": "Base for request bodies: unknown fields are rejected instead of silently dropped.",
        "example": {
          "zones": [
            {
              "name": "slowdown_zone",
              "type": "speed_limit",
              "enabled": true,
              "coordinate_system": 0,
              "wgs84_polygon": [
                {
                  "latitude": 37.828258,
                  "longitude": -122.425726
                },
                {
                  "latitude": 37.828385,
                  "longitude": -122.420642
                },
                {
                  "latitude": 37.825124,
                  "longitude": -122.420416
                },
                {
                  "latitude": 37.825183,
                  "longitude": -122.425443
                }
              ],
              "condition": {
                "type": 0,
                "params": []
              },
              "params": [
                {
                  "key": "speed_limit_m_s",
                  "value": 5
                }
              ]
            }
          ]
        }
      },
      "WriteZoneSetResponse": {
        "title": "WriteZoneSetResponse",
        "required": [
          "status",
          "message"
        ],
        "type": "object",
        "properties": {
          "status": {
            "title": "Status",
            "enum": [
              "success"
            ],
            "type": "string",
            "description": "JSend status."
          },
          "message": {
            "title": "Message",
            "type": "string",
            "description": "Human-readable message, propagated from the ROS service."
          }
        }
      },
      "ZoneConditionInfo": {
        "title": "ZoneConditionInfo",
        "type": "object",
        "properties": {
          "type": {
            "allOf": [
              {
                "$ref": "#/components/schemas/ZoneConditionType"
              }
            ],
            "description": "Condition governing when the zone is active.",
            "default": 0
          },
          "params": {
            "title": "Params",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/KeyValuePair"
            },
            "description": "Condition parameters."
          }
        },
        "additionalProperties": false,
        "description": "Base for request bodies: unknown fields are rejected instead of silently dropped."
      },
      "ZoneConditionType": {
        "title": "ZoneConditionType",
        "enum": [
          0
        ],
        "description": "An enumeration.",
        "type": "integer"
      },
      "ZoneCoordinateSystem": {
        "title": "ZoneCoordinateSystem",
        "enum": [
          0,
          1
        ],
        "description": "An enumeration.",
        "type": "integer"
      },
      "ZoneGeoPoint": {
        "title": "ZoneGeoPoint",
        "required": [
          "latitude",
          "longitude"
        ],
        "type": "object",
        "properties": {
          "latitude": {
            "title": "Latitude",
            "type": "number",
            "description": "Latitude"
          },
          "longitude": {
            "title": "Longitude",
            "type": "number",
            "description": "Longitude"
          }
        },
        "additionalProperties": false,
        "description": "Base for request bodies: unknown fields are rejected instead of silently dropped."
      },
      "ZoneInfo": {
        "title": "ZoneInfo",
        "required": [
          "name",
          "type"
        ],
        "type": "object",
        "properties": {
          "name": {
            "title": "Name",
            "type": "string",
            "description": "Name of the zone, unique within the set."
          },
          "type": {
            "allOf": [
              {
                "$ref": "#/components/schemas/ZoneType"
              }
            ],
            "description": "Zone type."
          },
          "enabled": {
            "title": "Enabled",
            "type": "boolean",
            "description": "Whether the zone is enabled. Sent on write; returned on a stored read. Not the loaded-set runtime state.",
            "default": true
          },
          "coordinate_system": {
            "allOf": [
              {
                "$ref": "#/components/schemas/ZoneCoordinateSystem"
              }
            ],
            "description": "Coordinate frame the polygon is expressed in. Pass the integer value.",
            "default": 0
          },
          "wgs84_polygon": {
            "title": "Wgs84 Polygon",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ZoneGeoPoint"
            },
            "description": "Boundary vertices in WGS84. Required when coordinate_system is WGS84."
          },
          "map_polygon": {
            "title": "Map Polygon",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MapPoint"
            },
            "description": "Boundary vertices in the map frame. Required when coordinate_system is MAP."
          },
          "condition": {
            "title": "Condition",
            "allOf": [
              {
                "$ref": "#/components/schemas/ZoneConditionInfo"
              }
            ],
            "description": "Activation condition."
          },
          "params": {
            "title": "Params",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/KeyValuePair"
            },
            "description": "Zone parameters."
          },
          "state": {
            "allOf": [
              {
                "$ref": "#/components/schemas/ZoneState"
              }
            ],
            "description": "Runtime state. Only populated when reading the loaded set. Ignored on write."
          }
        },
        "additionalProperties": false,
        "description": "Base for request bodies: unknown fields are rejected instead of silently dropped."
      },
      "ZoneSet": {
        "title": "ZoneSet",
        "required": [
          "name",
          "zones"
        ],
        "type": "object",
        "properties": {
          "name": {
            "title": "Name",
            "type": "string",
            "description": "Name of the zone set."
          },
          "zones": {
            "title": "Zones",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ZoneInfo"
            },
            "description": "Zones in the set."
          }
        }
      },
      "ZoneState": {
        "title": "ZoneState",
        "enum": [
          0,
          1,
          2,
          3
        ],
        "description": "An enumeration.",
        "type": "integer"
      },
      "ZoneType": {
        "title": "ZoneType",
        "enum": [
          "speed_limit",
          "geofence",
          "keep_out",
          "stop_zone"
        ],
        "description": "An enumeration."
      }
    },
    "responses": {
      "CommandAccepted": {
        "description": "Polymath accepted the command.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/SuccessResponse"
            },
            "example": {
              "status": "success"
            }
          }
        }
      },
      "Unauthorized": {
        "description": "The request is missing a bearer token, or the token is invalid."
      },
      "Forbidden": {
        "description": "The bearer token does not grant access to this operation or vehicle."
      },
      "VehicleNotFound": {
        "description": "The vehicle was not found, is not available to this API client, or does not support the requested operation."
      },
      "InternalServerError": {
        "description": "Polymath could not complete the request because of an unexpected error."
      },
      "BadGateway": {
        "description": "Polymath could not complete the request because another service failed."
      },
      "ServiceUnavailable": {
        "description": "The requested operation is temporarily unavailable."
      },
      "GatewayTimeout": {
        "description": "Polymath did not receive a response in time."
      }
    },
    "securitySchemes": {
      "HTTPBearer": {
        "type": "http",
        "scheme": "bearer",
        "description": "Send your access token in the `Authorization` header as `Bearer <token>`."
      }
    }
  }
}
