{
  "openapi": "3.1.0",
  "info": {
    "title": "Just Quotes API",
    "version": "1",
    "description": "Quick quotes for a shopper, who then buys on just.insure. The guide, compatibility policy and changelog are at https://docs.just.insure/quotes."
  },
  "externalDocs": {
    "description": "Quotes API guide",
    "url": "https://docs.just.insure/quotes"
  },
  "servers": [
    {
      "url": "https://production.api.just.insure",
      "description": "Production"
    },
    {
      "url": "https://staging.api.just.insure",
      "description": "Staging"
    }
  ],
  "security": [
    {
      "apiKey": []
    }
  ],
  "paths": {
    "/v1/quotes": {
      "post": {
        "operationId": "createQuotes",
        "summary": "Create quotes",
        "description": "Prices the shopper for each requested product, in order. Returns one quote per product Just can offer and one decline per product it cannot.",
        "externalDocs": {
          "url": "https://docs.just.insure/quotes#create-quotes"
        },
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/QuoteRequest"
              },
              "examples": {
                "quickStart": {
                  "summary": "Quick start",
                  "value": {
                    "package": "BASIC_FULL_COVER",
                    "policyholder": {
                      "firstName": "Alex",
                      "lastName": "Rivera",
                      "dateOfBirth": "1991-04-12",
                      "gender": "MALE",
                      "email": "alex.rivera@example.com",
                      "phone": "+16025550143",
                      "address": {
                        "line1": "302 W Almeria Rd",
                        "city": "Phoenix",
                        "state": "AZ",
                        "zipCode": "85003"
                      },
                      "creditScoreBand": "GOOD"
                    },
                    "vehicles": [
                      {
                        "partialVin": "19XFA1F5*A",
                        "estimatedMonthlyMileage": 800
                      }
                    ]
                  }
                },
                "everyField": {
                  "summary": "Every field",
                  "value": {
                    "package": "BASIC_FULL_COVER",
                    "products": [
                      "PAY_PER_MILE",
                      "UNLIMITED"
                    ],
                    "notifyShopper": false,
                    "policyholder": {
                      "firstName": "Alex",
                      "lastName": "Rivera",
                      "dateOfBirth": "1991-04-12",
                      "gender": "MALE",
                      "email": "alex.rivera@example.com",
                      "phone": "+16025550143",
                      "address": {
                        "line1": "302 W Almeria Rd",
                        "line2": null,
                        "city": "Phoenix",
                        "state": "AZ",
                        "zipCode": "85003"
                      },
                      "homeOwnership": "RENT",
                      "maritalStatus": "MARRIED",
                      "education": "BACHELORS",
                      "employmentStatus": "EMPLOYED",
                      "creditScoreBand": "GOOD",
                      "priorInsurance": {
                        "status": "INSURED",
                        "carrier": "Example Insurance",
                        "reasonForLapse": null
                      },
                      "licence": {
                        "state": "AZ",
                        "number": "D12345678"
                      },
                      "history": {
                        "accidents": [
                          {
                            "occurredOn": "2025-02-03",
                            "isAtFault": false,
                            "isAnyoneInjured": false,
                            "amountOfLoss": {
                              "amount": 180000,
                              "currency": "usd"
                            }
                          }
                        ],
                        "claims": [],
                        "violations": [
                          {
                            "occurredOn": "2024-08-19",
                            "acdCode": "S11"
                          }
                        ]
                      }
                    },
                    "additionalDrivers": [
                      {
                        "relationship": "SPOUSE",
                        "firstName": "Sam",
                        "lastName": "Rivera",
                        "dateOfBirth": "1992-09-30",
                        "gender": "FEMALE",
                        "history": {
                          "accidents": [],
                          "claims": [],
                          "violations": []
                        }
                      }
                    ],
                    "vehicles": [
                      {
                        "partialVin": "19XFA1F5*A",
                        "estimatedMonthlyMileage": 800
                      }
                    ]
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Just evaluated the shopper. Both lists may be non-empty, and either may be empty.",
            "headers": {
              "Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/QuoteResponse"
                },
                "examples": {
                  "twoQuotes": {
                    "summary": "Two quotes",
                    "value": {
                      "quotes": [
                        {
                          "id": "qq_01jaxk3m9v3t7q8r2w4y6z0abc",
                          "object": "quote",
                          "product": "PAY_PER_MILE",
                          "expiresAt": "2026-11-14T06:59:59Z",
                          "policyStartDate": "2026-10-15",
                          "term": {
                            "days": 90
                          },
                          "package": {
                            "type": "BASIC_FULL_COVER",
                            "name": "Basic Full Cover",
                            "coverages": [
                              {
                                "type": "BODILY_INJURY",
                                "perPerson": {
                                  "amount": 2500000,
                                  "currency": "usd"
                                },
                                "perAccident": {
                                  "amount": 5000000,
                                  "currency": "usd"
                                }
                              },
                              {
                                "type": "PROPERTY_DAMAGE",
                                "perAccident": {
                                  "amount": 1500000,
                                  "currency": "usd"
                                }
                              },
                              {
                                "type": "COLLISION",
                                "deductible": {
                                  "amount": 100000,
                                  "currency": "usd"
                                }
                              },
                              {
                                "type": "COMPREHENSIVE",
                                "deductible": {
                                  "amount": 100000,
                                  "currency": "usd"
                                }
                              },
                              {
                                "type": "GLASS",
                                "deductible": {
                                  "amount": 100000,
                                  "currency": "usd"
                                }
                              }
                            ]
                          },
                          "price": {
                            "type": "PAY_PER_MILE",
                            "perDay": {
                              "amount": 187,
                              "currency": "usd"
                            },
                            "perMile": {
                              "amount": 5,
                              "currency": "usd"
                            },
                            "estimatedMonthlyMileage": 800,
                            "estimatedMonthlyCost": {
                              "amount": 9610,
                              "currency": "usd"
                            },
                            "estimatedTermCost": {
                              "amount": 28830,
                              "currency": "usd"
                            }
                          },
                          "paymentPlans": [
                            {
                              "default": true,
                              "interval": "day",
                              "intervalCount": 14,
                              "dueToday": {
                                "downPayment": {
                                  "amount": 4508,
                                  "currency": "usd"
                                },
                                "fees": [
                                  {
                                    "type": "AUTO_THEFT_FEE",
                                    "name": "Automobile Theft Authority Fee",
                                    "amount": {
                                      "amount": 50,
                                      "currency": "usd"
                                    }
                                  }
                                ],
                                "securityDeposit": {
                                  "amount": 5000,
                                  "currency": "usd"
                                },
                                "total": {
                                  "amount": 9558,
                                  "currency": "usd"
                                }
                              },
                              "installment": {
                                "amount": 4508,
                                "currency": "usd"
                              }
                            }
                          ],
                          "clickToBuyUrl": "https://staging.just.insure/authenticate?code=pq7f3c9a2e41b8d605&redirectUri=https%3A%2F%2Fstaging.just.insure%2Fquote%2Fapplication",
                          "warnings": []
                        },
                        {
                          "id": "qq_01jaxk3m9w5b2c8d4e6f7g9h0j",
                          "object": "quote",
                          "product": "UNLIMITED",
                          "expiresAt": "2026-11-14T06:59:59Z",
                          "policyStartDate": "2026-10-15",
                          "term": {
                            "days": 90
                          },
                          "package": {
                            "type": "BASIC_FULL_COVER",
                            "name": "Basic Full Cover",
                            "coverages": [
                              {
                                "type": "BODILY_INJURY",
                                "perPerson": {
                                  "amount": 2500000,
                                  "currency": "usd"
                                },
                                "perAccident": {
                                  "amount": 5000000,
                                  "currency": "usd"
                                }
                              },
                              {
                                "type": "PROPERTY_DAMAGE",
                                "perAccident": {
                                  "amount": 1500000,
                                  "currency": "usd"
                                }
                              },
                              {
                                "type": "COLLISION",
                                "deductible": {
                                  "amount": 100000,
                                  "currency": "usd"
                                }
                              },
                              {
                                "type": "COMPREHENSIVE",
                                "deductible": {
                                  "amount": 100000,
                                  "currency": "usd"
                                }
                              },
                              {
                                "type": "GLASS",
                                "deductible": {
                                  "amount": 100000,
                                  "currency": "usd"
                                }
                              }
                            ]
                          },
                          "price": {
                            "type": "UNLIMITED",
                            "perDay": {
                              "amount": 312,
                              "currency": "usd"
                            },
                            "termPremium": {
                              "amount": 28080,
                              "currency": "usd"
                            }
                          },
                          "paymentPlans": [
                            {
                              "default": true,
                              "interval": "day",
                              "intervalCount": 14,
                              "dueToday": {
                                "downPayment": {
                                  "amount": 4368,
                                  "currency": "usd"
                                },
                                "fees": [
                                  {
                                    "type": "AUTO_THEFT_FEE",
                                    "name": "Automobile Theft Authority Fee",
                                    "amount": {
                                      "amount": 50,
                                      "currency": "usd"
                                    }
                                  }
                                ],
                                "securityDeposit": {
                                  "amount": 2808,
                                  "currency": "usd"
                                },
                                "total": {
                                  "amount": 7226,
                                  "currency": "usd"
                                }
                              },
                              "installment": {
                                "amount": 4368,
                                "currency": "usd"
                              }
                            },
                            {
                              "default": false,
                              "interval": "day",
                              "intervalCount": 30,
                              "dueToday": {
                                "downPayment": {
                                  "amount": 9360,
                                  "currency": "usd"
                                },
                                "fees": [
                                  {
                                    "type": "AUTO_THEFT_FEE",
                                    "name": "Automobile Theft Authority Fee",
                                    "amount": {
                                      "amount": 50,
                                      "currency": "usd"
                                    }
                                  }
                                ],
                                "securityDeposit": {
                                  "amount": 2808,
                                  "currency": "usd"
                                },
                                "total": {
                                  "amount": 12218,
                                  "currency": "usd"
                                }
                              },
                              "installment": {
                                "amount": 9360,
                                "currency": "usd"
                              }
                            }
                          ],
                          "clickToBuyUrl": "https://staging.just.insure/authenticate?code=pq0b6e8d1f73a2c94e&redirectUri=https%3A%2F%2Fstaging.just.insure%2Fquote%2Fapplication",
                          "warnings": []
                        }
                      ],
                      "declines": []
                    }
                  },
                  "allDeclined": {
                    "summary": "All declined",
                    "value": {
                      "quotes": [],
                      "declines": [
                        {
                          "product": "PAY_PER_MILE",
                          "code": "MULTIPLE_VEHICLES_NOT_SUPPORTED",
                          "message": "Just quotes one vehicle per request.",
                          "path": "vehicles"
                        },
                        {
                          "product": "UNLIMITED",
                          "code": "MULTIPLE_VEHICLES_NOT_SUPPORTED",
                          "message": "Just quotes one vehicle per request.",
                          "path": "vehicles"
                        }
                      ]
                    }
                  },
                  "oneQuoteOneDecline": {
                    "summary": "One quote, one decline",
                    "value": {
                      "quotes": [
                        {
                          "id": "qq_01jaxk3mb0n4p6r8s2t5v7x9zc",
                          "object": "quote",
                          "product": "PAY_PER_MILE",
                          "expiresAt": "2026-11-14T06:59:59Z",
                          "policyStartDate": "2026-10-15",
                          "term": {
                            "days": 90
                          },
                          "package": {
                            "type": "MINIMUM_LIABILITY",
                            "name": "Minimum Liability",
                            "coverages": [
                              {
                                "type": "BODILY_INJURY",
                                "perPerson": {
                                  "amount": 2500000,
                                  "currency": "usd"
                                },
                                "perAccident": {
                                  "amount": 5000000,
                                  "currency": "usd"
                                }
                              },
                              {
                                "type": "PROPERTY_DAMAGE",
                                "perAccident": {
                                  "amount": 1500000,
                                  "currency": "usd"
                                }
                              }
                            ]
                          },
                          "price": {
                            "type": "PAY_PER_MILE",
                            "perDay": {
                              "amount": 98,
                              "currency": "usd"
                            },
                            "perMile": {
                              "amount": 3,
                              "currency": "usd"
                            },
                            "estimatedMonthlyMileage": 500,
                            "estimatedMonthlyCost": {
                              "amount": 4440,
                              "currency": "usd"
                            },
                            "estimatedTermCost": {
                              "amount": 13320,
                              "currency": "usd"
                            }
                          },
                          "paymentPlans": [
                            {
                              "default": true,
                              "interval": "day",
                              "intervalCount": 14,
                              "dueToday": {
                                "downPayment": {
                                  "amount": 2086,
                                  "currency": "usd"
                                },
                                "fees": [
                                  {
                                    "type": "AUTO_THEFT_FEE",
                                    "name": "Automobile Theft Authority Fee",
                                    "amount": {
                                      "amount": 50,
                                      "currency": "usd"
                                    }
                                  }
                                ],
                                "securityDeposit": {
                                  "amount": 5000,
                                  "currency": "usd"
                                },
                                "total": {
                                  "amount": 7136,
                                  "currency": "usd"
                                }
                              },
                              "installment": {
                                "amount": 2086,
                                "currency": "usd"
                              }
                            }
                          ],
                          "clickToBuyUrl": "https://staging.just.insure/quote/application?quote=qq_01jaxk3mb0n4p6r8s2t5v7x9zc&utm_source=partner",
                          "warnings": []
                        }
                      ],
                      "declines": [
                        {
                          "product": "UNLIMITED",
                          "code": "UNDERWRITING_DECLINED",
                          "message": "Unlimited cannot be offered to this shopper."
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "[`invalid-request`](https://docs.just.insure/quotes/errors#invalid-request): the request has problems, all listed in `errors`. Or the API key isn't a Just key: answered by Just's API gateway with its own JSON, not a problem, and without a `Request-Id`.",
            "headers": {
              "Request-Id": {
                "description": "Just's id for the call: `req_` followed by a 26-character ULID. Send it to Just with any question about the call. Sent only with the problem, not with the gateway's answer.",
                "required": false,
                "schema": {
                  "type": "string"
                },
                "example": "req_01M504WQC04TFF59TDWH9EDD1R"
              }
            },
            "content": {
              "application/json": {
                "examples": {
                  "invalidApiKey": {
                    "summary": "Invalid API key",
                    "value": {
                      "code": 400,
                      "message": "INVALID_ARGUMENT: API key not valid. Please pass a valid API key."
                    }
                  }
                }
              },
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "examples": {
                  "example": {
                    "summary": "Invalid request",
                    "value": {
                      "type": "https://docs.just.insure/quotes/errors#invalid-request",
                      "title": "Invalid request",
                      "status": 400,
                      "detail": "The request has problems listed in `errors`; fix them all and resend.",
                      "requestId": "req_01M504WZ3F1HEAD8X4A1JH69RE",
                      "errors": [
                        {
                          "path": "policyholder.phone",
                          "code": "INVALID_FORMAT",
                          "message": "Must be an E.164 phone number, e.g. +16025550143."
                        },
                        {
                          "path": "policyholder.dateOfBirth",
                          "code": "INVALID_DATE",
                          "message": "Must be an ISO 8601 date, YYYY-MM-DD."
                        },
                        {
                          "path": "vehicles[0]",
                          "code": "VEHICLE_IDENTIFIER_AMBIGUOUS",
                          "message": "Must use only one of: vin, partialVin."
                        },
                        {
                          "path": "vehicles[0].estimatedMonthlyMileage",
                          "code": "INVALID_TYPE",
                          "message": "Must be a whole number."
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "The API key is missing. Answered by Just's API gateway with its own JSON, not a problem, and without a `Request-Id`.",
            "content": {
              "application/json": {
                "examples": {
                  "example": {
                    "summary": "Unauthenticated",
                    "value": {
                      "code": 401,
                      "message": "UNAUTHENTICATED: Method doesn't allow unregistered callers (callers without established identity). Please use API Key or other form of API consumer identity to call this API."
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "[`forbidden`](https://docs.just.insure/quotes/errors#forbidden): the API key is not enabled for this API.",
            "headers": {
              "Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "examples": {
                  "example": {
                    "summary": "Forbidden",
                    "value": {
                      "type": "https://docs.just.insure/quotes/errors#forbidden",
                      "title": "Forbidden",
                      "status": 403,
                      "detail": "This API key is not enabled for this API.",
                      "requestId": "req_01M504XP9WG7KYHRJXJG7DJ13N"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "[`not-found`](https://docs.just.insure/quotes/errors#not-found): no such path or method. Usually answered by Just's API gateway with its own JSON body, like the 401, and without a `Request-Id`; a problem only when the request reaches Just's API.",
            "headers": {
              "Request-Id": {
                "description": "Just's id for the call: `req_` followed by a 26-character ULID. Send it to Just with any question about the call. Sent only with the problem, not with the gateway's answer.",
                "required": false,
                "schema": {
                  "type": "string"
                },
                "example": "req_01M504WQC04TFF59TDWH9EDD1R"
              }
            },
            "content": {
              "application/json": {},
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "413": {
            "description": "[`invalid-request`](https://docs.just.insure/quotes/errors#invalid-request): the body is over 64 KiB.",
            "headers": {
              "Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "415": {
            "description": "[`invalid-request`](https://docs.just.insure/quotes/errors#invalid-request): the body is not `application/json`.",
            "headers": {
              "Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "500": {
            "description": "[`internal-error`](https://docs.just.insure/quotes/errors#internal-error): safe to retry with backoff.",
            "headers": {
              "Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "502": {
            "description": "[`dependency-failure`](https://docs.just.insure/quotes/errors#dependency-failure): safe to retry with backoff.",
            "headers": {
              "Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "examples": {
                  "example": {
                    "summary": "Bad Gateway",
                    "value": {
                      "type": "https://docs.just.insure/quotes/errors#dependency-failure",
                      "title": "Bad Gateway",
                      "status": 502,
                      "detail": "A service Just depends on failed. It is safe to retry.",
                      "requestId": "req_01M504X6TYH4QX4FR84G98PBSK"
                    }
                  }
                }
              }
            }
          },
          "504": {
            "description": "[`dependency-timeout`](https://docs.just.insure/quotes/errors#dependency-timeout): pricing took too long; safe to retry with backoff.",
            "headers": {
              "Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "examples": {
                  "example": {
                    "summary": "Gateway Timeout",
                    "value": {
                      "type": "https://docs.just.insure/quotes/errors#dependency-timeout",
                      "title": "Gateway Timeout",
                      "status": 504,
                      "detail": "Pricing took too long. It is safe to retry.",
                      "requestId": "req_01M504XEJDJMRNV7E9Z0C1HT0H"
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "apiKey": {
        "type": "apiKey",
        "in": "header",
        "name": "x-api-key",
        "description": "One key per partner for staging and one for production."
      }
    },
    "parameters": {
      "IdempotencyKey": {
        "name": "Idempotency-Key",
        "in": "header",
        "required": false,
        "description": "A unique value per quote attempt, reused when retrying that attempt; a V4 UUID is recommended. An empty value is treated as not sent.",
        "schema": {
          "type": "string",
          "maxLength": 255
        },
        "example": "5f2b8c1e-7d3a-4e9b-a6c2-0f1d8e7b3a94"
      }
    },
    "headers": {
      "RequestId": {
        "description": "Just's id for the call: `req_` followed by a 26-character ULID. Send it to Just with any question about the call.",
        "required": true,
        "schema": {
          "type": "string"
        },
        "example": "req_01M504WQC04TFF59TDWH9EDD1R"
      }
    },
    "schemas": {
      "QuoteRequest": {
        "type": "object",
        "properties": {
          "package": {
            "type": "string",
            "enum": [
              "MINIMUM_LIABILITY",
              "BASIC_FULL_COVER",
              "REGULAR_FULL_COVER"
            ]
          },
          "products": {
            "minItems": 1,
            "uniqueItems": true,
            "default": [
              "PAY_PER_MILE",
              "UNLIMITED"
            ],
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "PAY_PER_MILE",
                "UNLIMITED"
              ]
            }
          },
          "policyStartDate": {
            "format": "date",
            "description": "Defaults to today in the policyholder's time zone.",
            "type": "string"
          },
          "notifyShopper": {
            "default": false,
            "type": "boolean"
          },
          "policyholder": {
            "$ref": "#/components/schemas/Policyholder"
          },
          "additionalDrivers": {
            "maxItems": 9,
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AdditionalDriver"
            }
          },
          "vehicles": {
            "minItems": 1,
            "maxItems": 10,
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Vehicle"
            }
          }
        },
        "required": [
          "package",
          "policyholder",
          "vehicles"
        ]
      },
      "Policyholder": {
        "oneOf": [
          {
            "required": [
              "creditScore"
            ]
          },
          {
            "required": [
              "creditScoreBand"
            ]
          }
        ],
        "type": "object",
        "properties": {
          "firstName": {
            "minLength": 1,
            "type": "string"
          },
          "lastName": {
            "minLength": 1,
            "type": "string"
          },
          "dateOfBirth": {
            "format": "date",
            "type": "string"
          },
          "gender": {
            "type": "string",
            "enum": [
              "MALE",
              "FEMALE"
            ]
          },
          "licence": {
            "type": "object",
            "properties": {
              "state": {
                "pattern": "^[A-Z]{2}$",
                "type": "string"
              },
              "number": {
                "minLength": 1,
                "type": "string"
              }
            },
            "required": [
              "state",
              "number"
            ]
          },
          "history": {
            "$ref": "#/components/schemas/DrivingHistory"
          },
          "email": {
            "format": "email",
            "type": "string"
          },
          "emailVerified": {
            "default": false,
            "description": "Whether the partner has confirmed the shopper controls `email`. When `true` and Just has approved the partner to vouch for this, `clickToBuyUrl` signs the shopper in.",
            "type": "boolean"
          },
          "phone": {
            "anyOf": [
              {
                "type": "null"
              },
              {
                "pattern": "^\\+[1-9]\\d{1,14}$",
                "type": "string"
              }
            ]
          },
          "address": {
            "$ref": "#/components/schemas/Address"
          },
          "homeOwnership": {
            "type": "string",
            "enum": [
              "OWN",
              "RENT",
              "OTHER"
            ]
          },
          "maritalStatus": {
            "type": "string",
            "enum": [
              "SINGLE",
              "MARRIED",
              "DIVORCED",
              "WIDOWED"
            ]
          },
          "education": {
            "type": "string",
            "enum": [
              "LESS_THAN_HIGH_SCHOOL",
              "HIGH_SCHOOL",
              "VOCATIONAL",
              "ASSOCIATE",
              "BACHELORS",
              "MASTERS",
              "DOCTORATE"
            ]
          },
          "employmentStatus": {
            "type": "string",
            "enum": [
              "EMPLOYED",
              "UNEMPLOYED",
              "RETIRED",
              "OTHER"
            ]
          },
          "creditScore": {
            "minimum": 300,
            "maximum": 850,
            "type": "integer"
          },
          "creditScoreBand": {
            "type": "string",
            "enum": [
              "EXCELLENT",
              "GOOD",
              "AVERAGE",
              "POOR"
            ]
          },
          "priorInsurance": {
            "$ref": "#/components/schemas/PriorInsurance"
          }
        },
        "required": [
          "firstName",
          "lastName",
          "dateOfBirth",
          "gender",
          "email",
          "address"
        ]
      },
      "AdditionalDriver": {
        "type": "object",
        "properties": {
          "firstName": {
            "minLength": 1,
            "type": "string"
          },
          "lastName": {
            "minLength": 1,
            "type": "string"
          },
          "dateOfBirth": {
            "format": "date",
            "type": "string"
          },
          "gender": {
            "type": "string",
            "enum": [
              "MALE",
              "FEMALE"
            ]
          },
          "licence": {
            "type": "object",
            "properties": {
              "state": {
                "pattern": "^[A-Z]{2}$",
                "type": "string"
              },
              "number": {
                "minLength": 1,
                "type": "string"
              }
            },
            "required": [
              "state",
              "number"
            ]
          },
          "history": {
            "$ref": "#/components/schemas/DrivingHistory"
          },
          "relationship": {
            "type": "string",
            "enum": [
              "SPOUSE",
              "CHILD",
              "SIBLING",
              "PARENT",
              "EMPLOYEE",
              "OTHER_RELATED",
              "NON_RELATED"
            ]
          }
        },
        "required": [
          "firstName",
          "lastName",
          "dateOfBirth",
          "gender",
          "relationship"
        ]
      },
      "Address": {
        "type": "object",
        "properties": {
          "line1": {
            "anyOf": [
              {
                "type": "null"
              },
              {
                "type": "string"
              }
            ]
          },
          "line2": {
            "anyOf": [
              {
                "type": "null"
              },
              {
                "type": "string"
              }
            ]
          },
          "city": {
            "anyOf": [
              {
                "type": "null"
              },
              {
                "type": "string"
              }
            ]
          },
          "state": {
            "pattern": "^[A-Z]{2}$",
            "type": "string"
          },
          "zipCode": {
            "pattern": "^\\d{5}(-\\d{4})?$",
            "type": "string"
          }
        },
        "required": [
          "state",
          "zipCode"
        ]
      },
      "PriorInsurance": {
        "type": "object",
        "properties": {
          "status": {
            "description": "Left out, the shopper is rated as `INSURED`.",
            "type": "string",
            "enum": [
              "INSURED",
              "LAPSED",
              "NEVER_INSURED"
            ]
          },
          "carrier": {
            "anyOf": [
              {
                "type": "null"
              },
              {
                "maxLength": 255,
                "type": "string"
              }
            ]
          },
          "reasonForLapse": {
            "anyOf": [
              {
                "type": "null"
              },
              {
                "type": "string",
                "enum": [
                  "MILITARY_DEPLOYMENT",
                  "DID_NOT_OWN_OR_OPERATE_VEHICLE",
                  "DOMESTIC_VIOLENCE",
                  "NATURAL_DISASTER",
                  "SERIOUS_ILLNESS_OR_INJURY",
                  "DEATH_OF_IMMEDIATE_FAMILY_MEMBER",
                  "DIVORCE_OR_SEPARATION",
                  "INVOLUNTARY_JOB_LOSS",
                  "IDENTITY_THEFT",
                  "PRIOR_POLICY_CANCELLED_BY_INSURER",
                  "INCARCERATION",
                  "LIVING_OUTSIDE_UNITED_STATES",
                  "OTHER"
                ]
              }
            ]
          }
        }
      },
      "DrivingHistory": {
        "type": "object",
        "properties": {
          "accidents": {
            "maxItems": 50,
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Accident"
            }
          },
          "claims": {
            "maxItems": 50,
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Claim"
            }
          },
          "violations": {
            "maxItems": 50,
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Violation"
            }
          }
        },
        "required": [
          "accidents",
          "claims",
          "violations"
        ]
      },
      "Accident": {
        "type": "object",
        "properties": {
          "occurredOn": {
            "format": "date",
            "type": "string"
          },
          "isAtFault": {
            "type": "boolean"
          },
          "isAnyoneInjured": {
            "type": "boolean"
          },
          "amountOfLoss": {
            "$ref": "#/components/schemas/RequestMoney"
          }
        },
        "required": [
          "occurredOn",
          "isAtFault",
          "isAnyoneInjured",
          "amountOfLoss"
        ]
      },
      "Claim": {
        "type": "object",
        "properties": {
          "occurredOn": {
            "format": "date",
            "type": "string"
          },
          "amountOfLoss": {
            "$ref": "#/components/schemas/RequestMoney"
          }
        },
        "required": [
          "occurredOn",
          "amountOfLoss"
        ]
      },
      "Violation": {
        "oneOf": [
          {
            "required": [
              "acdCode"
            ]
          },
          {
            "required": [
              "severity"
            ]
          }
        ],
        "type": "object",
        "properties": {
          "occurredOn": {
            "format": "date",
            "type": "string"
          },
          "acdCode": {
            "minLength": 1,
            "maxLength": 10,
            "type": "string"
          },
          "severity": {
            "type": "string",
            "enum": [
              "MINOR",
              "MAJOR"
            ]
          }
        },
        "required": [
          "occurredOn"
        ]
      },
      "Vehicle": {
        "oneOf": [
          {
            "required": [
              "vin"
            ]
          },
          {
            "required": [
              "partialVin"
            ]
          }
        ],
        "type": "object",
        "properties": {
          "vin": {
            "pattern": "^[A-Za-z0-9]{17}$",
            "type": "string"
          },
          "partialVin": {
            "pattern": "^[A-Za-z0-9]{8}\\*[A-Za-z0-9]$",
            "type": "string"
          },
          "estimatedMonthlyMileage": {
            "minimum": 1,
            "type": "integer"
          }
        },
        "required": [
          "estimatedMonthlyMileage"
        ]
      },
      "RequestMoney": {
        "additionalProperties": true,
        "type": "object",
        "properties": {
          "amount": {
            "minimum": 0,
            "type": "integer"
          },
          "currency": {
            "type": "string",
            "enum": [
              "usd"
            ]
          }
        },
        "required": [
          "amount",
          "currency"
        ]
      },
      "QuoteResponse": {
        "additionalProperties": true,
        "type": "object",
        "properties": {
          "quotes": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Quote"
            }
          },
          "declines": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Decline"
            }
          }
        },
        "required": [
          "quotes",
          "declines"
        ]
      },
      "Quote": {
        "additionalProperties": true,
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "object": {
            "const": "quote",
            "type": "string"
          },
          "product": {
            "type": "string",
            "examples": [
              "PAY_PER_MILE",
              "UNLIMITED"
            ]
          },
          "expiresAt": {
            "format": "date-time",
            "type": "string"
          },
          "policyStartDate": {
            "format": "date",
            "type": "string"
          },
          "term": {
            "additionalProperties": true,
            "type": "object",
            "properties": {
              "days": {
                "minimum": 1,
                "type": "integer"
              }
            },
            "required": [
              "days"
            ]
          },
          "package": {
            "additionalProperties": true,
            "type": "object",
            "properties": {
              "type": {
                "type": "string",
                "examples": [
                  "MINIMUM_LIABILITY",
                  "BASIC_FULL_COVER",
                  "REGULAR_FULL_COVER"
                ]
              },
              "name": {
                "type": "string"
              },
              "coverages": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/Coverage"
                }
              }
            },
            "required": [
              "type",
              "name",
              "coverages"
            ]
          },
          "price": {
            "$ref": "#/components/schemas/Price"
          },
          "paymentPlans": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PaymentPlan"
            }
          },
          "clickToBuyUrl": {
            "format": "uri",
            "type": "string"
          },
          "warnings": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Warning"
            }
          }
        },
        "required": [
          "id",
          "object",
          "product",
          "expiresAt",
          "policyStartDate",
          "term",
          "package",
          "price",
          "paymentPlans",
          "clickToBuyUrl",
          "warnings"
        ]
      },
      "Price": {
        "oneOf": [
          {
            "$ref": "#/components/schemas/PayPerMilePrice"
          },
          {
            "$ref": "#/components/schemas/UnlimitedPrice"
          },
          {
            "$ref": "#/components/schemas/OtherPrice"
          }
        ]
      },
      "PayPerMilePrice": {
        "additionalProperties": true,
        "type": "object",
        "properties": {
          "type": {
            "const": "PAY_PER_MILE",
            "type": "string"
          },
          "perDay": {
            "$ref": "#/components/schemas/Money"
          },
          "perMile": {
            "$ref": "#/components/schemas/Money"
          },
          "estimatedMonthlyMileage": {
            "minimum": 0,
            "type": "integer"
          },
          "estimatedMonthlyCost": {
            "$ref": "#/components/schemas/Money"
          },
          "estimatedTermCost": {
            "$ref": "#/components/schemas/Money"
          }
        },
        "required": [
          "type",
          "perDay",
          "perMile",
          "estimatedMonthlyMileage",
          "estimatedMonthlyCost",
          "estimatedTermCost"
        ]
      },
      "UnlimitedPrice": {
        "additionalProperties": true,
        "type": "object",
        "properties": {
          "type": {
            "const": "UNLIMITED",
            "type": "string"
          },
          "perDay": {
            "$ref": "#/components/schemas/Money"
          },
          "termPremium": {
            "$ref": "#/components/schemas/Money"
          }
        },
        "required": [
          "type",
          "perDay",
          "termPremium"
        ]
      },
      "OtherPrice": {
        "additionalProperties": true,
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "not": {
              "enum": [
                "PAY_PER_MILE",
                "UNLIMITED"
              ]
            }
          }
        },
        "required": [
          "type"
        ]
      },
      "Coverage": {
        "additionalProperties": true,
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "examples": [
              "BODILY_INJURY",
              "PROPERTY_DAMAGE",
              "COLLISION",
              "COMPREHENSIVE",
              "GLASS",
              "UNINSURED_MOTORIST_BI",
              "UNDERINSURED_MOTORIST_BI",
              "UNINSURED_UNDERINSURED_MOTORIST_BI",
              "UNINSURED_MOTORIST_PD",
              "MEDICAL_PAYMENTS"
            ]
          },
          "perPerson": {
            "$ref": "#/components/schemas/Money"
          },
          "perAccident": {
            "$ref": "#/components/schemas/Money"
          },
          "deductible": {
            "$ref": "#/components/schemas/Money"
          }
        },
        "required": [
          "type"
        ]
      },
      "PaymentPlan": {
        "additionalProperties": true,
        "type": "object",
        "properties": {
          "default": {
            "type": "boolean"
          },
          "interval": {
            "type": "string",
            "examples": [
              "day",
              "week",
              "month"
            ]
          },
          "intervalCount": {
            "minimum": 1,
            "type": "integer"
          },
          "dueToday": {
            "additionalProperties": true,
            "type": "object",
            "properties": {
              "downPayment": {
                "$ref": "#/components/schemas/Money"
              },
              "fees": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/Fee"
                }
              },
              "securityDeposit": {
                "$ref": "#/components/schemas/Money"
              },
              "total": {
                "$ref": "#/components/schemas/Money"
              }
            },
            "required": [
              "downPayment",
              "fees",
              "securityDeposit",
              "total"
            ]
          },
          "installment": {
            "$ref": "#/components/schemas/Money"
          }
        },
        "required": [
          "default",
          "interval",
          "intervalCount",
          "dueToday",
          "installment"
        ]
      },
      "Fee": {
        "additionalProperties": true,
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "examples": [
              "AUTO_THEFT_FEE"
            ]
          },
          "name": {
            "type": "string"
          },
          "amount": {
            "$ref": "#/components/schemas/Money"
          }
        },
        "required": [
          "type",
          "name",
          "amount"
        ]
      },
      "Warning": {
        "additionalProperties": true,
        "type": "object",
        "properties": {
          "code": {
            "type": "string",
            "examples": [
              "VEHICLE_ASSUMED"
            ]
          },
          "message": {
            "type": "string"
          }
        },
        "required": [
          "code"
        ]
      },
      "Decline": {
        "additionalProperties": true,
        "type": "object",
        "properties": {
          "product": {
            "type": "string",
            "examples": [
              "PAY_PER_MILE",
              "UNLIMITED"
            ]
          },
          "code": {
            "type": "string",
            "examples": [
              "UNSUPPORTED_STATE",
              "MULTIPLE_VEHICLES_NOT_SUPPORTED",
              "FUTURE_START_FULL_COVER_NOT_SUPPORTED",
              "VEHICLE_NOT_FOUND",
              "VEHICLE_NOT_INSURABLE",
              "DRIVER_NOT_ELIGIBLE",
              "PACKAGE_NOT_AVAILABLE",
              "UNDERWRITING_DECLINED"
            ]
          },
          "message": {
            "type": "string"
          },
          "path": {
            "type": "string"
          }
        },
        "required": [
          "product",
          "code",
          "message"
        ]
      },
      "Money": {
        "additionalProperties": true,
        "type": "object",
        "properties": {
          "amount": {
            "minimum": 0,
            "type": "integer"
          },
          "currency": {
            "type": "string",
            "examples": [
              "usd"
            ]
          }
        },
        "required": [
          "amount",
          "currency"
        ]
      },
      "Problem": {
        "additionalProperties": true,
        "type": "object",
        "properties": {
          "type": {
            "format": "uri",
            "examples": [
              "https://docs.just.insure/quotes/errors#invalid-request",
              "https://docs.just.insure/quotes/errors#not-found",
              "https://docs.just.insure/quotes/errors#forbidden",
              "https://docs.just.insure/quotes/errors#internal-error",
              "https://docs.just.insure/quotes/errors#dependency-failure",
              "https://docs.just.insure/quotes/errors#dependency-timeout"
            ],
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "status": {
            "type": "integer"
          },
          "detail": {
            "type": "string"
          },
          "requestId": {
            "type": "string"
          },
          "errors": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/FieldProblem"
            }
          }
        },
        "required": [
          "type",
          "title",
          "status",
          "requestId"
        ]
      },
      "FieldProblem": {
        "type": "object",
        "properties": {
          "path": {
            "type": "string"
          },
          "code": {
            "type": "string",
            "examples": [
              "MISSING_FIELD",
              "INVALID_TYPE",
              "INVALID_ENUM_VALUE",
              "INVALID_DATE",
              "INVALID_EMAIL",
              "INVALID_FORMAT",
              "INVALID_LENGTH",
              "OUT_OF_RANGE",
              "TOO_FEW_ITEMS",
              "TOO_MANY_ITEMS",
              "DUPLICATE_ITEMS",
              "INVALID_VALUE",
              "VEHICLE_IDENTIFIER_REQUIRED",
              "VEHICLE_IDENTIFIER_AMBIGUOUS",
              "VIOLATION_IDENTIFIER_REQUIRED",
              "VIOLATION_IDENTIFIER_AMBIGUOUS",
              "CREDIT_SCORE_REQUIRED",
              "CREDIT_SCORE_AMBIGUOUS",
              "POLICY_START_DATE_IN_PAST",
              "POLICY_START_DATE_TOO_FAR_AHEAD"
            ]
          },
          "message": {
            "type": "string"
          }
        },
        "required": [
          "path",
          "code",
          "message"
        ]
      }
    }
  }
}
