{
  "openapi": "3.1.0",
  "info": {
    "title": "Open Drive Agent API",
    "version": "1.4.0"
  },
  "servers": [
    {
      "url": "/",
      "description": "Same origin as this document"
    },
    {
      "url": "https://opendrive.run",
      "description": "Production"
    },
    {
      "url": "https://dev.opendrive.run",
      "description": "Development"
    }
  ],
  "externalDocs": {
    "description": "Agent guide and MCP examples",
    "url": "/AGENTS.md"
  },
  "components": {
    "securitySchemes": {
      "AgentToken": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "odr_",
        "description": "Personal token created by a signed-in user at /agents. The required scope is listed on each action."
      }
    }
  },
  "paths": {
    "/api/agent/v1/actions": {
      "get": {
        "operationId": "list_agent_actions",
        "summary": "List agent actions",
        "responses": {
          "200": {
            "description": "Action registry",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "version",
                    "actions"
                  ],
                  "properties": {
                    "version": {
                      "type": "string"
                    },
                    "actions": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "name",
                          "version",
                          "title",
                          "description",
                          "risk",
                          "scope",
                          "inputSchema",
                          "outputSchema",
                          "backingRoute"
                        ],
                        "properties": {
                          "name": {
                            "type": "string"
                          },
                          "version": {
                            "type": "string"
                          },
                          "title": {
                            "type": "string"
                          },
                          "description": {
                            "type": "string"
                          },
                          "risk": {
                            "enum": [
                              "read_only",
                              "account_write"
                            ]
                          },
                          "scope": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "role": {
                            "type": "string"
                          },
                          "roles": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          },
                          "inputSchema": {
                            "type": "object"
                          },
                          "outputSchema": {
                            "type": "object"
                          },
                          "backingRoute": {
                            "type": "string"
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Invalid agent token",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Rate limit reached",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/agent/v1/actions/search_vehicles": {
      "post": {
        "operationId": "search_vehicles",
        "summary": "Find cars",
        "description": "Find available ride-hailing rentals by city, country, fuel, transmission, rental type or price. Weekly and slot prices use different time units. Demo listings are marked isDemo.",
        "x-backing-route": "GET /api/vehicles",
        "x-action-version": "1.1.0",
        "x-risk": "read_only",
        "x-required-scope": null,
        "security": [
          {},
          {
            "AgentToken": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "input"
                ],
                "additionalProperties": false,
                "properties": {
                  "input": {
                    "type": "object",
                    "properties": {
                      "city": {
                        "type": "string",
                        "description": "Lisboa and Lisbon, and Setubal and Setúbal, are equivalent. Matching these aliases ignores case and accents.",
                        "minLength": 1,
                        "maxLength": 100
                      },
                      "country": {
                        "type": "string",
                        "description": "PT and Portugal are equivalent. Matching these aliases ignores case.",
                        "minLength": 1,
                        "maxLength": 100
                      },
                      "fuel": {
                        "type": "string",
                        "enum": [
                          "Electric",
                          "Hybrid",
                          "Diesel",
                          "Petrol"
                        ]
                      },
                      "modality": {
                        "type": "string",
                        "enum": [
                          "weekly",
                          "slot"
                        ]
                      },
                      "max_price": {
                        "type": "number",
                        "minimum": 0,
                        "maximum": 5000
                      },
                      "limit": {
                        "type": "integer",
                        "minimum": 1,
                        "maximum": 50,
                        "default": 20
                      },
                      "offset": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 10000,
                        "default": 0,
                        "description": "Skip this many results. Page through the full market with limit and offset."
                      },
                      "gear": {
                        "type": "string",
                        "enum": [
                          "automatic",
                          "manual"
                        ],
                        "description": "Match only the specified transmission."
                      }
                    },
                    "additionalProperties": false
                  }
                }
              },
              "example": {
                "input": {
                  "limit": 3
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Action result",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "vehicles": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "pattern": "^[A-Za-z0-9_-]{1,32}$"
                          },
                          "brand": {
                            "type": "string"
                          },
                          "model": {
                            "type": "string"
                          },
                          "city": {
                            "type": "string"
                          },
                          "country": {
                            "type": "string"
                          },
                          "currency": {
                            "type": "string"
                          },
                          "modality": {
                            "type": "string"
                          },
                          "pricePerWeek": {
                            "type": "number"
                          },
                          "deposit": {
                            "type": "number"
                          },
                          "slotPriceDay": {
                            "type": [
                              "number",
                              "null"
                            ]
                          },
                          "slotPriceNight": {
                            "type": [
                              "number",
                              "null"
                            ]
                          },
                          "imageUrl": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "rentalTerms": {
                            "type": [
                              "object",
                              "null"
                            ]
                          },
                          "isDemo": {
                            "type": "boolean"
                          },
                          "updatedAt": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "transmission": {
                            "enum": [
                              "automatic",
                              "manual",
                              null
                            ],
                            "description": "Null when the listing has no transmission set."
                          }
                        },
                        "required": [
                          "id",
                          "brand",
                          "model",
                          "city",
                          "country",
                          "currency",
                          "modality",
                          "pricePerWeek",
                          "deposit",
                          "slotPriceDay",
                          "slotPriceNight",
                          "imageUrl",
                          "rentalTerms",
                          "isDemo",
                          "updatedAt",
                          "transmission"
                        ]
                      },
                      "maxItems": 50
                    }
                  },
                  "required": [
                    "vehicles"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Malformed JSON",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid agent token",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            },
            "headers": {
              "WWW-Authenticate": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient scope, account role or disallowed origin",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Requested record unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "413": {
            "description": "Request exceeds 64 KiB",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "415": {
            "description": "Expected application/json",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Input does not match the schema",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Rate limit reached",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            },
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer"
                }
              }
            }
          }
        }
      }
    },
    "/api/agent/v1/actions/find_vehicles_from_request": {
      "post": {
        "operationId": "find_vehicles_from_request",
        "summary": "Find cars from a request",
        "description": "Interpret a request in English, Portuguese or Spanish and search the public weekly catalogue. Review unsupported constraints before using matches. A start date (\"next Monday\", \"1 de dezembro\") and a length in weeks are resolved in Europe/Lisbon and only listings free of rental agreements, booked slots, scheduled maintenance and fleet-marked unavailable days for that window are returned; availability.notChecked lists what is not verified. Impossible or past dates are reported as unsupported, never guessed. Monthly net is estimated, and demo listings are marked isDemo. Transmission is a supported filter. Each estimate includes assumptions and dated market inputs when available. depositKnown is false when the fleet has not stated a deposit, so deposit 0 means unknown. terms separates costs beyond the weekly rent (deposit, excess, mileage allowance, extra-km price, minimum weeks, notice) and reports each as amount, none or unknown, never a guessed 0.",
        "x-backing-route": "GET /api/vehicles/interpret + GET /api/vehicles",
        "x-action-version": "1.4.0",
        "x-risk": "read_only",
        "x-required-scope": null,
        "security": [
          {},
          {
            "AgentToken": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "input"
                ],
                "additionalProperties": false,
                "properties": {
                  "input": {
                    "type": "object",
                    "properties": {
                      "text": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 300
                      },
                      "limit": {
                        "type": "integer",
                        "minimum": 1,
                        "maximum": 10,
                        "default": 10
                      }
                    },
                    "required": [
                      "text"
                    ],
                    "additionalProperties": false
                  }
                }
              },
              "example": {
                "input": {
                  "text": "híbrido para Uber no Porto com seguro",
                  "limit": 3
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Action result",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "criteria": {
                      "type": "object",
                      "properties": {
                        "q": {
                          "type": "string"
                        },
                        "country": {
                          "type": "string"
                        },
                        "city": {
                          "type": "string"
                        },
                        "fuels": {
                          "type": "array",
                          "items": {
                            "type": "string",
                            "enum": [
                              "Electric",
                              "Hybrid",
                              "Petrol",
                              "Diesel"
                            ]
                          }
                        },
                        "categories": {
                          "type": "array",
                          "items": {
                            "type": "string",
                            "enum": [
                              "Eco",
                              "Standard",
                              "Premium"
                            ]
                          }
                        },
                        "platforms": {
                          "type": "array",
                          "items": {
                            "type": "string",
                            "enum": [
                              "Uber",
                              "Bolt"
                            ]
                          }
                        },
                        "priceMax": {
                          "type": [
                            "number",
                            "null"
                          ],
                          "minimum": 0,
                          "maximum": 5000
                        },
                        "deposit": {
                          "type": "string",
                          "enum": [
                            "any",
                            "none",
                            "required"
                          ]
                        },
                        "cover": {
                          "type": "string",
                          "enum": [
                            "any",
                            "included",
                            "excluded"
                          ]
                        },
                        "sort": {
                          "type": "string",
                          "enum": [
                            "fit",
                            "net",
                            "price",
                            "newest"
                          ]
                        },
                        "transmission": {
                          "type": "string",
                          "enum": [
                            "any",
                            "automatic",
                            "manual"
                          ],
                          "default": "any"
                        },
                        "from": {
                          "type": "string",
                          "description": "Rental start day YYYY-MM-DD in Europe/Lisbon; empty when no date was asked for.",
                          "pattern": "^(\\d{4}-\\d{2}-\\d{2})?$"
                        },
                        "weeks": {
                          "type": [
                            "integer",
                            "null"
                          ],
                          "minimum": 1,
                          "maximum": 52,
                          "description": "Rental length in weeks; null when not stated (Browse then checks one week)."
                        }
                      },
                      "required": [
                        "q",
                        "country",
                        "city",
                        "fuels",
                        "categories",
                        "platforms",
                        "priceMax",
                        "deposit",
                        "cover",
                        "sort",
                        "transmission",
                        "from",
                        "weeks"
                      ],
                      "additionalProperties": false
                    },
                    "understood": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "kind": {
                            "type": "string",
                            "enum": [
                              "city",
                              "country",
                              "fuel",
                              "platform",
                              "category",
                              "priceMax",
                              "deposit",
                              "cover",
                              "sort",
                              "q",
                              "transmission",
                              "from",
                              "weeks"
                            ]
                          },
                          "value": {
                            "type": [
                              "string",
                              "number"
                            ]
                          },
                          "match": {
                            "type": "string"
                          },
                          "note": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "kind",
                          "value",
                          "match"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "unsupported": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "kind": {
                            "type": "string",
                            "enum": [
                              "dates",
                              "seats",
                              "other"
                            ]
                          },
                          "match": {
                            "type": "string"
                          },
                          "reason": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "kind",
                          "match",
                          "reason"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "total": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "vehicles": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "brand": {
                            "type": "string"
                          },
                          "model": {
                            "type": "string"
                          },
                          "year": {
                            "type": "integer"
                          },
                          "city": {
                            "type": "string"
                          },
                          "fuel": {
                            "type": "string"
                          },
                          "pricePerWeek": {
                            "type": "number"
                          },
                          "deposit": {
                            "type": "number"
                          },
                          "depositKnown": {
                            "type": "boolean",
                            "description": "False when the fleet has not stated a deposit; deposit 0 then means unknown, not no deposit."
                          },
                          "ownDamageInsuranceIncluded": {
                            "type": "boolean"
                          },
                          "estMonthly": {
                            "type": [
                              "number",
                              "null"
                            ]
                          },
                          "isDemo": {
                            "type": "boolean"
                          },
                          "transmission": {
                            "enum": [
                              "automatic",
                              "manual",
                              null
                            ],
                            "description": "Null when the listing has no transmission set."
                          },
                          "estimate": {
                            "description": "Before-tax projection for a fixed weekly EUR rental. The range varies gross earnings by ±10%, including its effect on scenario commission. Actual earnings vary. Null when no estimate is available.",
                            "type": [
                              "object",
                              "null"
                            ],
                            "properties": {
                              "kind": {
                                "const": "estimate"
                              },
                              "currency": {
                                "const": "EUR"
                              },
                              "hoursPerWeek": {
                                "type": "number"
                              },
                              "grossWeekly": {
                                "type": "number"
                              },
                              "rentWeekly": {
                                "type": "number"
                              },
                              "energyWeekly": {
                                "type": "number"
                              },
                              "commissionWeekly": {
                                "type": "number"
                              },
                              "otherWeekly": {
                                "type": "number"
                              },
                              "netWeekly": {
                                "type": "number"
                              },
                              "netMonthly": {
                                "type": "number",
                                "description": "Defaults to the listing estMonthly. Scenario net is rounded to whole euros and floored at zero."
                              },
                              "breakEvenHoursPerWeek": {
                                "type": [
                                  "number",
                                  "null"
                                ],
                                "description": "Working hours needed to cover costs. Null when additional hours cannot cover fixed costs."
                              },
                              "range": {
                                "type": "object",
                                "properties": {
                                  "netMonthlyLow": {
                                    "type": "number"
                                  },
                                  "netMonthlyHigh": {
                                    "type": "number"
                                  }
                                },
                                "required": [
                                  "netMonthlyLow",
                                  "netMonthlyHigh"
                                ],
                                "additionalProperties": false
                              },
                              "assumptions": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "key": {
                                      "type": "string"
                                    },
                                    "label": {
                                      "type": "string"
                                    },
                                    "value": {
                                      "type": [
                                        "number",
                                        "string"
                                      ]
                                    },
                                    "unit": {
                                      "type": [
                                        "string",
                                        "null"
                                      ]
                                    },
                                    "source": {
                                      "type": [
                                        "string",
                                        "null"
                                      ]
                                    },
                                    "asOf": {
                                      "type": [
                                        "string",
                                        "null"
                                      ],
                                      "format": "date"
                                    }
                                  },
                                  "required": [
                                    "key",
                                    "label",
                                    "value",
                                    "unit",
                                    "source",
                                    "asOf"
                                  ],
                                  "additionalProperties": false
                                }
                              }
                            },
                            "required": [
                              "kind",
                              "currency",
                              "hoursPerWeek",
                              "grossWeekly",
                              "rentWeekly",
                              "energyWeekly",
                              "commissionWeekly",
                              "otherWeekly",
                              "netWeekly",
                              "netMonthly",
                              "breakEvenHoursPerWeek",
                              "range",
                              "assumptions"
                            ],
                            "additionalProperties": false
                          },
                          "terms": {
                            "type": "object",
                            "description": "Costs beyond the weekly rent. state unknown means the fleet has not stated it; ask the owner before relying on it.",
                            "properties": {
                              "deposit": {
                                "type": "object",
                                "properties": {
                                  "state": {
                                    "type": "string",
                                    "enum": [
                                      "amount",
                                      "none",
                                      "unknown"
                                    ]
                                  },
                                  "amount": {
                                    "type": [
                                      "number",
                                      "null"
                                    ]
                                  }
                                },
                                "required": [
                                  "state",
                                  "amount"
                                ],
                                "additionalProperties": false
                              },
                              "excess": {
                                "type": "object",
                                "properties": {
                                  "state": {
                                    "type": "string",
                                    "enum": [
                                      "amount",
                                      "none",
                                      "notCovered",
                                      "unknown"
                                    ]
                                  },
                                  "amount": {
                                    "type": [
                                      "number",
                                      "null"
                                    ]
                                  }
                                },
                                "required": [
                                  "state",
                                  "amount"
                                ],
                                "additionalProperties": false,
                                "description": "notCovered: no own-damage cover, so the driver pays damage in full."
                              },
                              "kmPerWeek": {
                                "type": [
                                  "integer",
                                  "null"
                                ],
                                "description": "Weekly mileage allowance; null means unlimited."
                              },
                              "extraKmPrice": {
                                "type": [
                                  "object",
                                  "null"
                                ],
                                "properties": {
                                  "state": {
                                    "type": "string",
                                    "enum": [
                                      "amount",
                                      "unknown"
                                    ]
                                  },
                                  "amount": {
                                    "type": [
                                      "number",
                                      "null"
                                    ]
                                  }
                                },
                                "required": [
                                  "state",
                                  "amount"
                                ],
                                "additionalProperties": false,
                                "description": "Price per km over the allowance; null when mileage is unlimited."
                              },
                              "minWeeks": {
                                "type": [
                                  "integer",
                                  "null"
                                ],
                                "description": "Minimum rental length in weeks; null means unknown."
                              },
                              "noticeWeeks": {
                                "type": "null",
                                "description": "Notice period. Not collected yet, so always unknown."
                              }
                            },
                            "required": [
                              "deposit",
                              "excess",
                              "kmPerWeek",
                              "extraKmPrice",
                              "minWeeks",
                              "noticeWeeks"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "required": [
                          "id",
                          "brand",
                          "model",
                          "year",
                          "city",
                          "fuel",
                          "pricePerWeek",
                          "deposit",
                          "depositKnown",
                          "terms",
                          "ownDamageInsuranceIncluded",
                          "estMonthly",
                          "isDemo",
                          "transmission",
                          "estimate"
                        ],
                        "additionalProperties": false
                      },
                      "maxItems": 10
                    },
                    "assumptions": {
                      "type": "string"
                    },
                    "availability": {
                      "description": "The rental window checked, or null when no date was requested. until is exclusive.",
                      "oneOf": [
                        {
                          "type": "null"
                        },
                        {
                          "type": "object",
                          "properties": {
                            "from": {
                              "type": "string",
                              "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                            },
                            "until": {
                              "type": "string",
                              "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                            },
                            "weeks": {
                              "type": "integer",
                              "minimum": 1,
                              "maximum": 52
                            },
                            "timezone": {
                              "const": "Europe/Lisbon"
                            },
                            "checked": {
                              "type": "array",
                              "items": {
                                "type": "string",
                                "enum": [
                                  "rental_agreements",
                                  "booked_slots",
                                  "scheduled_maintenance",
                                  "unavailable_dates"
                                ]
                              }
                            },
                            "notChecked": {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            }
                          },
                          "required": [
                            "from",
                            "until",
                            "weeks",
                            "timezone",
                            "checked",
                            "notChecked"
                          ],
                          "additionalProperties": false
                        }
                      ]
                    }
                  },
                  "required": [
                    "criteria",
                    "understood",
                    "unsupported",
                    "availability",
                    "total",
                    "vehicles",
                    "assumptions"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Malformed JSON",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid agent token",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            },
            "headers": {
              "WWW-Authenticate": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient scope, account role or disallowed origin",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Requested record unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "413": {
            "description": "Request exceeds 64 KiB",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "415": {
            "description": "Expected application/json",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Input does not match the schema",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Rate limit reached",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            },
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer"
                }
              }
            }
          }
        }
      }
    },
    "/api/agent/v1/actions/get_vehicle": {
      "post": {
        "operationId": "get_vehicle",
        "summary": "Car details",
        "description": "Read one available listing by ID. Use an ID returned by Find cars. Contact details and registration plates are omitted.",
        "x-backing-route": "GET /api/vehicles/{id}",
        "x-action-version": "1.0.0",
        "x-risk": "read_only",
        "x-required-scope": null,
        "security": [
          {},
          {
            "AgentToken": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "input"
                ],
                "additionalProperties": false,
                "properties": {
                  "input": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "pattern": "^[A-Za-z0-9_-]{1,32}$"
                      }
                    },
                    "additionalProperties": false,
                    "required": [
                      "id"
                    ]
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Action result",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "vehicle": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "pattern": "^[A-Za-z0-9_-]{1,32}$"
                        },
                        "brand": {
                          "type": "string"
                        },
                        "model": {
                          "type": "string"
                        },
                        "city": {
                          "type": "string"
                        },
                        "country": {
                          "type": "string"
                        },
                        "currency": {
                          "type": "string"
                        },
                        "modality": {
                          "type": "string"
                        },
                        "pricePerWeek": {
                          "type": "number"
                        },
                        "deposit": {
                          "type": "number"
                        },
                        "slotPriceDay": {
                          "type": [
                            "number",
                            "null"
                          ]
                        },
                        "slotPriceNight": {
                          "type": [
                            "number",
                            "null"
                          ]
                        },
                        "imageUrl": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "rentalTerms": {
                          "type": [
                            "object",
                            "null"
                          ]
                        },
                        "isDemo": {
                          "type": "boolean"
                        },
                        "updatedAt": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "transmission": {
                          "enum": [
                            "automatic",
                            "manual",
                            null
                          ],
                          "description": "Null when the listing has no transmission set."
                        },
                        "estimate": {
                          "description": "Before-tax projection for a fixed weekly EUR rental. The range varies gross earnings by ±10%, including its effect on scenario commission. Actual earnings vary. Null when no estimate is available.",
                          "type": [
                            "object",
                            "null"
                          ],
                          "properties": {
                            "kind": {
                              "const": "estimate"
                            },
                            "currency": {
                              "const": "EUR"
                            },
                            "hoursPerWeek": {
                              "type": "number"
                            },
                            "grossWeekly": {
                              "type": "number"
                            },
                            "rentWeekly": {
                              "type": "number"
                            },
                            "energyWeekly": {
                              "type": "number"
                            },
                            "commissionWeekly": {
                              "type": "number"
                            },
                            "otherWeekly": {
                              "type": "number"
                            },
                            "netWeekly": {
                              "type": "number"
                            },
                            "netMonthly": {
                              "type": "number",
                              "description": "Defaults to the listing estMonthly. Scenario net is rounded to whole euros and floored at zero."
                            },
                            "breakEvenHoursPerWeek": {
                              "type": [
                                "number",
                                "null"
                              ],
                              "description": "Working hours needed to cover costs. Null when additional hours cannot cover fixed costs."
                            },
                            "range": {
                              "type": "object",
                              "properties": {
                                "netMonthlyLow": {
                                  "type": "number"
                                },
                                "netMonthlyHigh": {
                                  "type": "number"
                                }
                              },
                              "required": [
                                "netMonthlyLow",
                                "netMonthlyHigh"
                              ],
                              "additionalProperties": false
                            },
                            "assumptions": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "key": {
                                    "type": "string"
                                  },
                                  "label": {
                                    "type": "string"
                                  },
                                  "value": {
                                    "type": [
                                      "number",
                                      "string"
                                    ]
                                  },
                                  "unit": {
                                    "type": [
                                      "string",
                                      "null"
                                    ]
                                  },
                                  "source": {
                                    "type": [
                                      "string",
                                      "null"
                                    ]
                                  },
                                  "asOf": {
                                    "type": [
                                      "string",
                                      "null"
                                    ],
                                    "format": "date"
                                  }
                                },
                                "required": [
                                  "key",
                                  "label",
                                  "value",
                                  "unit",
                                  "source",
                                  "asOf"
                                ],
                                "additionalProperties": false
                              }
                            }
                          },
                          "required": [
                            "kind",
                            "currency",
                            "hoursPerWeek",
                            "grossWeekly",
                            "rentWeekly",
                            "energyWeekly",
                            "commissionWeekly",
                            "otherWeekly",
                            "netWeekly",
                            "netMonthly",
                            "breakEvenHoursPerWeek",
                            "range",
                            "assumptions"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "id",
                        "brand",
                        "model",
                        "city",
                        "country",
                        "currency",
                        "modality",
                        "pricePerWeek",
                        "deposit",
                        "slotPriceDay",
                        "slotPriceNight",
                        "imageUrl",
                        "rentalTerms",
                        "isDemo",
                        "updatedAt",
                        "transmission",
                        "estimate"
                      ]
                    }
                  },
                  "required": [
                    "vehicle"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Malformed JSON",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid agent token",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            },
            "headers": {
              "WWW-Authenticate": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient scope, account role or disallowed origin",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Requested record unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "413": {
            "description": "Request exceeds 64 KiB",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "415": {
            "description": "Expected application/json",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Input does not match the schema",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Rate limit reached",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            },
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer"
                }
              }
            }
          }
        }
      }
    },
    "/api/agent/v1/actions/get_market_rates": {
      "post": {
        "operationId": "get_market_rates",
        "summary": "Market rates",
        "description": "Read reference earnings and operating costs by city. These are estimates.",
        "x-backing-route": "GET /api/market/rates",
        "x-action-version": "1.0.0",
        "x-risk": "read_only",
        "x-required-scope": null,
        "security": [
          {},
          {
            "AgentToken": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "input"
                ],
                "additionalProperties": false,
                "properties": {
                  "input": {
                    "type": "object",
                    "properties": {},
                    "additionalProperties": false
                  }
                }
              },
              "example": {
                "input": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Action result",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "meta": {
                      "type": "object",
                      "properties": {
                        "currency": {
                          "type": "string"
                        },
                        "weeksPerMonth": {
                          "type": "number"
                        },
                        "utilization": {
                          "type": "number"
                        },
                        "baseHoursWeek": {
                          "type": "number"
                        }
                      },
                      "required": [
                        "currency",
                        "weeksPerMonth",
                        "utilization",
                        "baseHoursWeek"
                      ]
                    },
                    "cities": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "object",
                        "properties": {
                          "country": {
                            "type": "string"
                          },
                          "currency": {
                            "type": "string"
                          },
                          "hourlyGross": {
                            "type": "number"
                          },
                          "evCostPerHour": {
                            "type": "number"
                          },
                          "hybridCostPerHour": {
                            "type": "number"
                          },
                          "fuelCostPerHour": {
                            "type": "number"
                          }
                        },
                        "required": [
                          "country",
                          "currency",
                          "hourlyGross",
                          "evCostPerHour",
                          "hybridCostPerHour",
                          "fuelCostPerHour"
                        ]
                      }
                    }
                  },
                  "required": [
                    "meta",
                    "cities"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Malformed JSON",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid agent token",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            },
            "headers": {
              "WWW-Authenticate": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient scope, account role or disallowed origin",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Requested record unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "413": {
            "description": "Request exceeds 64 KiB",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "415": {
            "description": "Expected application/json",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Input does not match the schema",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Rate limit reached",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            },
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer"
                }
              }
            }
          }
        }
      }
    },
    "/api/agent/v1/actions/get_market_rate_history": {
      "post": {
        "operationId": "get_market_rate_history",
        "summary": "Market rate history",
        "description": "Read how reference earnings and operating costs changed by city, oldest point first. Each point is the set of rates effective from that date. Optional city and country use the same aliases as Find cars. These are estimates.",
        "x-backing-route": "GET /api/market/rates/history",
        "x-action-version": "1.0.0",
        "x-risk": "read_only",
        "x-required-scope": null,
        "security": [
          {},
          {
            "AgentToken": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "input"
                ],
                "additionalProperties": false,
                "properties": {
                  "input": {
                    "type": "object",
                    "properties": {
                      "city": {
                        "type": "string",
                        "description": "Lisboa and Lisbon, and Setubal and Setúbal, are equivalent. Matching these aliases ignores case and accents.",
                        "minLength": 1,
                        "maxLength": 100
                      },
                      "country": {
                        "type": "string",
                        "description": "PT and Portugal are equivalent. Matching these aliases ignores case.",
                        "minLength": 1,
                        "maxLength": 100
                      }
                    },
                    "additionalProperties": false
                  }
                }
              },
              "example": {
                "input": {
                  "city": "Lisbon"
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Action result",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "cities": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "city": {
                            "type": "string"
                          },
                          "country": {
                            "type": "string"
                          },
                          "currency": {
                            "type": "string"
                          },
                          "points": {
                            "type": "array",
                            "minItems": 1,
                            "items": {
                              "type": "object",
                              "properties": {
                                "effectiveFrom": {
                                  "type": "string",
                                  "format": "date"
                                },
                                "hourlyGross": {
                                  "type": "number"
                                },
                                "evCostPerHour": {
                                  "type": "number"
                                },
                                "hybridCostPerHour": {
                                  "type": "number"
                                },
                                "fuelCostPerHour": {
                                  "type": "number"
                                }
                              },
                              "required": [
                                "effectiveFrom",
                                "hourlyGross",
                                "evCostPerHour",
                                "hybridCostPerHour",
                                "fuelCostPerHour"
                              ]
                            }
                          }
                        },
                        "required": [
                          "city",
                          "country",
                          "currency",
                          "points"
                        ]
                      }
                    }
                  },
                  "required": [
                    "cities"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Malformed JSON",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid agent token",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            },
            "headers": {
              "WWW-Authenticate": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient scope, account role or disallowed origin",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Requested record unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "413": {
            "description": "Request exceeds 64 KiB",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "415": {
            "description": "Expected application/json",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Input does not match the schema",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Rate limit reached",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            },
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer"
                }
              }
            }
          }
        }
      }
    },
    "/api/agent/v1/actions/compare_vehicle_costs": {
      "post": {
        "operationId": "compare_vehicle_costs",
        "summary": "Compare earnings",
        "description": "Rank available cars by estimated monthly driver earnings after rent and running costs, using the same filters as Find cars and the city market rates. total counts every ranked car; page with limit and offset to read the full market (complete is false only when the scan cap was reached). A city without market rates returns no cars and emptyCity true. Cars without an estimate come last with estMonthlyReason. Breakdowns are whole euros that add up: net = max(0, grossMonthly - rentMonthly - operatingMonthly). Values are estimates. Demo listings are marked isDemo. Each estimate includes assumptions and dated market inputs when available. depositKnown is false when the fleet has not stated a deposit, so deposit 0 means unknown.",
        "x-backing-route": "GET /api/vehicles + GET /api/market/rates",
        "x-action-version": "1.2.0",
        "x-risk": "read_only",
        "x-required-scope": null,
        "security": [
          {},
          {
            "AgentToken": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "input"
                ],
                "additionalProperties": false,
                "properties": {
                  "input": {
                    "type": "object",
                    "properties": {
                      "city": {
                        "type": "string",
                        "description": "Lisboa and Lisbon, and Setubal and Setúbal, are equivalent. Matching these aliases ignores case and accents.",
                        "minLength": 1,
                        "maxLength": 100
                      },
                      "country": {
                        "type": "string",
                        "description": "PT and Portugal are equivalent. Matching these aliases ignores case.",
                        "minLength": 1,
                        "maxLength": 100
                      },
                      "fuel": {
                        "type": "string",
                        "enum": [
                          "Electric",
                          "Hybrid",
                          "Diesel",
                          "Petrol"
                        ]
                      },
                      "modality": {
                        "type": "string",
                        "enum": [
                          "weekly",
                          "slot"
                        ]
                      },
                      "max_price": {
                        "type": "number",
                        "minimum": 0,
                        "maximum": 5000
                      },
                      "limit": {
                        "type": "integer",
                        "minimum": 1,
                        "maximum": 50,
                        "default": 20
                      },
                      "offset": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 10000,
                        "default": 0,
                        "description": "Skip this many results. Page through the full market with limit and offset."
                      },
                      "gear": {
                        "type": "string",
                        "enum": [
                          "automatic",
                          "manual"
                        ],
                        "description": "Match only the specified transmission."
                      }
                    },
                    "additionalProperties": false
                  }
                }
              },
              "example": {
                "input": {
                  "city": "Lisbon",
                  "limit": 3
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Action result",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "city": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "fuel": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "enum": [
                        "Electric",
                        "Hybrid",
                        "Diesel",
                        "Petrol",
                        null
                      ]
                    },
                    "market": {
                      "type": [
                        "object",
                        "null"
                      ],
                      "properties": {
                        "hourlyGross": {
                          "type": "number"
                        },
                        "operatingCostPerHour": {
                          "type": [
                            "number",
                            "null"
                          ]
                        },
                        "hoursPerWeek": {
                          "type": "number"
                        },
                        "weeksPerMonth": {
                          "type": "number"
                        },
                        "utilization": {
                          "type": "number"
                        },
                        "currency": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "hourlyGross",
                        "operatingCostPerHour",
                        "hoursPerWeek",
                        "weeksPerMonth",
                        "utilization",
                        "currency"
                      ]
                    },
                    "vehicles": {
                      "type": "array",
                      "maxItems": 50,
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "pattern": "^[A-Za-z0-9_-]{1,32}$"
                          },
                          "brand": {
                            "type": "string"
                          },
                          "model": {
                            "type": "string"
                          },
                          "city": {
                            "type": "string"
                          },
                          "fuel": {
                            "type": "string"
                          },
                          "pricePerWeek": {
                            "type": "number"
                          },
                          "deposit": {
                            "type": "number"
                          },
                          "depositKnown": {
                            "type": "boolean",
                            "description": "False when the fleet has not stated a deposit; deposit 0 then means unknown, not no deposit."
                          },
                          "estMonthly": {
                            "type": [
                              "number",
                              "null"
                            ]
                          },
                          "estMonthlyReason": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "enum": [
                              "slot_pricing",
                              "no_market_rates",
                              "unsupported_fuel",
                              "not_estimated",
                              null
                            ]
                          },
                          "isDemo": {
                            "type": "boolean"
                          },
                          "netBreakdown": {
                            "type": [
                              "object",
                              "null"
                            ],
                            "properties": {
                              "grossMonthly": {
                                "type": "integer",
                                "minimum": 0
                              },
                              "operatingMonthly": {
                                "type": "integer",
                                "minimum": 0
                              },
                              "rentMonthly": {
                                "type": "integer",
                                "minimum": 0
                              },
                              "net": {
                                "type": "integer",
                                "minimum": 0
                              }
                            },
                            "required": [
                              "grossMonthly",
                              "operatingMonthly",
                              "rentMonthly",
                              "net"
                            ]
                          },
                          "transmission": {
                            "enum": [
                              "automatic",
                              "manual",
                              null
                            ],
                            "description": "Null when the listing has no transmission set."
                          },
                          "estimate": {
                            "description": "Before-tax projection for a fixed weekly EUR rental. The range varies gross earnings by ±10%, including its effect on scenario commission. Actual earnings vary. Null when no estimate is available.",
                            "type": [
                              "object",
                              "null"
                            ],
                            "properties": {
                              "kind": {
                                "const": "estimate"
                              },
                              "currency": {
                                "const": "EUR"
                              },
                              "hoursPerWeek": {
                                "type": "number"
                              },
                              "grossWeekly": {
                                "type": "number"
                              },
                              "rentWeekly": {
                                "type": "number"
                              },
                              "energyWeekly": {
                                "type": "number"
                              },
                              "commissionWeekly": {
                                "type": "number"
                              },
                              "otherWeekly": {
                                "type": "number"
                              },
                              "netWeekly": {
                                "type": "number"
                              },
                              "netMonthly": {
                                "type": "number",
                                "description": "Defaults to the listing estMonthly. Scenario net is rounded to whole euros and floored at zero."
                              },
                              "breakEvenHoursPerWeek": {
                                "type": [
                                  "number",
                                  "null"
                                ],
                                "description": "Working hours needed to cover costs. Null when additional hours cannot cover fixed costs."
                              },
                              "range": {
                                "type": "object",
                                "properties": {
                                  "netMonthlyLow": {
                                    "type": "number"
                                  },
                                  "netMonthlyHigh": {
                                    "type": "number"
                                  }
                                },
                                "required": [
                                  "netMonthlyLow",
                                  "netMonthlyHigh"
                                ],
                                "additionalProperties": false
                              },
                              "assumptions": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "key": {
                                      "type": "string"
                                    },
                                    "label": {
                                      "type": "string"
                                    },
                                    "value": {
                                      "type": [
                                        "number",
                                        "string"
                                      ]
                                    },
                                    "unit": {
                                      "type": [
                                        "string",
                                        "null"
                                      ]
                                    },
                                    "source": {
                                      "type": [
                                        "string",
                                        "null"
                                      ]
                                    },
                                    "asOf": {
                                      "type": [
                                        "string",
                                        "null"
                                      ],
                                      "format": "date"
                                    }
                                  },
                                  "required": [
                                    "key",
                                    "label",
                                    "value",
                                    "unit",
                                    "source",
                                    "asOf"
                                  ],
                                  "additionalProperties": false
                                }
                              }
                            },
                            "required": [
                              "kind",
                              "currency",
                              "hoursPerWeek",
                              "grossWeekly",
                              "rentWeekly",
                              "energyWeekly",
                              "commissionWeekly",
                              "otherWeekly",
                              "netWeekly",
                              "netMonthly",
                              "breakEvenHoursPerWeek",
                              "range",
                              "assumptions"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "required": [
                          "id",
                          "brand",
                          "model",
                          "city",
                          "fuel",
                          "pricePerWeek",
                          "deposit",
                          "depositKnown",
                          "estMonthly",
                          "estMonthlyReason",
                          "isDemo",
                          "netBreakdown",
                          "transmission",
                          "estimate"
                        ]
                      }
                    },
                    "emptyCity": {
                      "type": "boolean"
                    },
                    "total": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "offset": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "complete": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "city",
                    "fuel",
                    "market",
                    "vehicles",
                    "emptyCity",
                    "total",
                    "offset",
                    "complete"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Malformed JSON",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid agent token",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            },
            "headers": {
              "WWW-Authenticate": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient scope, account role or disallowed origin",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Requested record unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "413": {
            "description": "Request exceeds 64 KiB",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "415": {
            "description": "Expected application/json",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Input does not match the schema",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Rate limit reached",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            },
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer"
                }
              }
            }
          }
        }
      }
    },
    "/api/agent/v1/actions/list_my_saved_vehicles": {
      "post": {
        "operationId": "list_my_saved_vehicles",
        "summary": "My saved cars",
        "description": "List the vehicle IDs saved by the token owner.",
        "x-backing-route": "GET /api/saved",
        "x-action-version": "1.0.0",
        "x-risk": "read_only",
        "x-required-scope": "saved:read",
        "security": [
          {
            "AgentToken": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "input"
                ],
                "additionalProperties": false,
                "properties": {
                  "input": {
                    "type": "object",
                    "properties": {},
                    "additionalProperties": false
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Action result",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "saved": {
                      "type": "array",
                      "items": {
                        "type": "string",
                        "pattern": "^[A-Za-z0-9_-]{1,32}$"
                      }
                    }
                  },
                  "required": [
                    "saved"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Malformed JSON",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid agent token",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            },
            "headers": {
              "WWW-Authenticate": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient scope, account role or disallowed origin",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Requested record unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "413": {
            "description": "Request exceeds 64 KiB",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "415": {
            "description": "Expected application/json",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Input does not match the schema",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Rate limit reached",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            },
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer"
                }
              }
            }
          }
        }
      }
    },
    "/api/agent/v1/actions/list_my_rentals": {
      "post": {
        "operationId": "list_my_rentals",
        "summary": "My rentals",
        "description": "Read the token owner’s rental agreements and upcoming shift reminders.",
        "x-backing-route": "GET /api/rentals/mine",
        "x-action-version": "1.0.0",
        "x-risk": "read_only",
        "x-required-scope": "rentals:read",
        "security": [
          {
            "AgentToken": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "input"
                ],
                "additionalProperties": false,
                "properties": {
                  "input": {
                    "type": "object",
                    "properties": {},
                    "additionalProperties": false
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Action result",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "rentals": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "integer"
                          },
                          "vehicle_id": {
                            "type": "string",
                            "pattern": "^[A-Za-z0-9_-]{1,32}$"
                          },
                          "brand": {
                            "type": "string"
                          },
                          "model": {
                            "type": "string"
                          },
                          "starts_on": {
                            "type": "string"
                          },
                          "ends_on": {
                            "type": [
                              "string",
                              "null"
                            ]
                          }
                        },
                        "required": [
                          "id",
                          "vehicle_id",
                          "brand",
                          "model",
                          "starts_on",
                          "ends_on"
                        ]
                      },
                      "maxItems": 100
                    },
                    "reminders": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "integer"
                          },
                          "due": {
                            "type": "string"
                          },
                          "brand": {
                            "type": "string"
                          },
                          "model": {
                            "type": "string"
                          },
                          "kind": {
                            "type": "string",
                            "enum": [
                              "start",
                              "handover"
                            ]
                          }
                        },
                        "required": [
                          "id",
                          "due",
                          "brand",
                          "model",
                          "kind"
                        ]
                      },
                      "maxItems": 200
                    }
                  },
                  "required": [
                    "rentals",
                    "reminders"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Malformed JSON",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid agent token",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            },
            "headers": {
              "WWW-Authenticate": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient scope, account role or disallowed origin",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Requested record unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "413": {
            "description": "Request exceeds 64 KiB",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "415": {
            "description": "Expected application/json",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Input does not match the schema",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Rate limit reached",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            },
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer"
                }
              }
            }
          }
        }
      }
    },
    "/api/agent/v1/actions/list_my_watches": {
      "post": {
        "operationId": "list_my_watches",
        "summary": "My car watches",
        "description": "Read the token owner’s saved searches (watches): criteria, state, last check and match count. 20 per page; pass next as after.",
        "x-backing-route": "GET /api/saved-searches",
        "x-action-version": "1.0.0",
        "x-risk": "read_only",
        "x-required-scope": "watches:read",
        "x-required-role": "driver",
        "security": [
          {
            "AgentToken": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "input"
                ],
                "additionalProperties": false,
                "properties": {
                  "input": {
                    "type": "object",
                    "properties": {
                      "after": {
                        "type": "string",
                        "pattern": "^\\d{1,15}$"
                      }
                    },
                    "additionalProperties": false
                  }
                }
              },
              "example": {
                "input": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Action result",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "searches": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "name": {
                            "type": "string"
                          },
                          "criteria": {
                            "type": "object"
                          },
                          "state": {
                            "type": "string"
                          },
                          "phase": {
                            "enum": [
                              "watching",
                              "initialising"
                            ]
                          },
                          "lastCheck": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "lastMatched": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "matchCount": {
                            "type": "integer"
                          },
                          "expiresAt": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "resumeAt": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "pausedReason": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "id",
                          "name",
                          "criteria",
                          "state",
                          "phase",
                          "lastCheck",
                          "lastMatched",
                          "matchCount"
                        ]
                      },
                      "maxItems": 20
                    },
                    "next": {
                      "type": [
                        "string",
                        "null"
                      ]
                    }
                  },
                  "required": [
                    "searches",
                    "next"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Malformed JSON",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid agent token",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            },
            "headers": {
              "WWW-Authenticate": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient scope, account role or disallowed origin",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Requested record unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "413": {
            "description": "Request exceeds 64 KiB",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "415": {
            "description": "Expected application/json",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Input does not match the schema",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Rate limit reached",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            },
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer"
                }
              }
            }
          }
        }
      }
    },
    "/api/agent/v1/actions/evaluate_operating_plan": {
      "post": {
        "operationId": "evaluate_operating_plan",
        "summary": "Evaluate an operating plan",
        "description": "Deterministic weekly and monthly net of a driver’s plan, before income tax and social security, with a conservative range. Nothing is saved.",
        "x-backing-route": "POST /api/economics/evaluate",
        "x-action-version": "1.0.0",
        "x-risk": "read_only",
        "x-required-scope": "economics:read",
        "x-required-role": "driver",
        "security": [
          {
            "AgentToken": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "input"
                ],
                "additionalProperties": false,
                "properties": {
                  "input": {
                    "type": "object",
                    "properties": {
                      "inputs": {
                        "type": "object",
                        "description": "Euros, hours and percent. Unknown values are null and are never read as zero.",
                        "properties": {
                          "grossPerHour": {
                            "type": [
                              "number",
                              "null"
                            ]
                          },
                          "hoursPerWeek": {
                            "type": [
                              "number",
                              "null"
                            ]
                          },
                          "rentWeekly": {
                            "type": [
                              "number",
                              "null"
                            ]
                          },
                          "utilisationPct": {
                            "type": "number",
                            "minimum": 1,
                            "maximum": 100
                          },
                          "commissionPct": {
                            "type": [
                              "number",
                              "null"
                            ]
                          },
                          "energy": {
                            "type": [
                              "object",
                              "null"
                            ],
                            "properties": {
                              "mode": {
                                "enum": [
                                  "hour",
                                  "km"
                                ]
                              },
                              "perHour": {
                                "type": [
                                  "number",
                                  "null"
                                ]
                              },
                              "kmPerWeek": {
                                "type": [
                                  "number",
                                  "null"
                                ]
                              },
                              "costPerKm": {
                                "type": [
                                  "number",
                                  "null"
                                ]
                              }
                            },
                            "required": [
                              "mode"
                            ]
                          },
                          "costs": {
                            "type": "array",
                            "maxItems": 12,
                            "items": {
                              "type": "object",
                              "properties": {
                                "key": {
                                  "enum": [
                                    "insurance",
                                    "maintenance",
                                    "cleaning",
                                    "tolls",
                                    "parking",
                                    "phone",
                                    "fines",
                                    "other"
                                  ]
                                },
                                "weekly": {
                                  "type": [
                                    "number",
                                    "null"
                                  ]
                                }
                              },
                              "required": [
                                "key",
                                "weekly"
                              ]
                            }
                          },
                          "deposit": {
                            "type": [
                              "number",
                              "null"
                            ]
                          },
                          "variationPct": {
                            "type": "number",
                            "minimum": 0,
                            "maximum": 50
                          }
                        }
                      }
                    },
                    "required": [
                      "inputs"
                    ],
                    "additionalProperties": false
                  }
                }
              },
              "example": {
                "input": {
                  "inputs": {
                    "rentWeekly": 285,
                    "hoursPerWeek": 45,
                    "grossPerHour": 16.8,
                    "utilisationPct": 86,
                    "energy": {
                      "mode": "hour",
                      "perHour": 1.35
                    },
                    "commissionPct": 25,
                    "costs": [
                      {
                        "key": "insurance",
                        "weekly": 12.5
                      },
                      {
                        "key": "phone",
                        "weekly": null
                      }
                    ],
                    "deposit": 500,
                    "variationPct": 10
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Action result",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "inputs": {
                      "type": "object"
                    },
                    "result": {
                      "type": "object",
                      "description": "Integer cents (hours in hundredths). complete; partial = unknown items excluded from totals and listed; incomplete = a required input is missing, no totals.",
                      "properties": {
                        "status": {
                          "enum": [
                            "complete",
                            "partial",
                            "incomplete"
                          ]
                        },
                        "missing": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        },
                        "unknown": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        },
                        "weekly": {
                          "type": [
                            "object",
                            "null"
                          ],
                          "properties": {
                            "gross": {
                              "type": "integer"
                            },
                            "rent": {
                              "type": "integer"
                            },
                            "energy": {
                              "type": "integer"
                            },
                            "commission": {
                              "type": "integer"
                            },
                            "costs": {
                              "type": "integer"
                            },
                            "net": {
                              "type": "integer"
                            }
                          }
                        },
                        "monthly": {
                          "type": [
                            "object",
                            "null"
                          ],
                          "properties": {
                            "gross": {
                              "type": "integer"
                            },
                            "rent": {
                              "type": "integer"
                            },
                            "energy": {
                              "type": "integer"
                            },
                            "commission": {
                              "type": "integer"
                            },
                            "costs": {
                              "type": "integer"
                            },
                            "net": {
                              "type": "integer"
                            }
                          }
                        },
                        "range": {
                          "type": [
                            "object",
                            "null"
                          ],
                          "properties": {
                            "low": {
                              "type": "integer"
                            },
                            "high": {
                              "type": "integer"
                            }
                          }
                        },
                        "breakEvenHours": {
                          "type": [
                            "integer",
                            "null"
                          ]
                        },
                        "netPerHour": {
                          "type": [
                            "integer",
                            "null"
                          ]
                        },
                        "deposit": {
                          "type": [
                            "integer",
                            "null"
                          ]
                        }
                      },
                      "required": [
                        "status",
                        "missing",
                        "unknown",
                        "weekly",
                        "monthly",
                        "range"
                      ]
                    }
                  },
                  "required": [
                    "inputs",
                    "result"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Malformed JSON",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid agent token",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            },
            "headers": {
              "WWW-Authenticate": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient scope, account role or disallowed origin",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Requested record unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "413": {
            "description": "Request exceeds 64 KiB",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "415": {
            "description": "Expected application/json",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Input does not match the schema",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Rate limit reached",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            },
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer"
                }
              }
            }
          }
        }
      }
    },
    "/api/agent/v1/actions/list_my_operating_scenarios": {
      "post": {
        "operationId": "list_my_operating_scenarios",
        "summary": "My operating scenarios",
        "description": "Read the token owner’s saved operating plan scenarios (up to 10), each with a server-evaluated result.",
        "x-backing-route": "GET /api/economics/scenarios",
        "x-action-version": "1.0.0",
        "x-risk": "read_only",
        "x-required-scope": "economics:read",
        "x-required-role": "driver",
        "security": [
          {
            "AgentToken": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "input"
                ],
                "additionalProperties": false,
                "properties": {
                  "input": {
                    "type": "object",
                    "properties": {},
                    "additionalProperties": false
                  }
                }
              },
              "example": {
                "input": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Action result",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "scenarios": {
                      "type": "array",
                      "maxItems": 10,
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "name": {
                            "type": "string"
                          },
                          "inputs": {
                            "type": "object"
                          },
                          "result": {
                            "type": "object",
                            "description": "Integer cents (hours in hundredths). complete; partial = unknown items excluded from totals and listed; incomplete = a required input is missing, no totals.",
                            "properties": {
                              "status": {
                                "enum": [
                                  "complete",
                                  "partial",
                                  "incomplete"
                                ]
                              },
                              "missing": {
                                "type": "array",
                                "items": {
                                  "type": "string"
                                }
                              },
                              "unknown": {
                                "type": "array",
                                "items": {
                                  "type": "string"
                                }
                              },
                              "weekly": {
                                "type": [
                                  "object",
                                  "null"
                                ],
                                "properties": {
                                  "gross": {
                                    "type": "integer"
                                  },
                                  "rent": {
                                    "type": "integer"
                                  },
                                  "energy": {
                                    "type": "integer"
                                  },
                                  "commission": {
                                    "type": "integer"
                                  },
                                  "costs": {
                                    "type": "integer"
                                  },
                                  "net": {
                                    "type": "integer"
                                  }
                                }
                              },
                              "monthly": {
                                "type": [
                                  "object",
                                  "null"
                                ],
                                "properties": {
                                  "gross": {
                                    "type": "integer"
                                  },
                                  "rent": {
                                    "type": "integer"
                                  },
                                  "energy": {
                                    "type": "integer"
                                  },
                                  "commission": {
                                    "type": "integer"
                                  },
                                  "costs": {
                                    "type": "integer"
                                  },
                                  "net": {
                                    "type": "integer"
                                  }
                                }
                              },
                              "range": {
                                "type": [
                                  "object",
                                  "null"
                                ],
                                "properties": {
                                  "low": {
                                    "type": "integer"
                                  },
                                  "high": {
                                    "type": "integer"
                                  }
                                }
                              },
                              "breakEvenHours": {
                                "type": [
                                  "integer",
                                  "null"
                                ]
                              },
                              "netPerHour": {
                                "type": [
                                  "integer",
                                  "null"
                                ]
                              },
                              "deposit": {
                                "type": [
                                  "integer",
                                  "null"
                                ]
                              }
                            },
                            "required": [
                              "status",
                              "missing",
                              "unknown",
                              "weekly",
                              "monthly",
                              "range"
                            ]
                          },
                          "createdAt": {
                            "type": "string"
                          },
                          "updatedAt": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "id",
                          "name",
                          "inputs",
                          "result"
                        ]
                      }
                    },
                    "limit": {
                      "type": "integer"
                    }
                  },
                  "required": [
                    "scenarios",
                    "limit"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Malformed JSON",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid agent token",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            },
            "headers": {
              "WWW-Authenticate": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient scope, account role or disallowed origin",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Requested record unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "413": {
            "description": "Request exceeds 64 KiB",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "415": {
            "description": "Expected application/json",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Input does not match the schema",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Rate limit reached",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            },
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer"
                }
              }
            }
          }
        }
      }
    },
    "/api/agent/v1/actions/draft_listing": {
      "post": {
        "operationId": "draft_listing",
        "summary": "Draft a vehicle listing",
        "description": "Preview a vehicle listing from English, Portuguese or Spanish text. The token owner must be a fleet. Call the vehicle creation API separately to publish.",
        "x-backing-route": "POST /api/vehicles/draft",
        "x-action-version": "1.0.0",
        "x-risk": "read_only",
        "x-required-scope": "fleet:listings:draft",
        "x-required-role": "fleet",
        "security": [
          {
            "AgentToken": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "input"
                ],
                "additionalProperties": false,
                "properties": {
                  "input": {
                    "type": "object",
                    "properties": {
                      "text": {
                        "type": "string",
                        "maxLength": 2000
                      },
                      "plate": {
                        "type": "string",
                        "maxLength": 16
                      },
                      "base": {
                        "type": "object"
                      }
                    },
                    "required": [],
                    "additionalProperties": false
                  }
                }
              },
              "example": {
                "input": {
                  "text": "Toyota Corolla Hybrid 2023 automático, Lisboa, 190€/semana, caução 300, seguro incluído, Uber e Bolt"
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Action result",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "draft": {
                      "type": "object"
                    },
                    "fields": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "key": {
                            "type": "string"
                          },
                          "value": {},
                          "source": {
                            "enum": [
                              "text",
                              "catalog",
                              "market",
                              "default"
                            ]
                          },
                          "confidence": {
                            "enum": [
                              "high",
                              "medium",
                              "low"
                            ]
                          },
                          "match": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "key",
                          "value",
                          "source",
                          "confidence"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "missing": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "key": {
                            "type": "string"
                          },
                          "reason": {
                            "type": "string"
                          },
                          "required": {
                            "type": "boolean"
                          }
                        },
                        "required": [
                          "key",
                          "reason",
                          "required"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "warnings": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "key": {
                            "type": "string"
                          },
                          "code": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "key",
                          "code"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "priceSuggestion": {
                      "anyOf": [
                        {
                          "type": "object",
                          "properties": {
                            "weekly": {
                              "type": "number"
                            },
                            "low": {
                              "type": "number"
                            },
                            "high": {
                              "type": "number"
                            },
                            "basis": {
                              "type": "string"
                            },
                            "asOf": {
                              "type": [
                                "string",
                                "null"
                              ],
                              "format": "date"
                            }
                          },
                          "required": [
                            "weekly",
                            "low",
                            "high",
                            "basis",
                            "asOf"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "description": {
                      "anyOf": [
                        {
                          "type": "object",
                          "properties": {
                            "pt": {
                              "type": "string"
                            },
                            "en": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "pt",
                            "en"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "readyToPublish": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "draft",
                    "fields",
                    "missing",
                    "warnings",
                    "priceSuggestion",
                    "description",
                    "readyToPublish"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Malformed JSON",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid agent token",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            },
            "headers": {
              "WWW-Authenticate": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient scope, account role or disallowed origin",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Requested record unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "413": {
            "description": "Request exceeds 64 KiB",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "415": {
            "description": "Expected application/json",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Input does not match the schema",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Rate limit reached",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            },
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer"
                }
              }
            }
          }
        }
      }
    },
    "/api/agent/v1/actions/list_automations": {
      "post": {
        "operationId": "list_automations",
        "summary": "List my automations",
        "description": "Read automations and saved-search watches for your account.",
        "x-backing-route": "GET /api/automations",
        "x-action-version": "1.2.0",
        "x-risk": "read_only",
        "x-required-scope": "automations:read",
        "x-allowed-roles": [
          "driver",
          "fleet"
        ],
        "security": [
          {
            "AgentToken": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "input"
                ],
                "additionalProperties": false,
                "properties": {
                  "input": {
                    "type": "object",
                    "additionalProperties": false,
                    "properties": {},
                    "required": []
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Action result",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "automations": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "additionalProperties": false,
                        "properties": {
                          "id": {
                            "type": "string",
                            "pattern": "^(ss-)?[1-9][0-9]{0,18}$"
                          },
                          "template": {
                            "type": "string"
                          },
                          "audience": {
                            "enum": [
                              "driver",
                              "fleet"
                            ]
                          },
                          "status": {
                            "enum": [
                              "active",
                              "paused"
                            ]
                          },
                          "params": {
                            "type": "object"
                          },
                          "purpose": {
                            "type": "string"
                          },
                          "allowedActions": {
                            "type": "array",
                            "items": {
                              "enum": [
                                "search",
                                "notify_in_app",
                                "prepare_draft"
                              ]
                            }
                          },
                          "createdAt": {
                            "type": "string",
                            "format": "date-time"
                          },
                          "lastRunAt": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "date-time"
                          },
                          "nextRunAt": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "date-time"
                          },
                          "lastResult": {
                            "anyOf": [
                              {
                                "type": "null"
                              },
                              {
                                "type": "object",
                                "additionalProperties": false,
                                "properties": {
                                  "summary": {
                                    "type": "string"
                                  },
                                  "count": {
                                    "type": "integer",
                                    "minimum": 0
                                  }
                                },
                                "required": [
                                  "summary",
                                  "count"
                                ]
                              }
                            ]
                          },
                          "source": {
                            "enum": [
                              "automation",
                              "saved_search"
                            ]
                          }
                        },
                        "required": [
                          "id",
                          "template",
                          "audience",
                          "status",
                          "params",
                          "purpose",
                          "allowedActions",
                          "createdAt",
                          "lastRunAt",
                          "nextRunAt",
                          "lastResult",
                          "source"
                        ]
                      }
                    }
                  },
                  "required": [
                    "automations"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Malformed JSON",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid agent token",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            },
            "headers": {
              "WWW-Authenticate": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient scope, account role or disallowed origin",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Requested record unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "413": {
            "description": "Request exceeds 64 KiB",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "415": {
            "description": "Expected application/json",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Input does not match the schema",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Rate limit reached",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            },
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer"
                }
              }
            }
          }
        }
      }
    },
    "/api/agent/v1/actions/create_automation": {
      "post": {
        "operationId": "create_automation",
        "summary": "Create an automation",
        "description": "Create an automation for your account using a template for your role.",
        "x-backing-route": "POST /api/automations",
        "x-action-version": "1.2.0",
        "x-risk": "account_write",
        "x-required-scope": "automations:write",
        "x-allowed-roles": [
          "driver",
          "fleet"
        ],
        "security": [
          {
            "AgentToken": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "input"
                ],
                "additionalProperties": false,
                "properties": {
                  "input": {
                    "type": "object",
                    "additionalProperties": false,
                    "properties": {
                      "template": {
                        "type": "string"
                      },
                      "params": {
                        "type": "object"
                      }
                    },
                    "required": [
                      "template"
                    ]
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Action result",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "automation": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "id": {
                          "type": "string",
                          "pattern": "^(ss-)?[1-9][0-9]{0,18}$"
                        },
                        "template": {
                          "type": "string"
                        },
                        "audience": {
                          "enum": [
                            "driver",
                            "fleet"
                          ]
                        },
                        "status": {
                          "enum": [
                            "active",
                            "paused"
                          ]
                        },
                        "params": {
                          "type": "object"
                        },
                        "purpose": {
                          "type": "string"
                        },
                        "allowedActions": {
                          "type": "array",
                          "items": {
                            "enum": [
                              "search",
                              "notify_in_app",
                              "prepare_draft"
                            ]
                          }
                        },
                        "createdAt": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "lastRunAt": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "date-time"
                        },
                        "nextRunAt": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "date-time"
                        },
                        "lastResult": {
                          "anyOf": [
                            {
                              "type": "null"
                            },
                            {
                              "type": "object",
                              "additionalProperties": false,
                              "properties": {
                                "summary": {
                                  "type": "string"
                                },
                                "count": {
                                  "type": "integer",
                                  "minimum": 0
                                }
                              },
                              "required": [
                                "summary",
                                "count"
                              ]
                            }
                          ]
                        },
                        "source": {
                          "enum": [
                            "automation",
                            "saved_search"
                          ]
                        }
                      },
                      "required": [
                        "id",
                        "template",
                        "audience",
                        "status",
                        "params",
                        "purpose",
                        "allowedActions",
                        "createdAt",
                        "lastRunAt",
                        "nextRunAt",
                        "lastResult",
                        "source"
                      ]
                    }
                  },
                  "required": [
                    "automation"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Malformed JSON",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid agent token",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            },
            "headers": {
              "WWW-Authenticate": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient scope, account role or disallowed origin",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Requested record unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "Automation already active or write conflict",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "413": {
            "description": "Request exceeds 64 KiB",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "415": {
            "description": "Expected application/json",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Input does not match the schema",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Rate limit reached",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            },
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer"
                }
              }
            }
          }
        }
      }
    },
    "/api/agent/v1/actions/pause_automation": {
      "post": {
        "operationId": "pause_automation",
        "summary": "Pause an automation",
        "description": "Pause an automation or saved-search watch owned by your account.",
        "x-backing-route": "PATCH /api/automations/{id}",
        "x-action-version": "1.2.0",
        "x-risk": "account_write",
        "x-required-scope": "automations:write",
        "x-allowed-roles": [
          "driver",
          "fleet"
        ],
        "security": [
          {
            "AgentToken": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "input"
                ],
                "additionalProperties": false,
                "properties": {
                  "input": {
                    "type": "object",
                    "additionalProperties": false,
                    "properties": {
                      "id": {
                        "type": "string",
                        "pattern": "^(ss-)?[1-9][0-9]{0,18}$"
                      }
                    },
                    "required": [
                      "id"
                    ]
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Action result",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "automation": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "id": {
                          "type": "string",
                          "pattern": "^(ss-)?[1-9][0-9]{0,18}$"
                        },
                        "template": {
                          "type": "string"
                        },
                        "audience": {
                          "enum": [
                            "driver",
                            "fleet"
                          ]
                        },
                        "status": {
                          "enum": [
                            "active",
                            "paused"
                          ]
                        },
                        "params": {
                          "type": "object"
                        },
                        "purpose": {
                          "type": "string"
                        },
                        "allowedActions": {
                          "type": "array",
                          "items": {
                            "enum": [
                              "search",
                              "notify_in_app",
                              "prepare_draft"
                            ]
                          }
                        },
                        "createdAt": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "lastRunAt": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "date-time"
                        },
                        "nextRunAt": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "date-time"
                        },
                        "lastResult": {
                          "anyOf": [
                            {
                              "type": "null"
                            },
                            {
                              "type": "object",
                              "additionalProperties": false,
                              "properties": {
                                "summary": {
                                  "type": "string"
                                },
                                "count": {
                                  "type": "integer",
                                  "minimum": 0
                                }
                              },
                              "required": [
                                "summary",
                                "count"
                              ]
                            }
                          ]
                        },
                        "source": {
                          "enum": [
                            "automation",
                            "saved_search"
                          ]
                        }
                      },
                      "required": [
                        "id",
                        "template",
                        "audience",
                        "status",
                        "params",
                        "purpose",
                        "allowedActions",
                        "createdAt",
                        "lastRunAt",
                        "nextRunAt",
                        "lastResult",
                        "source"
                      ]
                    }
                  },
                  "required": [
                    "automation"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Malformed JSON",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid agent token",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            },
            "headers": {
              "WWW-Authenticate": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient scope, account role or disallowed origin",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Requested record unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "Automation already active or write conflict",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "413": {
            "description": "Request exceeds 64 KiB",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "415": {
            "description": "Expected application/json",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Input does not match the schema",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Rate limit reached",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            },
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer"
                }
              }
            }
          }
        }
      }
    },
    "/api/agent/v1/actions/list_fleet_exceptions": {
      "post": {
        "operationId": "list_fleet_exceptions",
        "summary": "Fleet exceptions",
        "description": "Read a fleet’s open exceptions (free windows, returns and renewals due, blocking or due maintenance, expiring or expired documents, pending applications), most urgent first, each with exactly one suggested action. Nothing is changed.",
        "x-backing-route": "GET /api/fm1/fleets/{fleet}/operations/exceptions",
        "x-action-version": "1.0.0",
        "x-risk": "read_only",
        "x-required-scope": "fleet:operations:read",
        "security": [
          {
            "AgentToken": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "input"
                ],
                "additionalProperties": false,
                "properties": {
                  "input": {
                    "type": "object",
                    "properties": {
                      "fleet": {
                        "type": "string",
                        "pattern": "^\\d{1,10}$",
                        "description": "Fleet account id. Defaults to the token owner; a manager passes the fleet they manage."
                      }
                    },
                    "additionalProperties": false
                  }
                }
              },
              "example": {
                "input": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Action result",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "generatedAt": {
                      "type": "string"
                    },
                    "today": {
                      "type": "string"
                    },
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "kind": {
                            "enum": [
                              "free_window",
                              "return_due",
                              "renewal_due",
                              "maintenance_blocking",
                              "maintenance_due",
                              "document_expiring",
                              "document_expired",
                              "application_pending"
                            ]
                          },
                          "severity": {
                            "enum": [
                              "critical",
                              "high",
                              "medium",
                              "low"
                            ]
                          },
                          "dueOn": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "vehicle": {
                            "type": "object"
                          },
                          "action": {
                            "type": "object",
                            "properties": {
                              "type": {
                                "enum": [
                                  "link",
                                  "preview",
                                  "transition"
                                ]
                              },
                              "labelKey": {
                                "type": "string"
                              },
                              "endpoint": {
                                "type": "object",
                                "properties": {
                                  "method": {
                                    "type": "string"
                                  },
                                  "path": {
                                    "type": "string"
                                  },
                                  "body": {
                                    "type": "object"
                                  }
                                }
                              },
                              "href": {
                                "type": "string"
                              }
                            }
                          }
                        }
                      }
                    },
                    "counts": {
                      "type": "object"
                    }
                  },
                  "required": [
                    "items",
                    "counts"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Malformed JSON",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid agent token",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            },
            "headers": {
              "WWW-Authenticate": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient scope, account role or disallowed origin",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Requested record unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "413": {
            "description": "Request exceeds 64 KiB",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "415": {
            "description": "Expected application/json",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Input does not match the schema",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Rate limit reached",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            },
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer"
                }
              }
            }
          }
        }
      }
    },
    "/api/agent/v1/actions/get_fleet_utilization": {
      "post": {
        "operationId": "get_fleet_utilization",
        "summary": "Fleet utilization",
        "description": "Booked days per car over a date range (default 28 days, at most 92) with the denominator, data age, demand only when at least 3 matching searches exist, limits, and preview-only relisting suggestions. It never publishes, changes a price or sends a message.",
        "x-backing-route": "GET /api/fm1/fleets/{fleet}/operations/utilization",
        "x-action-version": "1.0.0",
        "x-risk": "read_only",
        "x-required-scope": "fleet:operations:read",
        "security": [
          {
            "AgentToken": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "input"
                ],
                "additionalProperties": false,
                "properties": {
                  "input": {
                    "type": "object",
                    "properties": {
                      "fleet": {
                        "type": "string",
                        "pattern": "^\\d{1,10}$",
                        "description": "Fleet account id. Defaults to the token owner; a manager passes the fleet they manage."
                      },
                      "from": {
                        "type": "string",
                        "format": "date",
                        "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                      },
                      "to": {
                        "type": "string",
                        "format": "date",
                        "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                      }
                    },
                    "additionalProperties": false
                  }
                }
              },
              "example": {
                "input": {
                  "from": "2026-12-01",
                  "to": "2026-12-28"
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Action result",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "from": {
                      "type": "string"
                    },
                    "to": {
                      "type": "string"
                    },
                    "dataAsOf": {
                      "type": "string"
                    },
                    "denominator": {
                      "type": "object"
                    },
                    "limits": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "vehicles": {
                      "type": "array"
                    },
                    "totals": {
                      "type": "object"
                    },
                    "demand": {},
                    "suggestions": {
                      "type": "array"
                    }
                  },
                  "required": [
                    "from",
                    "to",
                    "denominator",
                    "vehicles",
                    "totals"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Malformed JSON",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid agent token",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            },
            "headers": {
              "WWW-Authenticate": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient scope, account role or disallowed origin",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Requested record unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "413": {
            "description": "Request exceeds 64 KiB",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "415": {
            "description": "Expected application/json",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Input does not match the schema",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Rate limit reached",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            },
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer"
                }
              }
            }
          }
        }
      }
    },
    "/api/agent/v1/actions/preview_listing_batch": {
      "post": {
        "operationId": "preview_listing_batch",
        "summary": "Preview a listing change",
        "description": "Dry run of setting the listing status of up to 100 fleet cars: which cars would change, which are skipped and why, and the effects. Nothing is applied; a person applies or undoes it in Fleet › Operations.",
        "x-backing-route": "POST /api/fm1/fleets/{fleet}/operations/batches (dryRun)",
        "x-action-version": "1.0.0",
        "x-risk": "read_only",
        "x-required-scope": "fleet:operations:read",
        "security": [
          {
            "AgentToken": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "input"
                ],
                "additionalProperties": false,
                "properties": {
                  "input": {
                    "type": "object",
                    "properties": {
                      "fleet": {
                        "type": "string",
                        "pattern": "^\\d{1,10}$",
                        "description": "Fleet account id. Defaults to the token owner; a manager passes the fleet they manage."
                      },
                      "vehicleIds": {
                        "type": "array",
                        "minItems": 1,
                        "maxItems": 100,
                        "items": {
                          "type": "string",
                          "pattern": "^[A-Za-z0-9_-]{1,32}$"
                        }
                      },
                      "value": {
                        "enum": [
                          "available",
                          "rented",
                          "listed"
                        ]
                      }
                    },
                    "required": [
                      "vehicleIds",
                      "value"
                    ],
                    "additionalProperties": false
                  }
                }
              },
              "example": {
                "input": {
                  "vehicleIds": [
                    "v123"
                  ],
                  "value": "available"
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Action result",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "op": {
                      "const": "set_listing_status"
                    },
                    "value": {
                      "type": "string"
                    },
                    "changes": {
                      "type": "array"
                    },
                    "skipped": {
                      "type": "array"
                    },
                    "effects": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  },
                  "required": [
                    "changes",
                    "skipped",
                    "effects"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Malformed JSON",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid agent token",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            },
            "headers": {
              "WWW-Authenticate": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient scope, account role or disallowed origin",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Requested record unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "413": {
            "description": "Request exceeds 64 KiB",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "415": {
            "description": "Expected application/json",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Input does not match the schema",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Rate limit reached",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            },
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer"
                }
              }
            }
          }
        }
      }
    },
    "/api/vehicles/interpret": {
      "get": {
        "operationId": "interpret_vehicle_request",
        "summary": "Interpret a vehicle request",
        "description": "Extract weekly Browse filters from English, Portuguese or Spanish text. Unapplied requests are reported in unsupported.",
        "parameters": [
          {
            "name": "text",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 300
            }
          },
          {
            "name": "lang",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Optional UI locale. All supported languages are recognized."
          }
        ],
        "responses": {
          "200": {
            "description": "Vehicle request interpretation",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "required": [
                    "text",
                    "criteria",
                    "understood",
                    "unsupported",
                    "query"
                  ],
                  "properties": {
                    "text": {
                      "type": "string"
                    },
                    "criteria": {
                      "type": "object",
                      "properties": {
                        "q": {
                          "type": "string"
                        },
                        "country": {
                          "type": "string"
                        },
                        "city": {
                          "type": "string"
                        },
                        "fuels": {
                          "type": "array",
                          "items": {
                            "type": "string",
                            "enum": [
                              "Electric",
                              "Hybrid",
                              "Petrol",
                              "Diesel"
                            ]
                          }
                        },
                        "categories": {
                          "type": "array",
                          "items": {
                            "type": "string",
                            "enum": [
                              "Eco",
                              "Standard",
                              "Premium"
                            ]
                          }
                        },
                        "platforms": {
                          "type": "array",
                          "items": {
                            "type": "string",
                            "enum": [
                              "Uber",
                              "Bolt"
                            ]
                          }
                        },
                        "priceMax": {
                          "type": [
                            "number",
                            "null"
                          ],
                          "minimum": 0,
                          "maximum": 5000
                        },
                        "deposit": {
                          "type": "string",
                          "enum": [
                            "any",
                            "none",
                            "required"
                          ]
                        },
                        "cover": {
                          "type": "string",
                          "enum": [
                            "any",
                            "included",
                            "excluded"
                          ]
                        },
                        "sort": {
                          "type": "string",
                          "enum": [
                            "fit",
                            "net",
                            "price",
                            "newest"
                          ]
                        },
                        "transmission": {
                          "type": "string",
                          "enum": [
                            "any",
                            "automatic",
                            "manual"
                          ],
                          "default": "any"
                        },
                        "from": {
                          "type": "string",
                          "description": "Rental start day YYYY-MM-DD in Europe/Lisbon; empty when no date was asked for.",
                          "pattern": "^(\\d{4}-\\d{2}-\\d{2})?$"
                        },
                        "weeks": {
                          "type": [
                            "integer",
                            "null"
                          ],
                          "minimum": 1,
                          "maximum": 52,
                          "description": "Rental length in weeks; null when not stated (Browse then checks one week)."
                        }
                      },
                      "required": [
                        "q",
                        "country",
                        "city",
                        "fuels",
                        "categories",
                        "platforms",
                        "priceMax",
                        "deposit",
                        "cover",
                        "sort",
                        "transmission",
                        "from",
                        "weeks"
                      ],
                      "additionalProperties": false
                    },
                    "understood": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "kind": {
                            "type": "string",
                            "enum": [
                              "city",
                              "country",
                              "fuel",
                              "platform",
                              "category",
                              "priceMax",
                              "deposit",
                              "cover",
                              "sort",
                              "q",
                              "transmission",
                              "from",
                              "weeks"
                            ]
                          },
                          "value": {
                            "type": [
                              "string",
                              "number"
                            ]
                          },
                          "match": {
                            "type": "string"
                          },
                          "note": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "kind",
                          "value",
                          "match"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "unsupported": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "kind": {
                            "type": "string",
                            "enum": [
                              "dates",
                              "seats",
                              "other"
                            ]
                          },
                          "match": {
                            "type": "string"
                          },
                          "reason": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "kind",
                          "match",
                          "reason"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "query": {
                      "type": "string",
                      "description": "Browse parameters for GET /api/vehicles. Add limit to use the paged search."
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Missing or invalid request text",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Rate limit reached",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/vehicles": {
      "get": {
        "operationId": "list_vehicles",
        "summary": "List available vehicles",
        "parameters": [
          {
            "name": "gear",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "automatic",
                "manual"
              ],
              "description": "Match only the specified transmission."
            },
            "description": "Filter by transmission. Listings with unknown transmission are excluded."
          },
          {
            "name": "city",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Filter listings by city. This filter does not narrow facets.cityTotals."
          },
          {
            "name": "from",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date"
            },
            "description": "Rental start day (YYYY-MM-DD, Europe/Lisbon, today to one year ahead). Excludes listings with an overlapping rental agreement, booked slot or scheduled maintenance."
          },
          {
            "name": "weeks",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 52,
              "default": 1
            },
            "description": "Rental length in weeks for the availability window. Without from, the window starts today."
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 60
            },
            "description": "Enable paged Browse search."
          }
        ],
        "responses": {
          "200": {
            "description": "Available listings",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "vehicles": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "pattern": "^[A-Za-z0-9_-]{1,32}$"
                          },
                          "brand": {
                            "type": "string"
                          },
                          "model": {
                            "type": "string"
                          },
                          "city": {
                            "type": "string"
                          },
                          "country": {
                            "type": "string"
                          },
                          "currency": {
                            "type": "string"
                          },
                          "modality": {
                            "type": "string"
                          },
                          "pricePerWeek": {
                            "type": "number"
                          },
                          "deposit": {
                            "type": "number"
                          },
                          "slotPriceDay": {
                            "type": [
                              "number",
                              "null"
                            ]
                          },
                          "slotPriceNight": {
                            "type": [
                              "number",
                              "null"
                            ]
                          },
                          "imageUrl": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "rentalTerms": {
                            "type": [
                              "object",
                              "null"
                            ]
                          },
                          "isDemo": {
                            "type": "boolean"
                          },
                          "updatedAt": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "transmission": {
                            "enum": [
                              "automatic",
                              "manual",
                              null
                            ],
                            "description": "Null when the listing has no transmission set."
                          }
                        },
                        "required": [
                          "id",
                          "brand",
                          "model",
                          "city",
                          "country",
                          "currency",
                          "modality",
                          "pricePerWeek",
                          "deposit",
                          "slotPriceDay",
                          "slotPriceNight",
                          "imageUrl",
                          "rentalTerms",
                          "isDemo",
                          "updatedAt",
                          "transmission"
                        ]
                      },
                      "maxItems": 500
                    },
                    "availability": {
                      "description": "Returned with paged Browse search: the rental window checked, or null without from/weeks.",
                      "oneOf": [
                        {
                          "type": "null"
                        },
                        {
                          "type": "object",
                          "properties": {
                            "from": {
                              "type": "string",
                              "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                            },
                            "until": {
                              "type": "string",
                              "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                            },
                            "weeks": {
                              "type": "integer",
                              "minimum": 1,
                              "maximum": 52
                            },
                            "timezone": {
                              "const": "Europe/Lisbon"
                            },
                            "checked": {
                              "type": "array",
                              "items": {
                                "type": "string",
                                "enum": [
                                  "rental_agreements",
                                  "booked_slots",
                                  "scheduled_maintenance",
                                  "unavailable_dates"
                                ]
                              }
                            },
                            "notChecked": {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            }
                          },
                          "required": [
                            "from",
                            "until",
                            "weeks",
                            "timezone",
                            "checked",
                            "notChecked"
                          ],
                          "additionalProperties": false
                        }
                      ]
                    },
                    "facets": {
                      "type": "object",
                      "description": "Returned with paged Browse search (limit).",
                      "required": [
                        "countries",
                        "cities",
                        "cityTotals"
                      ],
                      "properties": {
                        "countries": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        },
                        "cities": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        },
                        "cityTotals": {
                          "type": "array",
                          "description": "Counts across all matching pages with the city filter removed. Other filters and demo eligibility still apply.",
                          "items": {
                            "type": "object",
                            "required": [
                              "city",
                              "country",
                              "count",
                              "minWeekly",
                              "currency"
                            ],
                            "properties": {
                              "city": {
                                "type": "string",
                                "description": "Canonical city name."
                              },
                              "country": {
                                "type": "string",
                                "description": "Canonical country name."
                              },
                              "count": {
                                "type": "integer",
                                "minimum": 1
                              },
                              "minWeekly": {
                                "type": [
                                  "number",
                                  "null"
                                ],
                                "exclusiveMinimum": 0,
                                "description": "Lowest positive fixed weekly price. Null if no such price exists or fixed prices use different currencies."
                              },
                              "currency": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "pattern": "^[A-Z]{3}$",
                                "description": "Currency of minWeekly, or null when minWeekly is null."
                              }
                            }
                          }
                        }
                      }
                    }
                  },
                  "required": [
                    "vehicles"
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Invalid filters",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      },
      "post": {
        "operationId": "create_vehicle",
        "summary": "Create a fleet listing",
        "description": "Authenticate as a fleet. Supply the listing fields and an optional transmission.",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "transmission": {
                    "enum": [
                      "automatic",
                      "manual",
                      null
                    ],
                    "description": "Null when the listing has no transmission set."
                  }
                }
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Listing created"
          },
          "422": {
            "description": "Invalid listing fields",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/vehicles/{id}": {
      "get": {
        "operationId": "get_vehicle_detail",
        "summary": "Get listing details and a profitability estimate",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[A-Za-z0-9_-]{1,32}$"
            }
          },
          {
            "name": "hours",
            "in": "query",
            "schema": {
              "type": "number",
              "minimum": 1,
              "maximum": 84
            },
            "description": "Working hours per week. Defaults to 40."
          },
          {
            "name": "commission",
            "in": "query",
            "schema": {
              "type": "number",
              "minimum": 0,
              "maximum": 40
            },
            "description": "Percentage of gross earnings. Replaces the listing's fixed monthly commission for this scenario."
          }
        ],
        "responses": {
          "200": {
            "description": "Listing and estimate. Scenario parameters leave the listing estMonthly at its default.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "vehicle": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "pattern": "^[A-Za-z0-9_-]{1,32}$"
                        },
                        "brand": {
                          "type": "string"
                        },
                        "model": {
                          "type": "string"
                        },
                        "city": {
                          "type": "string"
                        },
                        "country": {
                          "type": "string"
                        },
                        "currency": {
                          "type": "string"
                        },
                        "modality": {
                          "type": "string"
                        },
                        "pricePerWeek": {
                          "type": "number"
                        },
                        "deposit": {
                          "type": "number"
                        },
                        "slotPriceDay": {
                          "type": [
                            "number",
                            "null"
                          ]
                        },
                        "slotPriceNight": {
                          "type": [
                            "number",
                            "null"
                          ]
                        },
                        "imageUrl": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "rentalTerms": {
                          "type": [
                            "object",
                            "null"
                          ]
                        },
                        "isDemo": {
                          "type": "boolean"
                        },
                        "updatedAt": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "transmission": {
                          "enum": [
                            "automatic",
                            "manual",
                            null
                          ],
                          "description": "Null when the listing has no transmission set."
                        },
                        "estimate": {
                          "description": "Before-tax projection for a fixed weekly EUR rental. The range varies gross earnings by ±10%, including its effect on scenario commission. Actual earnings vary. Null when no estimate is available.",
                          "type": [
                            "object",
                            "null"
                          ],
                          "properties": {
                            "kind": {
                              "const": "estimate"
                            },
                            "currency": {
                              "const": "EUR"
                            },
                            "hoursPerWeek": {
                              "type": "number"
                            },
                            "grossWeekly": {
                              "type": "number"
                            },
                            "rentWeekly": {
                              "type": "number"
                            },
                            "energyWeekly": {
                              "type": "number"
                            },
                            "commissionWeekly": {
                              "type": "number"
                            },
                            "otherWeekly": {
                              "type": "number"
                            },
                            "netWeekly": {
                              "type": "number"
                            },
                            "netMonthly": {
                              "type": "number",
                              "description": "Defaults to the listing estMonthly. Scenario net is rounded to whole euros and floored at zero."
                            },
                            "breakEvenHoursPerWeek": {
                              "type": [
                                "number",
                                "null"
                              ],
                              "description": "Working hours needed to cover costs. Null when additional hours cannot cover fixed costs."
                            },
                            "range": {
                              "type": "object",
                              "properties": {
                                "netMonthlyLow": {
                                  "type": "number"
                                },
                                "netMonthlyHigh": {
                                  "type": "number"
                                }
                              },
                              "required": [
                                "netMonthlyLow",
                                "netMonthlyHigh"
                              ],
                              "additionalProperties": false
                            },
                            "assumptions": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "key": {
                                    "type": "string"
                                  },
                                  "label": {
                                    "type": "string"
                                  },
                                  "value": {
                                    "type": [
                                      "number",
                                      "string"
                                    ]
                                  },
                                  "unit": {
                                    "type": [
                                      "string",
                                      "null"
                                    ]
                                  },
                                  "source": {
                                    "type": [
                                      "string",
                                      "null"
                                    ]
                                  },
                                  "asOf": {
                                    "type": [
                                      "string",
                                      "null"
                                    ],
                                    "format": "date"
                                  }
                                },
                                "required": [
                                  "key",
                                  "label",
                                  "value",
                                  "unit",
                                  "source",
                                  "asOf"
                                ],
                                "additionalProperties": false
                              }
                            }
                          },
                          "required": [
                            "kind",
                            "currency",
                            "hoursPerWeek",
                            "grossWeekly",
                            "rentWeekly",
                            "energyWeekly",
                            "commissionWeekly",
                            "otherWeekly",
                            "netWeekly",
                            "netMonthly",
                            "breakEvenHoursPerWeek",
                            "range",
                            "assumptions"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "id",
                        "brand",
                        "model",
                        "city",
                        "country",
                        "currency",
                        "modality",
                        "pricePerWeek",
                        "deposit",
                        "slotPriceDay",
                        "slotPriceNight",
                        "imageUrl",
                        "rentalTerms",
                        "isDemo",
                        "updatedAt",
                        "transmission",
                        "estimate"
                      ]
                    }
                  },
                  "required": [
                    "vehicle"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Listing unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Invalid scenario parameters",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      },
      "patch": {
        "operationId": "update_vehicle",
        "summary": "Update a fleet listing",
        "description": "Authenticate as the listing owner. Set transmission to null to clear it.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[A-Za-z0-9_-]{1,32}$"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "transmission": {
                    "enum": [
                      "automatic",
                      "manual",
                      null
                    ],
                    "description": "Null when the listing has no transmission set."
                  }
                }
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Listing updated"
          },
          "422": {
            "description": "Invalid listing fields",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}
