{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/silvercar/json-schema/silvercar-reservation-customer-response-schema.json",
  "title": "ReservationCustomerResponse",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/silvercar-reservations-api-openapi.yml#/components/schemas/ReservationCustomerResponse",
  "type": "object",
  "properties": {
    "billing": {
      "type": "object",
      "properties": {
        "card_type": {
          "type": "string"
        },
        "last_four": {
          "type": "string"
        },
        "expiration_month": {
          "type": "string"
        },
        "expiration_year": {
          "type": "string"
        }
      }
    },
    "current_state": {
      "type": "string"
    },
    "customer": {
      "type": "object",
      "properties": {
        "id": {
          "type": "integer"
        },
        "email": {
          "type": "string"
        },
        "first_name": {
          "type": "string",
          "description": "Customer first name"
        },
        "last_name": {
          "type": "string",
          "description": "Customer last name"
        },
        "phone_number": {
          "type": "string",
          "description": "Customer phone number"
        },
        "language": {
          "type": "string",
          "description": "Customer language"
        },
        "deleted": {
          "type": "boolean",
          "description": "has this account been deleted"
        }
      }
    },
    "drivers_license": {
      "type": "object",
      "properties": {
        "id": {
          "type": "integer"
        },
        "number": {
          "type": "string"
        },
        "state": {
          "type": "string"
        },
        "country": {
          "type": "string"
        },
        "date_of_birth": {
          "type": "string",
          "format": "date"
        },
        "expiration": {
          "type": "string",
          "format": "date"
        },
        "name": {
          "type": "string"
        },
        "line1": {
          "type": "string"
        },
        "line2": {
          "type": "string"
        },
        "city": {
          "type": "string"
        },
        "zip": {
          "type": "string"
        }
      }
    },
    "insurance_expires_on": {
      "type": "string",
      "format": "datetime",
      "description": "Policy expiration date"
    },
    "sufficiency": {
      "type": [
        "object",
        "null"
      ],
      "properties": {
        "loaner": {
          "$ref": "#/$defs/InsuranceSufficiencyLoanerProperties"
        },
        "rental": {
          "$ref": "#/$defs/InsuranceSufficiencyRentalProperties"
        }
      }
    }
  },
  "$defs": {
    "InsuranceSufficiencyLoanerProperties": {
      "type": [
        "object",
        "null"
      ],
      "properties": {
        "sufficient": {
          "type": "boolean",
          "description": "Represents if the insurance document is sufficient"
        },
        "status": {
          "type": "string",
          "description": "Status of the insurance document sufficiency"
        },
        "valid_until": {
          "type": "string",
          "description": "Timestamp of when the insurance document sufficiency is valid until"
        },
        "checked_at": {
          "type": "string",
          "description": "Timestamp of when the insurance document sufficiency was last checked"
        },
        "details": {
          "type": "object",
          "description": "Additional details about the insurance document sufficiency provided by 3rd party",
          "properties": {
            "collision_coverage_meets_requirements": {
              "type": "string"
            },
            "comprehensive_coverage_meets_requirements": {
              "type": "string"
            },
            "expiration_date_comparison": {
              "type": "string"
            },
            "insureds_match": {
              "type": "string"
            },
            "required_policy_information_is_present": {
              "type": "string"
            }
          }
        }
      }
    },
    "InsuranceSufficiencyRentalProperties": {
      "type": [
        "object",
        "null"
      ],
      "properties": {
        "sufficient": {
          "type": "boolean",
          "description": "Represents if the insurance document is sufficient"
        },
        "status": {
          "type": "string",
          "description": "Status of the insurance document sufficiency"
        },
        "valid_until": {
          "type": "string",
          "description": "Timestamp of when the insurance document sufficiency is valid until"
        },
        "checked_at": {
          "type": "string",
          "description": "Timestamp of when the insurance document sufficiency was last checked"
        },
        "details": {
          "type": "object",
          "description": "Additional details about the insurance document sufficiency provided by 3rd party",
          "properties": {
            "comprehensive_coverage_meets_requirements": {
              "type": "string"
            },
            "expiration_date_comparison": {
              "type": "string"
            },
            "insureds_match": {
              "type": "string"
            },
            "rental_covered_for_collision": {
              "type": "string"
            },
            "required_policy_information_is_present": {
              "type": "string"
            }
          }
        }
      }
    }
  }
}