{
  "openapi": "3.1.1",
  "info": {
    "title": "Crs.Zeta.App | v1",
    "version": "1.0.0+8b1de7b04bf068bd7270178953b00be621f813a9"
  },
  "servers": [
    {
      "url": "https://app.carrentalsolutions.com/"
    }
  ],
  "paths": {
    "/api/v1/age-groups": {
      "get": {
        "tags": [
          "Age Groups"
        ],
        "description": "Lists the driver age groups (e.g. \"21-24\", \"25+\") that a rental can be priced and booked under.\r\nUse the returned IDs for the `ageGroupId` parameter on the vehicle/group pricing endpoints.",
        "operationId": "GetAgeGroups",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgeGroupList"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/countries": {
      "get": {
        "tags": [
          "Countries"
        ],
        "description": "Lists the countries that a customer's address can be registered under.\r\nUse the returned IDs for the `customer.countryId` property on the reservation endpoints.",
        "operationId": "GetCountries",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CountryList"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/locations": {
      "get": {
        "tags": [
          "Locations"
        ],
        "description": "Lists the pickup locations available to the current company, along with which of those\r\nlocations each one can be dropped off at. Use the returned IDs for the `pickupId` and\r\n`dropoffId` parameters on the vehicle/group pricing and reservation endpoints.",
        "operationId": "GetLocations",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LocationList"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/reservations": {
      "post": {
        "tags": [
          "Reservations"
        ],
        "description": "Books a reservation for a vehicle. The `pricingToken` in the request body must come from\r\nGET /vehicles/{vehicleId} (with `include=prices`), and guarantees the price the customer\r\nsaw hasn't changed since it was quoted. The token is only valid if `vehicleId`,\r\n`pickupId`, `dropoffId`, `start`, `end`, `ageGroupId`, `rateCode`,\r\n`coupon`, and `quote` are all sent back exactly as they were in that same call — any\r\nof them changing invalidates it. On success, the Location header points to the new reservation\r\n(GET /reservations/{reservationId}), which also requires the customer's email to retrieve.",
        "operationId": "CreateReservation",
        "requestBody": {
          "description": "The reservation to create: pricing token, and the exact vehicle, dates, locations, rate, and quote lines it was quoted with, plus customer info.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ReservationCreate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/v1/reservations/{reservationId}": {
      "get": {
        "tags": [
          "Reservations"
        ],
        "description": "Gets a single reservation's full details: customer, vehicle, dates, locations, amounts owed/paid,\r\nand the itemized price quote. Requires the customer's email in addition to the reservation ID.",
        "operationId": "GetReservation",
        "parameters": [
          {
            "name": "reservationId",
            "in": "path",
            "description": "The reservation's public ID, formatted as \"{affiliate prefix}-{code}\" (e.g. \"ABC-10293\"), as returned in other endpoints' responses.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "email",
            "in": "query",
            "description": "The reservation's customer's email, as submitted when the reservation was created.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/v1/groups": {
      "get": {
        "tags": [
          "Vehicles"
        ],
        "description": "Gets the top-level vehicle group shown on the homepage — a curated set of child groups and/or\r\nindividual vehicles. Pass `include=prices` together with a pickup/drop-off and date range\r\nto also get live pricing for each vehicle.",
        "operationId": "GetMainGroup",
        "parameters": [
          {
            "name": "start",
            "in": "query",
            "description": "Pickup date and time. Required when `include=prices` is requested.",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "end",
            "in": "query",
            "description": "Drop-off date and time. Must be after `start`. Required when `include=prices` is requested.",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "pickupId",
            "in": "query",
            "description": "Code of the pickup location (see GET /locations). Required when `include=prices` is requested.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "dropoffId",
            "in": "query",
            "description": "Code of the drop-off location. Defaults to `pickupId` for a round trip.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "ageGroupId",
            "in": "query",
            "description": "ID of the driver's age group (see GET /age-groups). Required when `include=prices` is requested.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "rateCode",
            "in": "query",
            "description": "Rate plan code to price against. Defaults to the standard website rate when omitted.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "coupon",
            "in": "query",
            "description": "Coupon code to apply to pricing.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "include",
            "in": "query",
            "description": "Optional extra data to include in the response. Pass `prices` to calculate and return live pricing.",
            "schema": {
              "type": "array",
              "items": {
                "$ref": "#/components/schemas/VehicleInclude"
              }
            }
          },
          {
            "name": "extra",
            "in": "query",
            "description": "Extras (add-ons) to include in pricing, each formatted as `code` or `code:quantity` (e.g. `gps`, `child-seat:2`). Only used when `include=prices` is requested.",
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GroupDetail"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/groups/{groupId}": {
      "get": {
        "tags": [
          "Vehicles"
        ],
        "description": "Gets a vehicle group by ID, listing its child groups and the vehicles in it. Pass\r\n`include=prices` together with a pickup/drop-off and date range to also get live pricing\r\nfor each vehicle.",
        "operationId": "GetGroupById",
        "parameters": [
          {
            "name": "start",
            "in": "query",
            "description": "Pickup date and time. Required when `include=prices` is requested.",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "end",
            "in": "query",
            "description": "Drop-off date and time. Must be after `start`. Required when `include=prices` is requested.",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "pickupId",
            "in": "query",
            "description": "Code of the pickup location (see GET /locations). Required when `include=prices` is requested.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "dropoffId",
            "in": "query",
            "description": "Code of the drop-off location. Defaults to `pickupId` for a round trip.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "ageGroupId",
            "in": "query",
            "description": "ID of the driver's age group (see GET /age-groups). Required when `include=prices` is requested.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "rateCode",
            "in": "query",
            "description": "Rate plan code to price against. Defaults to the standard website rate when omitted.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "coupon",
            "in": "query",
            "description": "Coupon code to apply to pricing.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "include",
            "in": "query",
            "description": "Optional extra data to include in the response. Pass `prices` to calculate and return live pricing.",
            "schema": {
              "type": "array",
              "items": {
                "$ref": "#/components/schemas/VehicleInclude"
              }
            }
          },
          {
            "name": "extra",
            "in": "query",
            "description": "Extras (add-ons) to include in pricing, each formatted as `code` or `code:quantity` (e.g. `gps`, `child-seat:2`). Only used when `include=prices` is requested.",
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          {
            "name": "groupId",
            "in": "path",
            "description": "Code identifying the vehicle group to retrieve.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GroupDetail"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/vehicles/{vehicleId}": {
      "get": {
        "tags": [
          "Vehicles"
        ],
        "description": "Gets a single vehicle's details, plus a list of similar vehicles offered as alternatives.\r\nPass `include=prices` together with a pickup/drop-off and date range to also get a live,\r\nitemized price quote and a pricing token that can be used to create a reservation for this\r\nvehicle without the price changing underneath the customer.",
        "operationId": "GetVehicle",
        "parameters": [
          {
            "name": "vehicleId",
            "in": "path",
            "description": "Code identifying the vehicle to retrieve.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "start",
            "in": "query",
            "description": "Pickup date and time. Required when `include=prices` is requested.",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "end",
            "in": "query",
            "description": "Drop-off date and time. Must be after `start`. Required when `include=prices` is requested.",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "pickupId",
            "in": "query",
            "description": "Code of the pickup location (see GET /locations). Required when `include=prices` is requested.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "dropoffId",
            "in": "query",
            "description": "Code of the drop-off location. Defaults to `pickupId` for a round trip.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "ageGroupId",
            "in": "query",
            "description": "ID of the driver's age group (see GET /age-groups). Required when `include=prices` is requested.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "rateCode",
            "in": "query",
            "description": "Rate plan code to price against. Defaults to the standard website rate when omitted.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "coupon",
            "in": "query",
            "description": "Coupon code to apply to pricing.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "include",
            "in": "query",
            "description": "Optional extra data to include in the response. Pass `prices` to calculate and return live pricing.",
            "schema": {
              "type": "array",
              "items": {
                "$ref": "#/components/schemas/VehicleInclude"
              }
            }
          },
          {
            "name": "extra",
            "in": "query",
            "description": "Extras (add-ons) to include in pricing, each formatted as `code` or `code:quantity` (e.g. `gps`, `child-seat:2`). Only used when `include=prices` is requested.",
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VehicleDetail"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "AgeGroupList": {
        "required": [
          "items",
          "_links"
        ],
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AgeGroupSummary"
            }
          },
          "_links": {
            "$ref": "#/components/schemas/ListLinks"
          }
        }
      },
      "AgeGroupSummary": {
        "required": [
          "id",
          "name"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          }
        }
      },
      "CountryList": {
        "required": [
          "items",
          "_links"
        ],
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CountrySummary"
            }
          },
          "_links": {
            "$ref": "#/components/schemas/ListLinks"
          }
        }
      },
      "CountrySummary": {
        "required": [
          "id",
          "name"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          }
        }
      },
      "CustomerInfo": {
        "required": [
          "firstName",
          "lastName",
          "email",
          "countryId"
        ],
        "type": "object",
        "properties": {
          "firstName": {
            "type": "string"
          },
          "lastName": {
            "type": "string"
          },
          "email": {
            "type": "string"
          },
          "phone": {
            "type": [
              "null",
              "string"
            ]
          },
          "countryId": {
            "type": "string"
          }
        }
      },
      "ExtraSummary": {
        "required": [
          "maximumQuantity",
          "chargeId",
          "title",
          "description",
          "rate",
          "subtotal",
          "suffix"
        ],
        "type": "object",
        "properties": {
          "maximumQuantity": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "chargeId": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "rate": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "number",
              "string"
            ],
            "format": "double"
          },
          "subtotal": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "number",
              "string"
            ],
            "format": "double"
          },
          "suffix": {
            "type": "string"
          }
        }
      },
      "GroupDetail": {
        "required": [
          "id",
          "groups",
          "vehicles",
          "name"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "groups": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/GroupSummary"
            }
          },
          "vehicles": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/VehicleSummary"
            }
          },
          "name": {
            "type": "string"
          },
          "thumbnail": {
            "type": [
              "null",
              "string"
            ]
          },
          "image": {
            "type": [
              "null",
              "string"
            ]
          },
          "shortDescription": {
            "type": [
              "null",
              "string"
            ]
          },
          "longDescription": {
            "type": [
              "null",
              "string"
            ]
          },
          "_warnings": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "$ref": "#/components/schemas/VehicleMessage"
            }
          },
          "_errors": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "$ref": "#/components/schemas/VehicleMessage"
            }
          }
        }
      },
      "GroupSummary": {
        "required": [
          "id",
          "name"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "thumbnail": {
            "type": [
              "null",
              "string"
            ]
          },
          "image": {
            "type": [
              "null",
              "string"
            ]
          },
          "shortDescription": {
            "type": [
              "null",
              "string"
            ]
          },
          "longDescription": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "ListLinks": {
        "required": [
          "self",
          "prev",
          "next"
        ],
        "type": "object",
        "properties": {
          "self": {
            "type": "string"
          },
          "prev": {
            "type": [
              "null",
              "string"
            ]
          },
          "next": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "LocationList": {
        "required": [
          "items",
          "_links"
        ],
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/LocationSummary"
            }
          },
          "_links": {
            "$ref": "#/components/schemas/ListLinks"
          }
        }
      },
      "LocationSummary": {
        "required": [
          "id",
          "name",
          "group",
          "dropoffs"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "group": {
            "type": [
              "null",
              "string"
            ]
          },
          "dropoffs": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "PriceInfo": {
        "required": [
          "chargeId",
          "rate",
          "suffix"
        ],
        "type": "object",
        "properties": {
          "chargeId": {
            "type": "string"
          },
          "rate": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "number",
              "string"
            ],
            "format": "double"
          },
          "suffix": {
            "type": "string"
          }
        }
      },
      "QuoteLine": {
        "required": [
          "chargeId",
          "quantity",
          "rate",
          "subtotal"
        ],
        "type": "object",
        "properties": {
          "chargeId": {
            "type": "string"
          },
          "quantity": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "rate": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "null",
              "number",
              "string"
            ],
            "format": "double"
          },
          "subtotal": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "null",
              "number",
              "string"
            ],
            "format": "double"
          }
        }
      },
      "QuoteSummary": {
        "required": [
          "quantity",
          "chargeId",
          "title",
          "description",
          "rate",
          "subtotal",
          "suffix"
        ],
        "type": "object",
        "properties": {
          "quantity": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "chargeId": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "rate": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "number",
              "string"
            ],
            "format": "double"
          },
          "subtotal": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "number",
              "string"
            ],
            "format": "double"
          },
          "suffix": {
            "type": "string"
          }
        }
      },
      "ReservationCreate": {
        "required": [
          "pricingToken",
          "vehicleId",
          "pickupId",
          "start",
          "end",
          "quote",
          "customer"
        ],
        "type": "object",
        "properties": {
          "pricingToken": {
            "type": "string"
          },
          "vehicleId": {
            "type": "string"
          },
          "pickupId": {
            "type": "string"
          },
          "dropoffId": {
            "type": [
              "null",
              "string"
            ]
          },
          "start": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          },
          "end": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          },
          "ageGroupId": {
            "type": [
              "null",
              "string"
            ]
          },
          "rateCode": {
            "type": [
              "null",
              "string"
            ]
          },
          "coupon": {
            "type": [
              "null",
              "string"
            ]
          },
          "comments": {
            "type": [
              "null",
              "string"
            ]
          },
          "quote": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/QuoteLine"
            }
          },
          "customer": {
            "$ref": "#/components/schemas/CustomerInfo"
          }
        }
      },
      "VehicleDetail": {
        "required": [
          "id",
          "name",
          "otherChoices",
          "_links"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "thumbnail": {
            "type": [
              "null",
              "string"
            ]
          },
          "image": {
            "type": [
              "null",
              "string"
            ]
          },
          "shortDescription": {
            "type": [
              "null",
              "string"
            ]
          },
          "longDescription": {
            "type": [
              "null",
              "string"
            ]
          },
          "extras": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "$ref": "#/components/schemas/ExtraSummary"
            }
          },
          "quote": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "$ref": "#/components/schemas/QuoteSummary"
            }
          },
          "pricingToken": {
            "type": [
              "null",
              "string"
            ]
          },
          "otherChoices": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/VehicleSummary"
            }
          },
          "_warnings": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "$ref": "#/components/schemas/VehicleMessage"
            }
          },
          "_errors": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "$ref": "#/components/schemas/VehicleMessage"
            }
          },
          "_links": {
            "$ref": "#/components/schemas/VehicleLinks"
          }
        }
      },
      "VehicleInclude": {
        "enum": [
          "prices"
        ]
      },
      "VehicleLinks": {
        "required": [
          "self"
        ],
        "type": "object",
        "properties": {
          "self": {
            "type": "string"
          },
          "createReservation": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "VehicleMessage": {
        "required": [
          "message"
        ],
        "type": "object",
        "properties": {
          "code": {
            "type": [
              "null",
              "string"
            ]
          },
          "message": {
            "type": "string"
          }
        }
      },
      "VehicleSummary": {
        "required": [
          "id",
          "name"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "thumbnail": {
            "type": [
              "null",
              "string"
            ]
          },
          "image": {
            "type": [
              "null",
              "string"
            ]
          },
          "shortDescription": {
            "type": [
              "null",
              "string"
            ]
          },
          "longDescription": {
            "type": [
              "null",
              "string"
            ]
          },
          "prices": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "$ref": "#/components/schemas/PriceInfo"
            }
          },
          "_errors": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "$ref": "#/components/schemas/VehicleMessage"
            }
          }
        }
      }
    },
    "securitySchemes": {
      "API Key": {
        "type": "http",
        "scheme": "bearer"
      }
    }
  },
  "security": [
    {
      "API Key": [ ]
    }
  ],
  "tags": [
    {
      "name": "Age Groups"
    },
    {
      "name": "Countries"
    },
    {
      "name": "Locations"
    },
    {
      "name": "Reservations"
    },
    {
      "name": "Vehicles"
    }
  ]
}