{
  "openapi": "3.0.4",
  "info": {
    "title": "Aegis Partner API",
    "description": "REST API for partners who manage their own cars, drivers and bookings and charge tolls & violations themselves. Authenticate with your key in the `X-Api-Key` header (Authorize button). Every response uses the `{ success, data, error }` envelope; dates are UTC ISO-8601. Anywhere an id is accepted you may pass ours or your own external id.",
    "version": "v1"
  },
  "paths": {
    "/api/partner/v1/bookings": {
      "get": {
        "tags": [
          "PartnerBookings"
        ],
        "summary": "GET /api/partner/v1/bookings?carId=&renterId=&page=&pageSize= — one page of the\r\n            owner's bookings (optionally filtered), most recent rental window first. (Auth)",
        "parameters": [
          {
            "name": "carId",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "renterId",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "pageSize",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "post": {
        "tags": [
          "PartnerBookings"
        ],
        "summary": "POST /api/partner/v1/bookings — create a rental record. (Auth)",
        "requestBody": {
          "content": {
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/PartnerBookingsControllerBookingInput"
              }
            },
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PartnerBookingsControllerBookingInput"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/PartnerBookingsControllerBookingInput"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/PartnerBookingsControllerBookingInput"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/partner/v1/bookings/{bookingId}": {
      "get": {
        "tags": [
          "PartnerBookings"
        ],
        "summary": "GET /api/partner/v1/bookings/{bookingId} — {bookingId} may be our id OR your external booking id. (Auth)",
        "parameters": [
          {
            "name": "bookingId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "put": {
        "tags": [
          "PartnerBookings"
        ],
        "summary": "PUT /api/partner/v1/bookings/{bookingId} — change dates and/or status. (Auth)",
        "parameters": [
          {
            "name": "bookingId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/PartnerBookingsControllerBookingDateUpdate"
              }
            },
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PartnerBookingsControllerBookingDateUpdate"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/PartnerBookingsControllerBookingDateUpdate"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/PartnerBookingsControllerBookingDateUpdate"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/partner/v1/bookings/{bookingId}/agreement": {
      "post": {
        "tags": [
          "PartnerBookings"
        ],
        "summary": "POST /api/partner/v1/bookings/{bookingId}/agreement — optionally generate a rental agreement\r\nfor the booking and return its secure signing link. Delivery is left to the partner\r\n(`sendSms=false`); the returned URL can be forwarded to the driver. (Auth)",
        "parameters": [
          {
            "name": "bookingId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/partner/v1/bookings/{bookingId}/card-link": {
      "post": {
        "tags": [
          "PartnerBookings"
        ],
        "summary": "POST /api/partner/v1/bookings/{bookingId}/card-link — a secure link where the renter adds a\r\npayment card. Delivery is left to the partner (`sendSms=false`); forward the URL yourself.\r\nSeparate from the agreement link on purpose: a driver who already signed may still owe a card,\r\nand a driver with a card on file may still owe a signature. (Auth)",
        "parameters": [
          {
            "name": "bookingId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/partner/v1/cars": {
      "get": {
        "tags": [
          "PartnerCars"
        ],
        "summary": "GET /api/partner/v1/cars?page=&pageSize= — one page of the owner's own (non-deleted) cars,\r\nnewest first. (Auth)",
        "parameters": [
          {
            "name": "page",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "pageSize",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "post": {
        "tags": [
          "PartnerCars"
        ],
        "summary": "POST /api/partner/v1/cars — create a car under this partner. (Auth)",
        "requestBody": {
          "content": {
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/PartnerCarsControllerPartnerCarInput"
              }
            },
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PartnerCarsControllerPartnerCarInput"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/PartnerCarsControllerPartnerCarInput"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/PartnerCarsControllerPartnerCarInput"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/partner/v1/cars/{carId}": {
      "get": {
        "tags": [
          "PartnerCars"
        ],
        "summary": "GET /api/partner/v1/cars/{carId} — {carId} may be our id OR your external car id. (Auth)",
        "parameters": [
          {
            "name": "carId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "put": {
        "tags": [
          "PartnerCars"
        ],
        "summary": "PUT /api/partner/v1/cars/{carId} — update mutable fields of an owned car. (Auth)",
        "parameters": [
          {
            "name": "carId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/PartnerCarsControllerPartnerCarInput"
              }
            },
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PartnerCarsControllerPartnerCarInput"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/PartnerCarsControllerPartnerCarInput"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/PartnerCarsControllerPartnerCarInput"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "delete": {
        "tags": [
          "PartnerCars"
        ],
        "summary": "DELETE /api/partner/v1/cars/{carId} — soft-delete an owned car. (Auth)",
        "parameters": [
          {
            "name": "carId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/partner/v1/cars/{carId}/transponders": {
      "get": {
        "tags": [
          "PartnerCars"
        ],
        "summary": "GET /api/partner/v1/cars/{carId}/transponders (Auth)",
        "parameters": [
          {
            "name": "carId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "post": {
        "tags": [
          "PartnerCars"
        ],
        "summary": "POST /api/partner/v1/cars/{carId}/transponders — attach a toll tag to the car. (Auth)",
        "parameters": [
          {
            "name": "carId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/PartnerCarsControllerTransponderInput"
              }
            },
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PartnerCarsControllerTransponderInput"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/PartnerCarsControllerTransponderInput"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/PartnerCarsControllerTransponderInput"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/partner/v1/cars/{carId}/transponders/{transponderId}": {
      "delete": {
        "tags": [
          "PartnerCars"
        ],
        "summary": "DELETE /api/partner/v1/cars/{carId}/transponders/{transponderId} — detach the tag. (Auth)",
        "parameters": [
          {
            "name": "carId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "transponderId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/partner/v1/cars/{carId}/tracker": {
      "get": {
        "tags": [
          "PartnerCars"
        ],
        "summary": "GET /api/partner/v1/cars/{carId}/tracker — current device assignment (if any). (Auth)",
        "parameters": [
          {
            "name": "carId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "put": {
        "tags": [
          "PartnerCars"
        ],
        "summary": "PUT /api/partner/v1/cars/{carId}/tracker — assign / replace the GPS device (by IMEI). (Auth)",
        "parameters": [
          {
            "name": "carId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/PartnerCarsControllerTrackerInput"
              }
            },
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PartnerCarsControllerTrackerInput"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/PartnerCarsControllerTrackerInput"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/PartnerCarsControllerTrackerInput"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "delete": {
        "tags": [
          "PartnerCars"
        ],
        "summary": "DELETE /api/partner/v1/cars/{carId}/tracker — unassign the device. (Auth)",
        "parameters": [
          {
            "name": "carId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/partner/v1": {
      "get": {
        "tags": [
          "PartnerDocs"
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/partner/v1/functions": {
      "get": {
        "tags": [
          "PartnerDocs"
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/partner/v1/drivers": {
      "get": {
        "tags": [
          "PartnerDrivers"
        ],
        "summary": "GET /api/partner/v1/drivers?page=&pageSize=&search= — one page of YOUR drivers, newest\r\nfirst. `search` matches name / e-mail / phone. (Auth)",
        "parameters": [
          {
            "name": "page",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "pageSize",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "search",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "post": {
        "tags": [
          "PartnerDrivers"
        ],
        "summary": "POST /api/partner/v1/drivers — create (or update, when `userId` is set) a driver under this\r\npartner. License images are optional; include them to auto-populate the license fields. (Auth)",
        "requestBody": {
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "properties": {
                  "UserId": {
                    "type": "string",
                    "description": "Pass to UPDATE an existing driver (e.g. to attach license images later); omit to create.\r\n            May be YOUR OWN external driver id — it is resolved to our internal user."
                  },
                  "ExternalId": {
                    "type": "string",
                    "description": "Your own driver id. Recorded so you can reference this driver by it everywhere."
                  },
                  "FirstName": {
                    "type": "string"
                  },
                  "LastName": {
                    "type": "string"
                  },
                  "Email": {
                    "type": "string"
                  },
                  "CompanyName": {
                    "type": "string",
                    "description": "Business renter — stored as the driver's company."
                  },
                  "PhoneNumber": {
                    "type": "string"
                  },
                  "Address": {
                    "type": "string"
                  },
                  "Address2": {
                    "type": "string"
                  },
                  "City": {
                    "type": "string"
                  },
                  "State": {
                    "type": "string"
                  },
                  "ZipCode": {
                    "type": "string"
                  },
                  "Country": {
                    "type": "string"
                  },
                  "DateOfBirth": {
                    "type": "string"
                  },
                  "DriverLicenseId": {
                    "type": "string"
                  },
                  "DriverLicenseIssuingState": {
                    "type": "string"
                  },
                  "DriverLicenseExpirationDate": {
                    "type": "string"
                  },
                  "Language": {
                    "type": "string"
                  },
                  "SmsConsent": {
                    "type": "boolean"
                  },
                  "FrontSideImage": {
                    "type": "string",
                    "description": "Optional front-of-license image (decoded + OCR'd by the pipeline).",
                    "format": "binary"
                  },
                  "BackSideImage": {
                    "type": "string",
                    "description": "Optional back-of-license image (PDF417 barcode parsed).",
                    "format": "binary"
                  }
                }
              },
              "encoding": {
                "UserId": {
                  "style": "form"
                },
                "ExternalId": {
                  "style": "form"
                },
                "FirstName": {
                  "style": "form"
                },
                "LastName": {
                  "style": "form"
                },
                "Email": {
                  "style": "form"
                },
                "CompanyName": {
                  "style": "form"
                },
                "PhoneNumber": {
                  "style": "form"
                },
                "Address": {
                  "style": "form"
                },
                "Address2": {
                  "style": "form"
                },
                "City": {
                  "style": "form"
                },
                "State": {
                  "style": "form"
                },
                "ZipCode": {
                  "style": "form"
                },
                "Country": {
                  "style": "form"
                },
                "DateOfBirth": {
                  "style": "form"
                },
                "DriverLicenseId": {
                  "style": "form"
                },
                "DriverLicenseIssuingState": {
                  "style": "form"
                },
                "DriverLicenseExpirationDate": {
                  "style": "form"
                },
                "Language": {
                  "style": "form"
                },
                "SmsConsent": {
                  "style": "form"
                },
                "FrontSideImage": {
                  "style": "form"
                },
                "BackSideImage": {
                  "style": "form"
                }
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "properties": {
                  "UserId": {
                    "type": "string",
                    "description": "Pass to UPDATE an existing driver (e.g. to attach license images later); omit to create.\r\n            May be YOUR OWN external driver id — it is resolved to our internal user."
                  },
                  "ExternalId": {
                    "type": "string",
                    "description": "Your own driver id. Recorded so you can reference this driver by it everywhere."
                  },
                  "FirstName": {
                    "type": "string"
                  },
                  "LastName": {
                    "type": "string"
                  },
                  "Email": {
                    "type": "string"
                  },
                  "CompanyName": {
                    "type": "string",
                    "description": "Business renter — stored as the driver's company."
                  },
                  "PhoneNumber": {
                    "type": "string"
                  },
                  "Address": {
                    "type": "string"
                  },
                  "Address2": {
                    "type": "string"
                  },
                  "City": {
                    "type": "string"
                  },
                  "State": {
                    "type": "string"
                  },
                  "ZipCode": {
                    "type": "string"
                  },
                  "Country": {
                    "type": "string"
                  },
                  "DateOfBirth": {
                    "type": "string"
                  },
                  "DriverLicenseId": {
                    "type": "string"
                  },
                  "DriverLicenseIssuingState": {
                    "type": "string"
                  },
                  "DriverLicenseExpirationDate": {
                    "type": "string"
                  },
                  "Language": {
                    "type": "string"
                  },
                  "SmsConsent": {
                    "type": "boolean"
                  },
                  "FrontSideImage": {
                    "type": "string",
                    "description": "Optional front-of-license image (decoded + OCR'd by the pipeline).",
                    "format": "binary"
                  },
                  "BackSideImage": {
                    "type": "string",
                    "description": "Optional back-of-license image (PDF417 barcode parsed).",
                    "format": "binary"
                  }
                }
              },
              "encoding": {
                "UserId": {
                  "style": "form"
                },
                "ExternalId": {
                  "style": "form"
                },
                "FirstName": {
                  "style": "form"
                },
                "LastName": {
                  "style": "form"
                },
                "Email": {
                  "style": "form"
                },
                "CompanyName": {
                  "style": "form"
                },
                "PhoneNumber": {
                  "style": "form"
                },
                "Address": {
                  "style": "form"
                },
                "Address2": {
                  "style": "form"
                },
                "City": {
                  "style": "form"
                },
                "State": {
                  "style": "form"
                },
                "ZipCode": {
                  "style": "form"
                },
                "Country": {
                  "style": "form"
                },
                "DateOfBirth": {
                  "style": "form"
                },
                "DriverLicenseId": {
                  "style": "form"
                },
                "DriverLicenseIssuingState": {
                  "style": "form"
                },
                "DriverLicenseExpirationDate": {
                  "style": "form"
                },
                "Language": {
                  "style": "form"
                },
                "SmsConsent": {
                  "style": "form"
                },
                "FrontSideImage": {
                  "style": "form"
                },
                "BackSideImage": {
                  "style": "form"
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/partner/v1/drivers/{driverId}": {
      "get": {
        "tags": [
          "PartnerDrivers"
        ],
        "summary": "GET /api/partner/v1/drivers/{driverId} — full profile of one of your drivers, including the\r\nparsed licence and its images. {driverId} may be our id OR your external driver id. (Auth)",
        "parameters": [
          {
            "name": "driverId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/partner/v1/drivers/{driverId}/card": {
      "get": {
        "tags": [
          "PartnerDrivers"
        ],
        "summary": "GET /api/partner/v1/drivers/{driverId}/card — can we charge this driver today? Reports the card\r\non file plus why it would not be charged (expired / Stripe Link wallet / suppressed after declines). (Auth)",
        "parameters": [
          {
            "name": "driverId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/partner/v1/drivers/{driverId}/license/images": {
      "post": {
        "tags": [
          "PartnerDrivers"
        ],
        "summary": "POST /api/partner/v1/drivers/{driverId}/license/images — attach or replace the licence images of\r\nan existing driver (multipart). Either side may be sent alone. The images go through the same\r\nOCR / barcode pipeline as our own wizard, so the driver's licence fields are filled from them. (Auth)",
        "parameters": [
          {
            "name": "driverId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "properties": {
                  "FrontSideImage": {
                    "type": "string",
                    "description": "Front of the licence — read by OCR.",
                    "format": "binary"
                  },
                  "BackSideImage": {
                    "type": "string",
                    "description": "Back of the licence — its PDF417 barcode is parsed.",
                    "format": "binary"
                  },
                  "LicenseNumber": {
                    "type": "string",
                    "description": "Values you already hold. They outrank OCR, and are outranked by the barcode."
                  },
                  "IssuingState": {
                    "type": "string"
                  },
                  "ExpirationDate": {
                    "type": "string"
                  }
                }
              },
              "encoding": {
                "FrontSideImage": {
                  "style": "form"
                },
                "BackSideImage": {
                  "style": "form"
                },
                "LicenseNumber": {
                  "style": "form"
                },
                "IssuingState": {
                  "style": "form"
                },
                "ExpirationDate": {
                  "style": "form"
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/partner/v1/drivers/{driverId}/license/{side}": {
      "get": {
        "tags": [
          "PartnerDrivers"
        ],
        "summary": "GET /api/partner/v1/drivers/{driverId}/license/{side} — the licence image itself\r\n(`side` = front | back), streamed through the API so no separate storage access is needed. (Auth)",
        "parameters": [
          {
            "name": "driverId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "side",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/partner/v1/gps/trackers": {
      "get": {
        "tags": [
          "PartnerGps"
        ],
        "summary": "GET /api/partner/v1/gps/trackers?carId=&page=&pageSize=\r\nThe GPS devices in your fleet — which car each is on, where it came from (our hardware or a\r\ntelematics provider) and whether it is still reporting. (Auth)",
        "parameters": [
          {
            "name": "carId",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "pageSize",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/partner/v1/gps/positions": {
      "get": {
        "tags": [
          "PartnerGps"
        ],
        "summary": "GET /api/partner/v1/gps/positions?carId=&page=&pageSize=\r\nThe live map feed: one row per tracked car, its newest fix. A car whose device has not reported\r\ninside the retention window contributes no row. (Auth)",
        "parameters": [
          {
            "name": "carId",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "pageSize",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/partner/v1/gps/alerts": {
      "get": {
        "tags": [
          "PartnerGps"
        ],
        "summary": "GET /api/partner/v1/gps/alerts?carId=&from=&to=&page=&pageSize=\r\nTelematics events we detected for your cars (ignition on/off, trip ended, suspected tow),\r\nnewest first. The period defaults to the last 30 days. (Auth)",
        "parameters": [
          {
            "name": "from",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "to",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "carId",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "pageSize",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/partner/v1/cars/{carId}/gps/position": {
      "get": {
        "tags": [
          "PartnerGps"
        ],
        "summary": "GET /api/partner/v1/cars/{carId}/gps/position — where this car is now. {carId} may be our id\r\nOR your external car id. 404 when the car has no device or it has never reported. (Auth)",
        "parameters": [
          {
            "name": "carId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/partner/v1/cars/{carId}/gps/track": {
      "get": {
        "tags": [
          "PartnerGps"
        ],
        "summary": "GET /api/partner/v1/cars/{carId}/gps/track?from=&to=&page=&pageSize=\r\nThe raw fixes this car produced inside the period, oldest first — the track you draw on a map.\r\nThe period defaults to the last 24 hours and is capped at 31 days, which is the retention of\r\nraw positions; anything older has been purged and comes back empty. (Auth)",
        "parameters": [
          {
            "name": "carId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "from",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "to",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "page",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "pageSize",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/partner/v1/cars/{carId}/gps/mileage": {
      "get": {
        "tags": [
          "PartnerGps"
        ],
        "summary": "GET /api/partner/v1/cars/{carId}/gps/mileage?from=&to=\r\nHow far this car drove inside the period, summed from its own fixes — the mileage figure for a\r\nusage bill. `coveredFrom`/`coveredTo` say which part of the period actually had data. (Auth)",
        "parameters": [
          {
            "name": "carId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "from",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "to",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/partner/v1/cars/{carId}/gps/diagnostics": {
      "get": {
        "tags": [
          "PartnerGps"
        ],
        "summary": "GET /api/partner/v1/cars/{carId}/gps/diagnostics — device health: identity, connectivity, the\r\ncurrent live state and the last-24h activity counters, plus the most recent events. (Auth)",
        "parameters": [
          {
            "name": "carId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/partner/v1/bookings/{bookingId}/gps/track": {
      "get": {
        "tags": [
          "PartnerGps"
        ],
        "summary": "GET /api/partner/v1/bookings/{bookingId}/gps/track?page=&pageSize=\r\nThe track of ONE rental. The booking defines the window and the car, so no dates are taken —\r\nthe same attribution the toll side uses. {bookingId} may be our id OR your external booking id. (Auth)",
        "parameters": [
          {
            "name": "bookingId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "pageSize",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/partner/v1/bookings/{bookingId}/gps/mileage": {
      "get": {
        "tags": [
          "PartnerGps"
        ],
        "summary": "GET /api/partner/v1/bookings/{bookingId}/gps/mileage\r\nHow far ONE rental drove — the figure a mileage overage is billed from. The booking defines the\r\nwindow; a rental that ended longer ago than the position retention answers 0 with\r\n`positionCount` 0, which is \"not measurable any more\", not \"did not move\". (Auth)",
        "parameters": [
          {
            "name": "bookingId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/partner/v1/car-types": {
      "get": {
        "tags": [
          "PartnerReference"
        ],
        "summary": "GET /api/partner/v1/car-types — id + name for the `carTypeId` field on car create. (Auth)",
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/partner/v1/states": {
      "get": {
        "tags": [
          "PartnerReference"
        ],
        "summary": "GET /api/partner/v1/states — bookable states (abbreviation is the `stateId` for car create). (Auth)",
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/partner/v1/toll-providers": {
      "get": {
        "tags": [
          "PartnerReference"
        ],
        "summary": "GET /api/partner/v1/toll-providers — id + name/state for the `tollProviderId` on transponders. (Auth)",
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/partner/v1/tolls": {
      "get": {
        "tags": [
          "PartnerTolls"
        ],
        "summary": "GET /api/partner/v1/tolls?carId=&from=&to=&source=all|agency|gps&page=&pageSize=\r\nBoth toll sources in one stream (field `source` on each row), newest first. `carId`\r\noptional — omit for the whole fleet over the period, which needs neither a booking nor a\r\ndriver. Dates are UTC instants; `from` inclusive, `to` exclusive.\r\n`source=agency` gives the booking-independent stream only (a GPS toll exists solely\r\ninside a booking, so a partner that records none never sees any either way). (Auth)",
        "parameters": [
          {
            "name": "from",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "to",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "carId",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "source",
            "in": "query",
            "schema": {
              "type": "string",
              "default": "all"
            }
          },
          {
            "name": "bookingId",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "pageSize",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/partner/v1/violations": {
      "get": {
        "tags": [
          "PartnerTolls"
        ],
        "summary": "GET /api/partner/v1/violations?carId=&from=&to=&bookingId=&page=&pageSize=\r\nPriced violations for the owner's cars, newest first. `carId` optional — omit for the whole\r\nfleet over the period, which needs neither a booking nor a driver. Dates are UTC instants.\r\n`bookingId` switches to the one-rental read and ignores the period. (Auth)",
        "parameters": [
          {
            "name": "from",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "to",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "carId",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "bookingId",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "pageSize",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/partner/v1/cars/{carId}/tolls": {
      "get": {
        "tags": [
          "PartnerTolls"
        ],
        "summary": "GET /api/partner/v1/cars/{carId}/tolls?from=&to=&page=&pageSize=\r\nAgency tolls of ONE car over a period — no booking and no driver required. {carId} may be our\r\nid OR your external car id. Dates are UTC; `from` inclusive, `to` exclusive,\r\ndefaulting to the last 30 days. (Auth)",
        "parameters": [
          {
            "name": "carId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "from",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "to",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "page",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "pageSize",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/partner/v1/cars/{carId}/violations": {
      "get": {
        "tags": [
          "PartnerTolls"
        ],
        "summary": "GET /api/partner/v1/cars/{carId}/violations?from=&to=&page=&pageSize=\r\nViolations of ONE car over a period — no booking and no driver required. (Auth)",
        "parameters": [
          {
            "name": "carId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "from",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "to",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "page",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "pageSize",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/partner/v1/bookings/{bookingId}/tolls": {
      "get": {
        "tags": [
          "PartnerTolls"
        ],
        "summary": "GET /api/partner/v1/bookings/{bookingId}/tolls?source=&page=&pageSize=\r\nThe tolls of ONE rental: the GPS tolls keyed to it plus the agency tolls its car produced\r\ninside the rental window. {bookingId} may be our id OR your external booking id. (Auth)",
        "parameters": [
          {
            "name": "bookingId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "source",
            "in": "query",
            "schema": {
              "type": "string",
              "default": "all"
            }
          },
          {
            "name": "page",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "pageSize",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/partner/v1/bookings/{bookingId}/violations": {
      "get": {
        "tags": [
          "PartnerTolls"
        ],
        "summary": "GET /api/partner/v1/bookings/{bookingId}/violations?page=&pageSize=\r\nThe violations of ONE rental: those already linked to the booking plus the citations its car\r\ncollected inside the rental window. {bookingId} may be our id OR your external booking id. (Auth)",
        "parameters": [
          {
            "name": "bookingId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "pageSize",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "PartnerBookingsControllerBookingDateUpdate": {
        "type": "object",
        "properties": {
          "dateFrom": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "dateTo": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "status": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "PartnerBookingsControllerBookingInput": {
        "type": "object",
        "properties": {
          "externalId": {
            "type": "string",
            "description": "Your own booking id. Recorded so you can reference this booking by it everywhere.",
            "nullable": true
          },
          "carId": {
            "type": "string",
            "description": "Our car id OR your external car id.",
            "nullable": true
          },
          "renterId": {
            "type": "string",
            "description": "Our renter id OR your external driver id.",
            "nullable": true
          },
          "dateFrom": {
            "type": "string",
            "format": "date-time"
          },
          "dateTo": {
            "type": "string",
            "format": "date-time"
          },
          "status": {
            "type": "integer",
            "description": "Optional. BookingStatus code; defaults to Approved (6).",
            "format": "int32",
            "nullable": true
          },
          "price": {
            "type": "number",
            "description": "Optional informational price; the partner does its own charging.",
            "format": "double"
          }
        },
        "additionalProperties": false
      },
      "PartnerCarsControllerPartnerCarInput": {
        "type": "object",
        "properties": {
          "externalId": {
            "type": "string",
            "description": "Your own car id. Recorded so you can reference this car by it everywhere.",
            "nullable": true
          },
          "title": {
            "type": "string",
            "nullable": true
          },
          "carTypeId": {
            "type": "string",
            "nullable": true
          },
          "stateId": {
            "type": "string",
            "nullable": true
          },
          "city": {
            "type": "string",
            "nullable": true
          },
          "zipCode": {
            "type": "string",
            "nullable": true
          },
          "phoneNumber": {
            "type": "string",
            "nullable": true
          },
          "carPlateNumber": {
            "type": "string",
            "nullable": true
          },
          "carPlateNumberState": {
            "type": "string",
            "nullable": true
          },
          "addressLine1": {
            "type": "string",
            "nullable": true
          },
          "addressLine2": {
            "type": "string",
            "nullable": true
          },
          "country": {
            "type": "string",
            "nullable": true
          },
          "carBrand": {
            "type": "string",
            "nullable": true
          },
          "carModel": {
            "type": "string",
            "nullable": true
          },
          "year": {
            "type": "integer",
            "format": "int32"
          },
          "color": {
            "type": "string",
            "nullable": true
          },
          "interiorColor": {
            "type": "string",
            "nullable": true
          },
          "vin": {
            "type": "string",
            "nullable": true
          },
          "latitude": {
            "type": "number",
            "format": "double"
          },
          "longitude": {
            "type": "number",
            "format": "double"
          },
          "minimumReservationDays": {
            "type": "integer",
            "format": "int32"
          },
          "description": {
            "type": "string",
            "nullable": true
          },
          "published": {
            "type": "boolean"
          },
          "priceDaily": {
            "type": "number",
            "format": "double"
          },
          "priceWeekly": {
            "type": "number",
            "format": "double"
          },
          "priceMonthly": {
            "type": "number",
            "format": "double"
          },
          "priceSecurityDeposit": {
            "type": "number",
            "format": "double"
          }
        },
        "additionalProperties": false
      },
      "PartnerCarsControllerTrackerInput": {
        "type": "object",
        "properties": {
          "imei": {
            "type": "string",
            "nullable": true
          },
          "model": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "PartnerCarsControllerTransponderInput": {
        "type": "object",
        "properties": {
          "tollProviderId": {
            "type": "string",
            "format": "uuid"
          },
          "transponderNumber": {
            "type": "string",
            "nullable": true
          },
          "ownerTollAccountId": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          }
        },
        "additionalProperties": false
      }
    },
    "securitySchemes": {
      "PartnerKey": {
        "type": "apiKey",
        "description": "Your partner API key, shown in the Aegis owner portal (Settings → the \"Settings for …\" banner). Sent as the X-Api-Key header.",
        "name": "X-Api-Key",
        "in": "header"
      }
    }
  },
  "security": [
    {
      "PartnerKey": [ ]
    }
  ],
  "tags": [
    {
      "name": "PartnerBookings"
    },
    {
      "name": "PartnerCars"
    },
    {
      "name": "PartnerDocs"
    },
    {
      "name": "PartnerDrivers"
    },
    {
      "name": "PartnerGps"
    },
    {
      "name": "PartnerReference"
    },
    {
      "name": "PartnerTolls"
    }
  ]
}