openapi: 3.2.0 info: title: AutoFi Loan Applications API description: "\n# Introduction\n Welcome to the AutoFi REST API. Our API has predictable resource-oriented URLs, accepts JSON-encoded request bodies, returns JSON-encoded responses, and uses standard HTTP response codes, authentication, and verbs.\n\n# HTTP Requests\n### Environments\nEnvironment | URL\n----------------|-------------\nTest Sandbox | https://api-uat.autofi.com\nProduction | https://api.autofi.com\n\n### Request Headers\n\nThe `Content-Type` header for `POST` and `PUT` requests should be set to `application/json` unless otherwise noted.\n\nHeader | Value\n----------------|-------------\nContent-Type | application/json\n\n### Response Headers\nHeader | Value\n----------------|-------------\nX-RateLimit-Limit | Request quota\nX-RateLimit-Reset | UNIX timestamp the request quota will be reset after exceeding it\nX-RateLimit-Remaining | Remaining requests in quota\nRetry-After | Time in seconds to retry after\nX-Response-Time | The time in milliseconds it took to respond to the request\n\n# HTTP Responses\nAutoFi uses standard HTTP response codes to indicate the success or failure of an API request. \n\n## Successful requests\nHTTP requests that are successfully processed returns `2xx` status codes.\n\n| Status code | Description |\n| -- | -- |\n| **200 OK** | The request was successfully processed and requested content is returned in the response body. |\n| **201 Created** | The request was successfully processed and a new resource was created. |\n| **204 No Content** | The request was successfully processed and the response body has no content. |\n\n## Failed Requests\nHTTP requests that are not successfully processed, due to a client or server error, returns `4xx` or `5xx` status codes respectively.\n\n### HTTP 4XX status codes\n| Status code | Description \n| -- | -- |\n| **400 Bad Request** | The request cannot be processed. Typically due to a malformed payload.\n| **401 Unauthorized** | The request has invalid credentials (token).\n| **403 Forbidden** | The request has insufficient privileges.\n| **404 Not Found** | The requested resource could not be found.\n| **405 Method Not Allowed** | The API does not allow this method.\n| **415 Unsupported Media Type** | The payload format is not supported. [AutoFi request headers](#request-headers).\n| **429 Too Many Requests** | There were too many request in a given amount of time.\n\n### Error response definition\nMost types of errors have the following structure:\n| field | Description \n| --- | --- \n| code | reference to the status code of the response\n| message | defines the error type \n| errors | contains an array of objects with the description for an error or multiple errors generated.\n\n### Error Types\n\n`4xx` Errors can be thrown for different reasons. The following section describes common shapes for the error objects returned.\n\n#### Validation Errors\nValidation errors return a `400` status code indicating a `Bad Request`.\n\n| Parameter type | Description \n| --- | --- \n| string | `dob`, `email`, `phone`, etc., have formats and possibly character restrictions which must be observed. e.g. `phone` must be a 10 character long string that contains only numbers.\n| number | `apr`, `downPayment`, `term`, etc., have range requirements which must be observed. e.g. `apr` must be a number between [0...1]. \n| integer | `timeInMonths`, `monthlyPayment`, `year`, etc., have range requirements which must be observed. \n\n\n> #### Example Response `400 Bad Request`\n> ```json\n> {\n> \"code\": 400,\n> \"message\": \"Validation Error\",\n> \"errors\": [\n> {\n> \"description\": \"Required field \\\"applicant\\\" was not provided.\"\n> },\n> {\n> \"description\": \"Field \\\"cosigner.email\\\" is invalid: io.\"\n> }\n> ]\n> }\n> ```\n\n\n#### Authorization Errors\nAuthorization errors return a `401` status code indicating a `Unauthorized`.\nMost endpoints will return some of the following errors in case of an invalid\n(malformed or expired) or absent authorization token, indicating that a new \ntoken must be requested.\n\n> #### Example Response `401 `\n> ```json\n> {\n> \"error\": \"UnauthorizedError: invalid token\"\n> }\n> ```\n> ```json\n> {\n> \"error\": \"UnauthorizedError: No authorization token was found\"\n> }\n> ```\n> ```json\n> {\n> \"error\": \"UnauthorizedError: Format is Authorization: Bearer [token]\"\n> }\n> ```\n> ```json\n> {\n> \"error\": \"UnauthorizedError: jwt malformed\"\n> }\n> ```\n\n#### Not Found Errors\nNot Found errors return a `404` status code indicating a `Not Found`.\n\n> #### Example Response `404 Not found`\n> ```json\n> {\n> \"error\": \"Error: Not Found\"\n> }\n> ```\n\n#### Rate Limiting\nIf the server is receiving an excessive amount of requests from a \nparticular user, it may return errors with a `429` status code \nindicating `Too many requests`.\n\n> #### Example Response `429 Too many requests`\n> ```json\n> {\n> \"code\": 429,\n> \"message\": \"Account limit exceeded.\",\n> }\n> ```\n\n\n### HTTP 5XX status codes\n| Http Status | Description |\n| -- | -- |\n| **500 Internal Server Error** | An unexpected error occurred, preventing successfully processing the request. |\n| **503 Service Unavailable** | An AutoFi service is unavailable, preventing successfully processing the request. | \n\n> See the [Hypertext Transfer Protocol (HTTP)](https://datatracker.ietf.org/doc/html/rfc7231) or the [MDN docs](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status) for more details.\n\n### Error Type\n\n#### 503 Service Unavailable\nService unavailable error is returned when our servers is not available to process and return a response.\n\n> #### Example Response `503 service unavailable`\n> ```json\n> {\n> \"code\": 503,\n> \"message\": \"Service Unavailable\",\n> \"errors\": [\n> {\n> \"description\": \"Service Unavailable\"\n> },\n> ]\n> }\n> ```\n" version: 1.0.0 x-logo: url: https://app.autofi.com/images/email-autofi-logo.png backgroundColor: '#FFFFFF' altText: AutoFi href: / servers: - url: https://api.autofi.com description: Production server - url: https://api-uat.autofi.com description: Sandbox server security: - bearerAuth: [] tags: - name: Loan Applications description: This section provides the methods available to submit and retrieve loan applications for your organization. paths: /v1/loan-application: post: security: - bearerAuth: - create:loanapplications summary: 'Create a new loan application ' description: 'You can provide a callback URL through the `callbackURL` property. See the callbacks section below for more information. ' tags: - Loan Applications callbacks: createLoanAppCallback: '{$request.body#/callbackUrl}': post: summary: Loan Application callback description: "AutoFi REST APIs use callbacks for event notifications, such as lender decisions when applying for credit. \nCallbacks are outbound API calls that notify you when an event has occurred. Note: Callbacks do not \nhave a re-try function.\n\n### How to use\n\nOn the AutoFi Create Loan Application you can provide the `callbackUrl` property with a URL value. AutoFi will send \nevent notifications to that URL.\n\n### Messages\n\nA JSON notification will be triggered when a new event takes place. For example, an event will trigger a notification\nwhen a loan application has been approved or declined by a lender. The callback response body contains the same \ninformation as returned by the [GET Loan Application](#tag/Loan-Applications/paths/~1v1~1loan-application~1{loanApplicationId}/get) \nendpoint.\n\n### Event triggers\n\nEnum: `\"ACCEPTED\"` `\"APPROVED\"` `\"BEGAN_APPLICATION\"` `\"DECLINED\"` `\"ERROR\"` `\"FI_COMPLETED\"` `\"PENDING\"` `\"SUBMITTED\"`\n" responses: '200': description: Callback response body content: application/json: schema: allOf: - $ref: '#/components/schemas/LoanApplicationData' properties: timestamp: type: string format: date-time example: '2022-03-09T16:26:18.284Z' requestBody: required: true content: application/json: schema: type: object required: - applicant - callbackUrl - dealer - offerPreferences - vehicle properties: applicant: allOf: - $ref: '#/components/schemas/DecisioningApplicantInput' properties: email: $ref: '#/components/schemas/EmailInput' callbackUrl: type: string example: https://my-domain.com/customers/1/updateCreditApp format: uri minLength: 1 description: A valid URL to receive responses when there is a change in state. cosigner: allOf: - $ref: '#/components/schemas/DecisioningCoApplicantInput' properties: email: $ref: '#/components/schemas/EmailInput' dealer: allOf: - $ref: '#/components/schemas/LoanApplicationDealerInput' properties: code: description: Identification assigned to dealer by AutoFi. type: string pattern: ^[A-Z0-9]{4}$ minLength: 4 maxLength: 4 example: 76KR fees: $ref: '#/components/schemas/FinanceFees' offerPreferences: allOf: - $ref: '#/components/schemas/DecisioningOfferPreferences' properties: apr: type: number format: float description: Annual percentage rate in decimals e.g. if the apr is 2% this should be 0.02 isSubvented: type: boolean description: Indicates that the rate in this offer contains a subvented or special rate. This influences rules relating to markup and rebate compatibility. This only affects the offer if there is an `apr` specified. downPayment: default: 0 products: type: array items: allOf: - $ref: '#/components/schemas/ProductInput' properties: referenceId: $ref: '#/components/schemas/referenceId' rebates: type: array items: $ref: '#/components/schemas/RebateInput' referenceId: $ref: '#/components/schemas/schemas-referenceId' simulate: $ref: '#/components/schemas/SimulateInput' tax: $ref: '#/components/schemas/schemas-tax' taxRate: type: number example: 0.07 format: float description: Required if `requestedOfferType` is `LEASE`. Must not be greater than 1. Used to calculate a number of tax values related to a lease. exclusiveMinimum: 0 exclusiveMaximum: 1 tradeIn: allOf: - $ref: '#/components/schemas/LoanApplicationTradeInInput' properties: payoff: type: number format: float minimum: 0 maximum: 999999 example: 3500.75 description: The payoff amount the customer needs to pay to satisfy the terms of their vehicle loan. vehicle: allOf: - $ref: '#/components/schemas/DecisioningVehicleInput' properties: bookoutValue: type: number format: float example: 39895.27 description: Bookout value to override bookout calculation if `age` is `USED` or `CPO`. modelCode: description: The code for the model provided by the manufacturer. This field is optional but strongly recommended for new vehicles and lease applications since it greatly improves deal accuracy, e.g. determining the correct rebates. type: string example: P8T trim: description: Vehicle trim. This field is optional but strongly recommended for lease applications since it greatly improves deal accuracy, e.g. determining the correct rebates. type: string example: GT responses: '200': description: Loan Application data content: application/json: schema: $ref: '#/components/schemas/LoanApplicationResponse' '400': $ref: '#/components/responses/CreateLoanApplication' /v1/loan-application/{loanApplicationId}: get: security: - bearerAuth: - read:loanapplications summary: Loan application details tags: - Loan Applications parameters: - $ref: '#/components/parameters/LoanApplicationIdParam' responses: '200': description: Loan Application data content: application/json: schema: $ref: '#/components/schemas/LoanApplicationData' /v1/loan-application/{loanApplicationId}/externalResources: get: security: - bearerAuth: - read:loanapplications summary: External resources (experimental) description: 'Collection of resources in external systems that are associated with the loan application. External resources are updated with information about the deal during the loan application process. After the external system has been updated, external resources are available in the response, grouped by the external system type and then by the provider of each system. Currently Dealer Management Systems (DMS) are the only available external system type and the only provider is for the CDK DMS. This endpoint is still `experimental` and can change in the future. ' tags: - Loan Applications parameters: - $ref: '#/components/parameters/LoanApplicationIdParam' responses: '200': $ref: '#/components/responses/ExternalResourcesResponse' components: schemas: Relationship: example: SPOUSE description: The cosigner's relationship with the primary applicant. Use `PARENT` when the cosigner is the applicant's parent. Use `RESIDESWITH` when there is no familial relationship but the applicant and cosigner live together. type: string enum: - RESIDESWITH - PARENT - OTHER - SPOUSE ApplicantFullNameInput: allOf: - $ref: '#/components/schemas/ApplicantBaseNameInput' title: Name properties: middle: description: Middle name example: Alejandra type: string suffix: description: Suffix indicating generational title example: JR type: string enum: - JR - SR - I - II - III - IV - V TaxItemLease: type: object description: Lease Tax Item. properties: amount: description: Tax item amount. type: number format: float description: description: Tax item description. type: string descriptionI18n: description: Tax item description for locale. type: string Decision: type: object properties: comments: description: List of raw lender comments returned via the middleman. type: object properties: raw: type: array items: type: string example: APPROVED WITH COSIGNER consumerState: type: string description: Consumer decision's state. enum: - APPROVED - DECLINED - PENDING default: PENDING error: type: - object - 'null' description: Avaliable when the status of the decision is `ERROR` properties: message: type: string description: Message of the error that occurred when getting the decision. example: Unable to locate bookout data. isAccepted: type: - boolean - 'null' description: This flag is `true` when the decision has been accepted by the customer. lenderReferenceId: type: - string - 'null' description: Lender application id. middleman: type: - string - 'null' description: Middleman name. enum: - dealertrack - dealertrackFs - routeOne middlemanReferenceID: type: - string - 'null' description: Middleman application id. name: type: - string - 'null' description: Lender name. pricing: type: - object - 'null' properties: amountFinanced: type: - number - 'null' format: float apr: type: - number - 'null' format: float description: Loan's annual percentage rate. buyRate: type: - number - 'null' format: float dealerDiscountFee: type: - number - 'null' format: float description: Fee charged by the lender to the dealer for underwriting certain loan applications. downPayment: type: - number - 'null' format: float monthlyPayment: type: - number - 'null' format: float termMonths: type: - integer - 'null' state: type: - string - 'null' description: Decision's state enum: - APPROVED - CONDITIONAL - COUNTER_OFFER - DECLINED - ERROR - LENDER_CONSTRAINT - PENDING stipulations: type: - object - 'null' description: List of lender stipulations. properties: raw: type: array description: Raw stipulations as are sent by lenders. items: type: string example: DOB MISMATCH ON BUREAU. PROOF OF DOB REQUIRED; DL OR OTHER GOVERNMENT ISSUED ID WITH PHOTO AND DOBS normalized: type: array description: Normalized from `raw` stipulations into a user friendly format. The number of `normalized` stipulations may not match the number of `raw` ones. items: type: string example: Applicant will need to show a valid government issued photo ID card for date of birth verification FinanceFees: type: array items: allOf: - $ref: '#/components/schemas/FeeInput' properties: code: $ref: '#/components/schemas/schemas-FeeCodeInput' isTaxable: description: 'Default: `false`
Applies only when requested offerType is `FINANCE`.' deprecated: true example: amount: 249.99 code: SHIPPING_FEE name: Shipping fee TaxName: type: string description: "The name of the tax. \n**Note**: if \"Total Taxes\" value is received, it is the total tax amount for the vehicle. Does not include product taxes.\n" InputVehicleAge: description: Vehicle age. type: string enum: - NEW - CPO - USED TaxableAmount: type: number example: 34317.99 format: float minimum: 0 description: '

Experimental Taxable amount.

' EmploymentStatus: type: string enum: - CONTRACT - EMPLOYED - FULL_TIME - MILITARY - NA - OTHER - PART_TIME - RETIRED - SELF_EMPLOYED - SEASONAL - STUDENT - TEMPORARY - UNEMPLOYED BaseSelectedProduct: type: object description: Fields in common for FINANCE, CASH and LEASE. properties: mileage: type: - integer - 'null' example: 1 minimum: 0 description: The mileage selected by the customer for a specific product (e.g. VSC). name: type: - string - 'null' description: Name of the F&I product selected. price: $ref: '#/components/schemas/price' referenceId: $ref: '#/components/schemas/referenceId' tax: $ref: '#/components/schemas/tax' taxableAmount: $ref: '#/components/schemas/TaxableAmount' taxLineItems: $ref: '#/components/schemas/TaxLineItems' termMonths: type: - integer - 'null' example: 1 minimum: 0 description: The term selected by the customer for a specific product (e.g. Tire and Wheel). total: type: - number - 'null' example: 1 format: float minimum: 0 description: The total price of the product including the finance charge. example: mileage: 50000 name: Extended Warranty price: 700 referenceId: 23b605f6-2a9e-11ec-8d3d-0242ac130003 tax: 60.01 taxableAmount: 700 taxLineItems: - jurisdiction: name: COLORADO type: STATE imposition: General Sales and Use Tax tax: rate: 0.086 amount: 60.1 termMonths: 60 total: 760.01 ApplicantAddressInput: type: object required: - city - residenceTimeInMonths - residenceType - state - street - zip properties: street: type: string minLength: 1 example: 1234 Main St description: Applicant street line. street2: type: string example: Apt B description: Applicant street line 2. city: type: string minLength: 1 example: Madison description: Applicant city of residence. state: type: string minLength: 1 example: WI description: Two character code for state (US). zip: type: string minLength: 1 example: '53714' description: Zip code. residenceType: allOf: - $ref: '#/components/schemas/AddressResidenceType' residenceMonthlyPayment: type: integer example: 1500 minimum: 0 description: The monthly mortgage or rent payment. Required when `residenceType` is `BUYING` or `RENT` and must be a positive integer. For all other `residenceType` values, this field should be omitted. residenceTimeInMonths: type: integer example: 16 minimum: 0 description: "The number of months living at this address. If less than 24 please include `previousAddress`. \n\n__Note:__ An input of 0 will be rounded up to 1 month.\n" LeaseTaxes: type: array title: Lease items: properties: amount: $ref: '#/components/schemas/FeeAmount' name: $ref: '#/components/schemas/FeeName' taxPlacement: $ref: '#/components/schemas/TaxPlacement' DecisioningApplicantInput: type: object properties: name: allOf: - $ref: '#/components/schemas/ApplicantFullNameInput' address: allOf: - $ref: '#/components/schemas/ApplicantAddressInput' - description: Applicant residence information. previousAddress: allOf: - $ref: '#/components/schemas/ApplicantAddressInput' - description: 'Applicant previous residence information. Recommended when the applicant has lived at the current address for less than 2 years. ' - example: street: 8754 Pine St street2: '' city: Detroit state: MI zip: '48204' residenceType: RELATIVES residenceTimeInMonths: 12 residenceMonthlyPayment: 0 phone: allOf: - $ref: '#/components/schemas/PhoneInput' email: allOf: - $ref: '#/components/schemas/EmailInput' ssn: type: string example: '666554444' maxLength: 9 minLength: 9 pattern: ^\d{9}$ description: 'Social Security Number / ITIN in US. Note: The application is only submitted to lenders that support ITIN. ' maritalStatus: allOf: - $ref: '#/components/schemas/MaritalStatus' educationLevel: allOf: - $ref: '#/components/schemas/EducationLevel' employment: allOf: - $ref: '#/components/schemas/ApplicantEmploymentInput' previousEmployment: allOf: - $ref: '#/components/schemas/ApplicantEmploymentInput' properties: timeInMonths: description: Number of months working for this employer. dob: type: string format: date pattern: ^([12]\d{3}-(0[1-9]|1[0-2])-(0[1-9]|[12]\d|3[01]))$ example: '1990-01-30' description: Date of Birth `YYYY-MM-DD`. Must be older than 18 and younger than 120. incomeReported: type: number format: float deprecated: true description: Total gross monthly income from employment and other sources. _Deprecated - Use `employmentIncome` and `otherIncome` fields instead._ employmentIncome: type: number format: float example: 10000 description: Gross monthly income from employment. _Required if `employmentStatus` is "EMPLOYED", "SELF_EMPLOYED" or "MILITARY"._ otherIncome: type: array description: Monthly income from sources other than employment. items: allOf: - $ref: '#/components/schemas/OtherIncomeItemInput' creditScore: type: number example: 710 format: int64 maximum: 999 minimum: 300 deprecated: true description: 'Credit score. When provided must be a number between 300 and 999 or `null` to indicate that no credit score is available. This field has been **deprecated** and will be removed in a future version. Please update your queries accordingly. ' required: - name - address - phone - email - ssn - employment - dob AddressResidenceType: type: string description: "The type of residence at this address.\n\nBoth `BUYING` and `RENT` indicate the applicant has a monthly mortgage or rent payment. When either of these two\n`residenceType` values are provided, the `residenceMonthlyPayment` field is required and must be a positive integer.\n\nFor all other `residenceType` values, if the `residenceMonthlyPayment` field is provided, it is ignored and\n**NOT** submitted to lenders. All other `address` fields are the same regardless of `residenceType`.\n\n`BUYING`: The applicant has monthly mortgage payments.\n\n`MOBILE`: The applicant does not have a monthly payment.\n \n`OTHER`: The applicant does not have a monthly payment.\n\n`OWN`: The applicant does not have a monthly payment because they own their home outright.\n\n`RELATIVES`: The applicant does not have a monthly payment.\n\n`RENT`: The applicant has monthly rent payments." example: RENT enum: - BUYING - MOBILE - OTHER - OWN - RELATIVES - RENT IsSubvented: type: boolean description: Indicates that the rate in this offer contains a subvented or special rate. This influences rules relating to markup and rebate compatibility. FinanceTaxes: type: array title: Finance items: properties: amount: $ref: '#/components/schemas/TaxAmount' name: $ref: '#/components/schemas/TaxName' taxableAmount: $ref: '#/components/schemas/TaxableAmount' taxLineItems: $ref: '#/components/schemas/TaxLineItems' LoanApplicationDealerInput: type: object properties: code: type: string description: Identification assigned to dealer by AutoFi. Created via the `POST /dealer` endpoint (if submitting applications for multiple dealers) or will be provided by AutoFi. middleman: allOf: - $ref: '#/components/schemas/DecisionMiddlemen' description: Portal used to submit the credit applications to the lenders. middlemanId: type: string description: The dealer id used in the middleman portal on whose behalf the application will be submitted to the lender. state: type: string description: The dealer's state which the book values for collateral valuation are based on. required: - code TaxAmount: type: number example: 995.22 format: float minimum: 0 description: "Total amount for this tax. \n**Note**: For product specific taxes see `selectedProducts.tax`. \nFor Total taxes see `pricingStack.totalTaxes`.\n" LoanApplicationResponse: type: object properties: agentUrl: type: - string - 'null' example: https://example.com format: uri minLength: 1 description: 'URL to the agent experience. This URL is not intended for the customer, but for the customer service agent. Please contact your AutoFi rep for configuration and further details of this field. Note: This field is only active when a referenceId is associated with the loan application. See Create Loan Application.' customerProfile: type: string example: https://example.com format: uri minLength: 1 description: URL to the customer's profile in AutoFi Dealer Portal. Used by sales or customer support team. loanApplicationExpires: type: string format: date-time description: The date `url` is good until. loanApplicationId: type: string description: The unique identifier for the loan application created by the request. referenceId: type: - string - 'null' description: Partner's unique identifier for each credit application. Same `referenceId` as was provided to AutoFi. url: allOf: - $ref: '#/components/schemas/ConsumerUrlSchema' IncentiveOption: type: string title: Incentive Option description: The type of incentive the consumer is looking for. default: LOWEST_MONTHLY enum: - LARGEST_REBATE - LOWEST_APR - LOWEST_MONTHLY Term: type: integer title: Term description: Length of term in months. example: 24 exclusiveMinimum: 0 referenceId: type: - string - 'null' title: Product Reference ID example: 23b605f6-2a9e-11ec-8d3d-0242ac130003 description: Product identifier used to reference a product within a DMS. TaxItemsLease: type: object description: Tax items applied to estimated lease payment calculation. properties: capitalized: type: - array - 'null' description: Capitalized tax items. items: allOf: - $ref: '#/components/schemas/TaxItemLease' dueAtSigning: type: - array - 'null' description: Tax items due at signing. items: allOf: - $ref: '#/components/schemas/TaxItemLease' biweekly: type: - array - 'null' description: Bi-weekly tax items. items: allOf: - $ref: '#/components/schemas/TaxItemLease' monthly: type: - array - 'null' description: Monthly tax items. items: allOf: - $ref: '#/components/schemas/TaxItemLease' CreditOfferType: type: string title: Offer Type description: How the customer is financing the vehicle - `FINANCE` or `LEASE`. example: FINANCE enum: - FINANCE - LEASE schemas-tax: type: number example: 1745.25 format: float minimum: 0 description: The total taxes to be applied (should not include F&I Product taxes). DecisionMiddlemen: type: string enum: - routeOne - dealertrack MaritalStatus: type: string description: 'Marital status. Note: This field is optional, but it is recommended if the applicant or the dealer is in Wisconsin.' enum: - MARRIED - SEPARATED - UNMARRIED example: MARRIED PartialBasePricingStack: type: object description: Fields in common for FINANCE and LEASE. properties: amountFinanced: type: - number - 'null' format: float apr: type: - number - 'null' format: float description: Annual percentage rate. example: 0.02 buyRate: description: Dealer financing rate. type: - number - 'null' format: float example: 0.0275 monthlyPayment: type: - number - 'null' format: float example: 335.34 numberOfPayments: type: - integer - 'null' minimum: 0 description: Number of payments to make. example: 35 termMonths: type: - integer - 'null' description: Duration of the contract in months. totalRebates: type: - integer - 'null' description: Total rebate amount. example: 2499.99 totalOfPayments: type: - number - 'null' format: float description: Total paid for all payments. example: 13736.9 totalProducts: description: Total amount of all products including taxes. type: - number - 'null' format: float example: 115.5 ProductBaseInput: type: object title: Product description: Product information. properties: category: $ref: '#/components/schemas/ProductCategory' name: type: string description: Product description. example: Extended Warranty price: $ref: '#/components/schemas/price' termMiles: type: integer description: Product mileage limit. example: 100000 termMonths: type: integer description: Product duration. example: 60 LoanApplicationTradeInInput: type: object properties: amount: type: number format: float example: 5000.75 description: The difference between the value of the vehicle and payoff amount i.e. `bookValue` - `payoff`. bookValue: type: number format: float deprecated: true description: _Deprecated - The estimated market value of the vehicle. If submitted, this field is ignored._ class: type: string condition: allOf: - $ref: '#/components/schemas/TradeInCondition' leaseAnnualMiles: type: integer example: 15000 description: _Required if terminatingLease is true._ Miles a leased vehicle can be driven annually before the penalty is triggered. exclusiveMinimum: 0 leaseMonthlyPayment: type: number format: float example: 350.45 description: _Required if `terminatingLease` is true._ Monthly payment for leased vehicle. leaseNumRemainingPayments: type: integer example: 6 minimum: 0 description: _Required if `terminatingLease` is true._ How many months are left until the lease terms are fulfilled. leasePenaltyPerExcessMile: type: number format: float example: 1.5 description: _Required if `terminatingLease` is true._ Penalty for driving more than leaseAnnualMiles per year. Calculated on a per mile basis. leaseTerm: type: integer example: 24 description: _Required if `terminatingLease` is true._ Length of lease term in months. exclusiveMinimum: 0 make: type: string minLength: 1 example: FORD description: Trade-in vehicle make. mileage: type: integer example: 40000 minimum: 0 description: Number of miles (US) or km (Canada) on vehicle. model: type: string minLength: 1 example: Mustang description: Trade-in vehicle model. ownership: type: string payoff: type: number example: 3500.75 format: float maximum: 999999 minimum: 0 description: The payoff amount the customer needs to pay to satisfy the terms of their vehicle loan. series: type: string style: type: string terminatingLease: type: boolean description: Determines whether the trade-in is a leased vehicle. vin: type: string example: 1FATP8FFXJ5139341 maxLength: 17 minLength: 17 pattern: ^[a-zA-Z0-9]{17}$ description: Trade-in vehicle Identification Number. Must be 17 alphanumeric characters. year: type: integer example: 2018 minimum: 1990 description: Trade-in vehicle year. financeCompany: description: The finance company (lienholder) on the trade-in. type: object properties: name: type: string example: FMCC description: Name of the finance company. required: - amount - make - model - payoff - year DecisioningOfferPreferences: type: object properties: annualMileage: type: integer example: 10000 description: Miles the consumer would prefer when leasing a vehicle exclusiveMinimum: 0 apr: $ref: '#/components/schemas/Apr' downPayment: $ref: '#/components/schemas/DownPayment' incentiveOption: $ref: '#/components/schemas/IncentiveOption' isSubvented: $ref: '#/components/schemas/IsSubvented' requestedOfferType: $ref: '#/components/schemas/CreditOfferType' term: $ref: '#/components/schemas/Term' required: - downPayment - requestedOfferType - term RebateType: example: CASH description: Default is `CASH`. type: string enum: - CASH - FINANCE_RATE - LEASE_RATE FinancePricingStack: title: Finance type: object description: This fields are only applicable to `FINANCE`. allOf: - $ref: '#/components/schemas/BasePricingStack' properties: downPayment: type: - integer - 'null' description: Amount the consumer is putting down towards the vehicle. example: 3500.01 financeCharge: type: - number - 'null' format: float description: Finance charge calculated based on the `amountFinanced`, `apr` and `termMonths`. example: 345.01 taxItems: type: array description: Tax items have now been `deprecated` in favor of the standardized `appliedTaxes` field. items: type: object allOf: - $ref: '#/components/schemas/TaxItem' deprecated: true example: name: Municipal Tax price: 87.99 totalTax: 87.99 amountFinanced: description: Total amount financed for the vehicle. example: 2269.57 monthlyPayment: description: Total monthly payment. offerType: description: Type of offer. termMonths: description: Duration of the `FINANCE` contract in months. example: 48 totalTaxes: description: "Total amount of all vehicle and products taxes. \n**Notes:** For vehicle specific taxes see `appliedTaxes.amount`. \nFor product specific taxes see `selectedProducts.tax`.\n" type: - number - 'null' format: float example: 6513.67 totalFees: description: Total amount of all fees. type: - number - 'null' format: float example: 250 TaxItem: type: object properties: name: type: - string - 'null' price: type: - number - 'null' format: float totalTax: type: - number - 'null' format: float LoanApplicationData: type: object properties: afExperienceCompleted: type: - boolean - 'null' description: This flag is `true` when a customer has completed the last step in the AutoFi experience. appliedFees: description: Fees applied to the loan application anyOf: - $ref: '#/components/schemas/schemas-FinanceFees' - $ref: '#/components/schemas/LeaseFees' appliedTaxes: description: Taxes applied to the loan application anyOf: - $ref: '#/components/schemas/FinanceTaxes' - $ref: '#/components/schemas/LeaseTaxes' creditScore: type: integer minimum: 300 maximum: 999 description: Credit score. Number between 300 and 999. decisions: type: - array - 'null' items: allOf: - $ref: '#/components/schemas/Decision' loanApplicationId: type: string offerAvailable: type: - boolean - 'null' description: This flag is `true` if an offer is available to be displayed to a consumer. offerPreferences: type: object properties: annualMileage: type: - integer - 'null' example: 1 minimum: 1 description: Miles the consumer would prefer when leasing a vehicle apr: type: number format: float description: Annual percentage rate in decimals downPayment: type: integer example: 1 minimum: 0 description: Amount the consumer is putting down towards the vehicle incentiveOption: allOf: - $ref: '#/components/schemas/IncentiveOption' description: 'Default: `LOWEST_MONTHLY`' isSubvented: type: boolean description: Indicates that the rate in this offer contains a subvented or special rate. This influences rules relating to markup and rebate compatibility. requestedOfferType: allOf: - $ref: '#/components/schemas/CreditOfferType' description: How the customer is financing the vehicle - "FINANCE" or "LEASE". term: type: integer example: 1 minimum: 1 description: Length of term in months pricingStack: description: Pricing information for a loan application. Only available after the state is `ACCEPTED`. oneOf: - $ref: '#/components/schemas/FinancePricingStack' - $ref: '#/components/schemas/LeasePricingStack' referenceId: type: - string - 'null' description: Partner's unique identifier for each credit application. Same `referenceId` as was provided to AutoFi. selectedProducts: type: array description: Selected products. items: allOf: - $ref: '#/components/schemas/BaseSelectedProduct' type: object properties: monthlyPayment: type: - number - 'null' example: 1 format: float minimum: 0 description: Monthly payment over the finance term including the finance charge. state: description: '

The current state of the loan application within the decisioning flow. The various states are detailed in the state diagram below.

Loan Application State Diagram ' type: - string - 'null' enum: - ACCEPTED - APPROVED - BEGAN_APPLICATION - DECLINED - ERROR - FI_COMPLETED - PENDING - SUBMITTED tradeIn: description: Trade in information. type: object allOf: - $ref: '#/components/schemas/TradeIn' FeeName: type: string description: The name of the fee. This fee varies per application and is different from dealer fees that are constant across all applications. example: Shipping fee. EducationLevel: type: string description: 'Education level. Note: This field is optional, but it is required to receive a decision for New Toyota and Lexus vehicles.' enum: - FOUR_YR_COLLEGE_GRAD - TWO_YR_COLLEGE_GRAD - SPECIALITY_TRAINING - SOME_COLLEGE - HS_GRAD - NOT_HS_GRAD - UNKNOWN example: HS_GRAD OtherIncomeItemInput: type: object properties: amount: type: number example: 1 format: float minimum: 0 source: type: string description: 'e.g. - Aid for Dependent Children - Child Support - Cost of Living Allowance (COLA) - Disability - Family Subsistence Supplemental Allowance (FSSA) - Housing Allowances - Military Basic Allowance for Subsistence (BAS) - Municipal Bond Interest - Other Non-Taxable Sources of Income - Other - Public Assistance - Railroad Pension - Second Employer - Social Security Benefits - Tips - Workman''s Compensation ' example: Social Security Benefits required: - amount - source ConsumerUrlSchema: type: string title: Consumer URL example: https://example.com format: uri minLength: 1 description: URL to the consumer experience. The url expires 30 days after creation. TradeInCondition: description: Condition for the trade-in vehicle type: string enum: - EXCELLENT - FAIR - GOOD - POOR - VERY_GOOD TaxLineItems: type: array description: '

ExperimentalThe breakdown of the tax amount by jurisdiction. Each tax line item contains the tax rate and corresponding amount for each jurisdiction or tax authority.

' items: properties: jurisdiction: type: object description: The jurisdiction responsible for the tax line item. properties: type: type: string example: STATE description: Type of jurisdiction. enum: - STATE - CITY - COUNTY - DISTRICT name: type: string example: COLORADO description: Name of the jurisdiction. imposition: type: string example: General Sales and Use Tax description: Name of the tax imposition. tax: type: object description: Tax rate and amount calculated for the jurisdiction. properties: rate: type: number format: float minimum: 0 maximum: 1 example: 0.029 description: Tax rate. amount: type: number format: float minimum: 0 example: 995.22 description: Tax amount. RebateTypeInput: example: CASH description: Default is `CASH`. type: string enum: - CASH - LEASE_RATE - FINANCE_RATE AppliedLeasePricingStackFigures: properties: appliedToCap: description: Breakdown of capitalized costs. properties: downPayment: description: Cash applied to the capitalized costs. example: 0 format: float type: - number - 'null' rebates: description: Rebates applied to the capitalized costs. example: 0 format: float type: - number - 'null' tradeIn: description: Trade-in applied to the capitalized costs. example: 0 format: float type: - number - 'null' type: object appliedToSigning: description: Breakdown of costs applied at signing. properties: downPayment: description: Cash applied to signing costs. example: 2000 format: float type: - number - 'null' rebates: description: Rebates applied to signing costs. example: 2499.99 format: float type: - number - 'null' tradeIn: description: Trade-in applied to signing costs. example: 3600 format: int64 type: - number - 'null' type: object ProductCategory: type: string title: Product Category description: Product category. example: VSC enum: - GAP_WAIVER - OTHER - VSC RebateBaseInput: type: object properties: amount: type: number example: 2499.99 format: float description: The rebate amount. exclusiveMinimum: 0 disclaimer: type: string description: Disclaimer for the rebate. Displayed as a tooltip next to each rebate line item. example: Rebate Disclaimer isDiscount: type: boolean default: false description: When `true` the `amount` is included in `discounts` instead of as a rebate line item. This can also affect the tax calculation (unless tax is submitted). isQualifiedOffer: type: boolean default: false description: Indicates that the rebate is only available under certain conditions. For example special rebates for students or military. name: type: string minLength: 1 description: Description of the rebate to be shown to the customer. example: VA Rebate PricingStackRebateOutput: type: object title: Rebate properties: amount: type: number format: float example: 2499.99 disclaimer: type: string description: Disclaimer for the rebate. example: Veterans only Rebate expiryDate: type: - string - 'null' format: date description: Rebate expiry date. example: 12-01-2024 isDiscount: type: boolean default: false description: When `true` the `amount` is included in `discounts` instead of as a rebate line item. This can also affect the tax calculation. example: true isPrivateOffer: type: boolean default: false description: Indicates that the rebate is a private offer for the applicant. example: false isQualifiedOffer: type: boolean default: false description: Indicates that the rebate is only available under certain conditions. For example special rebates for students or military. example: true name: type: string description: Description of the rebate to be shown to the customer. example: VA Rebate programId: type: string description: Unique identifier for the rebate program. example: VA_1234 type: $ref: '#/components/schemas/RebateType' FeeAmount: type: number example: 249.99 format: float minimum: 0 SimulatedDecisionState: type: string title: Decision State description: The lender response to return for the simulated decision example: DECLINED enum: - APPROVED - DECLINED - PENDING - APPROVED_WITH_COUNTEROFFER - CONDITIONAL - CONDITIONAL_WITH_COUNTEROFFER TaxPlacement: type: string enum: - BIWEEKLY - CAPITALIZED - DUE_AT_SIGNING - MONTHLY description: '`CAPITALIZED` means that the tax will be added to the Gross Capitalization Cost of the lease. `DUE_AT_SIGNING` means that the tax will be added to the Due at Signing Calculation and thus deducted from the down payment. `BIWEEKLY` and `MONTHLY` taxes are taxes applied to the biweekly or monthly payments.' price: type: number example: 100 format: float minimum: 0 description: Pretax price. ProgramId: type: string description: Unique identifier for the rebate program. When submitting a rebate with isQualifiedOffer as `true` the programId is required. example: VA_1234 FeeInput: type: object properties: amount: type: number example: 249.99 format: float minimum: 0 description: The amount of the fee. isTaxable: type: boolean name: type: string description: The name of the fee. This fee varies per application and is different from dealer fees that are constant across all applications. code: allOf: - $ref: '#/components/schemas/FeeCodeInput' feePlacement: allOf: - $ref: '#/components/schemas/FeePlacementInput' description: Applies only when `requestedOfferType` is "LEASE". Defaults to `GROSS_CAP`. `GROSS_CAP` means that the fee will be added to the Gross Capitalization Cost of the lease. `DUE_AT_SIGNING` means that the fee will be added to the Due at Signing Calculation and thus deducted from the down payment. required: - amount - name FeeCode: example: SHIPPING_FEE description: 'Default is `OTHER`. Note: The `SHIPPING_FEE` is added to the vehicle''s sales price when submitted to the middleman.' type: string enum: - DOC_FEE - OTHER - SHIPPING_FEE - TIRE_FEE - TITLE_REG DecisioningVehicleInput: type: object properties: age: allOf: - $ref: '#/components/schemas/InputVehicleAge' bodyType: type: string example: Fastback description: Vehicle body type. color: type: string example: blue description: Vehicle color. dealerRetailPrice: type: integer example: 30995 description: The vehicle's price. exclusiveMinimum: 0 invoice: type: number example: 29850.75 format: float minimum: 0 description: The initial price for the vehicle from the manufacturer. _Must be a positive number when `age` is `NEW`._ maintenanceCosts: type: object make: type: string example: FORD description: Vehicle make. mileage: type: integer example: 35684 minimum: 0 description: Number of miles (US) or km (Canada) on vehicle. _Required if `age` is `USED` or `CPO`._ model: type: string example: Mustang description: Vehicle model. modelCode: type: string example: P8T description: The code for the model provided by the manufacturer. This field is optional but recommended for new vehicles since it improves accuracy, e.g. determining the correct rebates. msrp: type: number format: float example: 34950.65 description: Manufacturer Suggested Retail Price. _Required if `age` is `NEW`._ stockNumber: type: string example: FCL1425 description: Vehicle stock number in dealer's inventory. Displayed in customer profile page in AutoFi Dealer Portal. trim: type: string description: Vehicle trim. vin: type: string example: 1FATP8FFXJ5139341 maxLength: 17 minLength: 17 pattern: ^[a-zA-Z0-9]{17}$ description: Vehicle Identification Number. Must be 17 alphanumeric characters. year: type: integer example: 2020 minimum: 1900 description: Vehicle year. photoUrl: type: string example: https://example.com/my/vehicle/photo.jpg format: uri minLength: 1 description: A valid URL to be used for showing the vehicle within the offer experience and customer profile page in AutoFi Dealer Portal. fuelType: description: Fuel type used by the vehicle engine. type: string default: GASOLINE example: GASOLINE enum: - ELECTRIC - GASOLINE - HYBRID required: - age - dealerRetailPrice - make - model - vin - year FeePlacementInput: type: string enum: - GROSS_CAP - DUE_AT_SIGNING schemas-FeeCodeInput: example: SHIPPING_FEE description: 'Default is `OTHER`.
Note: The `SHIPPING_FEE` is added to the vehicle''s sales price when submitted to the middleman.
All fee types will be taxable based upon the appropriate jurisdiction with the exception of `OTHER`.' type: string enum: - DOC_FEE - OTHER - SHIPPING_FEE - TIRE_FEE - TITLE_REG tax: type: number example: 15.5 format: float minimum: 0 description: "Tax amount for the product. Defaults to 0. \n**Notes:** Does not include vehicle taxes. \n For vehicle specific taxes see `appliedTaxes.amount`. \n For Total taxes see `pricingStack.totalTaxes`.\n" ProductInput: allOf: - $ref: '#/components/schemas/ProductBaseInput' properties: isTaxable: type: boolean example: true default: false description: Flag indicating whether this product is taxable or not. When `tax` is set to a `non-zero` amount then `isTaxable` is automatically set to true. In the case that zero or no `tax` is provided and `isTaxable` is `true`, the `tax` is calculated and included in the deal. tax: $ref: '#/components/schemas/tax' required: - category - name - price Apr: type: number format: float example: 0.02 description: Annual percentage rate in decimals e.g. if the apr is 2% this should be 0.02 message: type: string description: HTTP status description. DownPayment: type: integer title: Down Payment description: Amount the consumer is putting down towards the vehicle. example: 3000 minimum: 0 ValidationError: description: "Array of validation input errors found in the payload:\n - Required field not provided\n - Field can not be null\n - Field must be an object\n - Field is not a defined field\n - Field is invalid\n" allOf: - $ref: '#/components/schemas/errors' ApplicantBaseNameInput: title: Name description: Names must start with one or more alphanumeric characters, and may be followed by one special character as long as that special character is followed by one or more alphanumeric characters. A name may also end with a period. type: object required: - first - last properties: first: description: First name example: Mrs. Jamie-Lynn type: string minLength: 1 pattern: ^[a-zA-ZÀ-ÿ0-9#]+(([',. -]+[a-zA-ZÀ-ÿ0-9 ])?[a-zA-ZÀ-ÿ0-9 .-/#’&]*)*$ last: description: Last name example: O'Rourke-Van Winkle type: string minLength: 1 pattern: ^[a-zA-ZÀ-ÿ0-9#]+(([',. -]+[a-zA-ZÀ-ÿ0-9 ])?[a-zA-ZÀ-ÿ0-9 .-/#’&]*)*$ ApplicantEmploymentInput: type: object properties: employerName: type: string description: Name of employer. _Required if `employmentStatus` is "EMPLOYED", "STUDENT", "OTHER" or "SELF_EMPLOYED"._ jobTitle: type: string description: _Required if `employmentStatus` is "EMPLOYED", "OTHER" or "MILITARY"._ timeInMonths: type: integer example: 1 minimum: 0 description: Number of months working for this employer. If less than 24 please include `previousEmployment`. employerPhone: type: string example: '5554443333' maxLength: 10 minLength: 10 pattern: ^[2-9][0-9]{9}$ description: A valid phone number. _Required if `employmentStatus` is "EMPLOYED"._ employerCity: type: string description: Address city. employerStreet: type: string description: Address street line 1. employerStreet2: type: string description: Address street line 2. employerState: example: WI type: string description: Two character code for state (US). employerZip: example: '12345' type: string description: 5 character zip (US) / postal code (Canada). employmentStatus: allOf: - $ref: '#/components/schemas/EmploymentStatus' required: - employmentStatus - timeInMonths schemas-referenceId: type: string example: my-reference-id description: Partner's unique identifier for each credit application. When provided, the loan application previously created for the given `referenceId` is returned instead of creating a new one. EmailInput: type: string example: fake@example.com format: email minLength: 1 title: Email description: 'An email is an ASCII string separated into two parts by the @ symbol (local_part@domain). The local_part may contain uppercase (A-Z) and lowercase (a-z) ASCII characters, digits (0-9), special characters (+, -, _, !, #, $, %, &, , *, /, =, ?, ^, `, {, |, }, ~) and the . character. The domain part of an email may contain letters, digits, hyphens and periods. The top level domain (TLD) portion of the domain must also be published by IANA to be considered valid. See https://tools.ietf.org/html/rfc2822#section-3.4.1 for more information.' ExternalResources: type: object properties: dms: $ref: '#/components/schemas/DmsExternalResources' FeeCodeInput: example: SHIPPING_FEE description: 'Default is `OTHER`. Note: The `SHIPPING_FEE` is added to the vehicle''s sales price when submitted to the middleman.' type: string enum: - DOC_FEE - OTHER - SHIPPING_FEE - TIRE_FEE - TITLE_REG SimulateEnvironment: type: string title: Environment description: Use `LENDER_TEST` to test End to End with R1/DT Lender Test Environment. Use `AUTOFI_TEST` to test with the AutoFi Test Environment (requires an array of `decisions` to be simulated). Defaults to `AUTOFI_TEST`. example: AUTOFI_TEST enum: - LENDER_TEST - AUTOFI_TEST FeePlacement: type: string enum: - GROSS_CAP - DUE_AT_SIGNING description: '`GROSS_CAP` means that the fee will be added to the Gross Capitalization Cost of the lease. `DUE_AT_SIGNING` means that the fee will be added to the Due at Signing Calculation and thus deducted from the down payment.' RebateInput: allOf: - $ref: '#/components/schemas/RebateBaseInput' properties: isPrivateOffer: type: boolean default: false description: Indicates that the rebate is a private offer for the applicant. programId: $ref: '#/components/schemas/ProgramId' type: $ref: '#/components/schemas/RebateTypeInput' required: - amount - name SimulatedDecision: title: Simulated Decision properties: decision: $ref: '#/components/schemas/SimulatedDecisionState' delay: type: integer example: 75000 description: Specify how long it should take for this simulated decision to return in milliseconds. lender: type: string example: CHASE description: "The lender that decision should be simulated for.\nThese are the lender codes available to use:\n - ALLY \n - BOFA \n - CHASE \n - EXETER \n - FIFS \n - FMCC \n - GLS \n - GMFL \n - HBAN \n - LAFSNC \n - RBC \n - SANT \n - SCF \n - SETF \n - TRICOR \n - VROOM \n - WEST\n" middleman: allOf: - $ref: '#/components/schemas/DecisionMiddlemen' description: The middleman that the decision should be simulated from. required: - decision - lender code: type: integer description: HTTP status code. LeaseFees: type: array title: Lease items: properties: amount: $ref: '#/components/schemas/FeeAmount' code: $ref: '#/components/schemas/FeeCode' feePlacement: $ref: '#/components/schemas/FeePlacement' name: $ref: '#/components/schemas/FeeName' DmsExternalResources: description: 'Grouping of external resources within Dealer Management Systems (DMS) associated with the loan application. ' type: object properties: cdk: $ref: '#/components/schemas/CdkDmsExternalResource' schemas-FinanceFees: type: array title: Finance items: properties: amount: $ref: '#/components/schemas/FeeAmount' code: $ref: '#/components/schemas/FeeCode' name: $ref: '#/components/schemas/FeeName' BasePricingStack: type: object description: Fields in common for FINANCE and LEASE. allOf: - $ref: '#/components/schemas/PartialBasePricingStack' properties: dealerDiscountFee: type: - number - 'null' format: float description: Fee charged by the lender to the dealer for underwriting certain loan applications. example: 20.01 lenderName: type: - string - 'null' description: Lender name for the accepted offer. example: BoA rebates: type: array description: 'List of applied rebates. Note: they will only be returned after an offer has been selected.' items: $ref: '#/components/schemas/PricingStackRebateOutput' offerType: type: string enum: - FINANCE - LEASE - CASH tradeInAmount: type: number format: float example: 5000.75 description: The difference between the value of the trade-in vehicle and its payoff amount. Will always be 0 if the `isApplied` field of the trade-in vehicle is `false`. errors: type: array items: properties: description: type: string description: Error description. DecisioningCoApplicantInput: type: object properties: name: allOf: - $ref: '#/components/schemas/ApplicantFullNameInput' address: allOf: - $ref: '#/components/schemas/ApplicantAddressInput' - description: Cosigner residence information. - example: street: 4390 Norris Ln street2: '' city: Detroit state: MI zip: '48208' residenceType: BUYING residenceTimeInMonths: 60 residenceMonthlyPayment: 2000 previousAddress: allOf: - $ref: '#/components/schemas/ApplicantAddressInput' - description: 'Cosigner previous residence information. Recommended when the cosigner has lived at the current address for less than 2 years. ' - example: street: 2198 Dorothy Tr street2: '' city: Detroit state: MI zip: '48216' residenceType: OTHER residenceTimeInMonths: 12 residenceMonthlyPayment: 0 phone: type: string example: '5554443333' maxLength: 10 minLength: 10 pattern: ^[2-9][0-9]{9}$ description: A valid 10 digit phone number. email: type: string example: fake@example.com format: email minLength: 1 description: A valid email address. ssn: type: string example: '666554444' maxLength: 9 minLength: 9 pattern: ^\d{9}$ description: 'Social Security Number / ITIN in US. Note: The application is only submitted to lenders that support ITIN. ' maritalStatus: allOf: - $ref: '#/components/schemas/MaritalStatus' educationLevel: allOf: - $ref: '#/components/schemas/EducationLevel' employment: allOf: - $ref: '#/components/schemas/ApplicantEmploymentInput' previousEmployment: allOf: - $ref: '#/components/schemas/ApplicantEmploymentInput' dob: type: string format: date pattern: ^([12]\d{3}-(0[1-9]|1[0-2])-(0[1-9]|[12]\d|3[01]))$ example: '1990-01-30' description: Date of Birth `YYYY-MM-DD`. Must be older than 18 and younger than 120. incomeReported: type: number format: float deprecated: true description: Total gross monthly income from employment and other sources. _Deprecated - Use `employmentIncome` and `otherIncome` fields instead._ employmentIncome: type: number format: float example: 10000 description: Gross monthly income from employment. _Required if `employmentStatus` is "EMPLOYED", "SELF_EMPLOYED" or "MILITARY"._ otherIncome: type: array description: Monthly income from sources other than employment. items: allOf: - $ref: '#/components/schemas/OtherIncomeItemInput' relationship: deprecated: true allOf: - $ref: '#/components/schemas/Relationship' description: _Deprecated - Use `relationshipCode` instead._ relationshipCode: allOf: - $ref: '#/components/schemas/Relationship' required: - name - address - phone - email - ssn - employment - dob TradeIn: type: object properties: amount: type: number format: float example: 5000.75 description: The difference between the value of the vehicle and payoff amount i.e. `bookValue` - `payoff`. bookValue: type: number format: float description: The estimated market value of the vehicle. deprecated: true class: type: string condition: allOf: - $ref: '#/components/schemas/TradeInCondition' financeCompany: description: The finance company (lienholder) on the trade-in. type: object properties: name: type: string example: FMCC description: Name of the finance company. isApplied: type: boolean example: true description: Indicates whether or not the trade-in is applied to the loan application. leaseAnnualMiles: type: integer example: 15000 minimum: 1 description: Miles a leased vehicle can be driven annually before the penalty is triggered. leaseMonthlyPayment: type: number format: float example: 350.45 description: Monthly payment for leased vehicle. leaseNumRemainingPayments: type: integer example: 6 minimum: 0 description: How many months are left until the lease terms are fulfilled. leasePenaltyPerExcessMile: type: number format: float example: 1.5 description: Penalty for driving more than leaseAnnualMiles per year. Calculated on a per mile basis. leaseTerm: type: integer example: 24 minimum: 1 description: Length of lease term in months. make: type: string minLength: 1 example: FORD description: Trade-in vehicle make. mileage: type: integer example: 40000 minimum: 0 description: Number of miles (US) or km (Canada) on vehicle. model: type: string minLength: 1 example: Mustang description: Trade-in vehicle model. ownership: type: string description: Current status of ownership, eg. `"owned"`, `"financed"` payoff: type: number format: float example: 3500.75 description: The payoff amount the customer needs to pay to satisfy the terms of their vehicle loan. series: type: string style: type: string terminatingLease: type: boolean description: Determines whether the trade-in is a leased vehicle. vin: type: string example: 1FATP8FFXJ5139341 maxLength: 17 minLength: 17 pattern: ^[a-zA-Z0-9]{17}$ description: Trade-in vehicle Identification Number. Must be 17 alphanumeric characters. year: type: integer example: 2018 minimum: 1990 description: Trade-in vehicle year. LeasePricingStack: type: object title: Lease description: This fields are only applicable to `LEASE`. allOf: - $ref: '#/components/schemas/AppliedLeasePricingStackFigures' - $ref: '#/components/schemas/BasePricingStack' example: amountFinanced: 23967.14 annualMileage: 12000 apr: 6.25 buyRate: 3.875 cashAppliedToCap: 4500 capReduction: 7018.44 dealerDiscountFee: 20.01 depreciation: 17125.97 grossCap: 46127.96 leaseCharge: 6313.76 lenderName: Bank of AutoFi moneyFactor: 0 monthlyPayment: 389.76 netCap: 39109.52 numberOfPayments: 36 offerType: LEASE rebates: {} residualPercentage: 0.51 residualValue: 21983.55 totalDueAtSigning: 2000 taxItems: {} termMonths: 48 totalOfPayments: 606.61 totalProducts: 606.61 totalRebates: 123.45 totalTaxes: 367.61 properties: annualMileage: description: Miles or km associated with the offer. example: 12000 type: - integer - 'null' cashAppliedToCap: description: Cash Applied to the Capitalized Cost. type: - number - 'null' example: 4500 format: float capReduction: description: Capitalized Cost Reduction. The sum of the cash, rebates and trade in. This will be subtracted from the Gross Capitalization Cost. type: - number - 'null' example: 7018.44 format: float depreciation: description: The amount of the vehicle will depreciate over the life of the term. type: - number - 'null' example: 17125.97 format: float grossCap: description: Gross Capitalization Cost. The total amount that will be applied to the loan. format: float example: 46127.96 type: - number - 'null' leaseCharge: description: The lease charge is an interest applied to the total financing of the vehicle. type: - number - 'null' example: 6313.76 format: float moneyFactor: description: The money factor is the financing charge a person will pay on a lease. type: - number - 'null' example: 0 format: float netCap: description: Net Capitalization Cost. type: - number - 'null' example: 39109.52 format: float residualPercentage: description: Value of the vehicle at the end of the term expressed as a percentage of the sale price. type: - number - 'null' example: 0.51 format: float residualValue: description: Value of the vehicle at the end of the term. type: - number - 'null' example: 21983.55 format: float taxItems: deprecated: true description: Tax items have now been `deprecated` in favor of the standardized `appliedTaxes` field. type: object $ref: '#/components/schemas/TaxItemsLease' totalCapitalizedFees: description: Total amount of applied fees with a fee placement of `GROSS_CAP`. type: - number - 'null' example: 2000 format: float totalDueAtSigning: description: Total amount of fees and/or charges that will be due upon signing. type: - number - 'null' example: 2000 format: float totalSigningFees: description: Total amount of applied fees with a fee placement of `DUE_AT_SIGNING`. type: - number - 'null' example: 2000 format: float totalTaxes: type: - number - 'null' format: float deprecated: true description: '`totalTaxes` has been `deprecated` for LEASE applications' example: 367.61 SimulateInput: type: object title: Simulate description: 'Request a test response from one or more lenders. When omitted, the loan application is handled according to the default rules defined for the environment. In uat, the AutoFi Test Environment is used and approvals are returned for all lenders. In production, the loan application is submitted to R1/DT for `live` decisioning. ' properties: environment: $ref: '#/components/schemas/SimulateEnvironment' decisions: title: Simulated Decision description: The decisions to be simulated. items: $ref: '#/components/schemas/SimulatedDecision' CdkDmsExternalResource: description: 'External resources associated with the loan application within the CDK Dealer Management System. This field is only present in the response when an offer has been accepted on the loan application and linked in the CDK DMS. ' type: - object - 'null' properties: customer: type: - object - 'null' properties: id: description: Unique identifier for the `customer` record within the CDK system. example: '18185' type: string deal: type: - object - 'null' properties: id: description: Unique identifier for the `deal` record within the CDK system. type: string example: '50512' dealer: type: - object - 'null' properties: id: description: Unique identifier for the `dealer` resource within the CDK system. type: string example: 3PADEVWB PhoneInput: type: string example: '5554443333' maxLength: 10 minLength: 10 pattern: ^[2-9][0-9]{9}$ description: A valid 10 digit phone number. responses: CreateLoanApplication: description: BadRequest content: application/json: schema: type: object properties: code: $ref: '#/components/schemas/code' message: $ref: '#/components/schemas/message' errors: $ref: '#/components/schemas/ValidationError' example: errors: - description: Field "applicant.name.first" can not be null. - description: Field "applicant.name.last" can not be null. - description: 'Field "applicant.name.middle" is invalid: String cannot represent a non string value: 11.' - description: 'Field "applicant.address.street" is invalid: Must be a non-empty string.' - description: 'Field "applicant.address.street2" is invalid: String cannot represent a non string value: 2.' - description: Field "applicant.address.city" can not be null. - description: Field "applicant.address.state" can not be null. - description: Field "applicant.address.zip" can not be null. - description: 'Field "applicant.address.residenceType" is invalid: Value "" does not exist in "AddressResidenceType" enum.' - description: 'Field "applicant.address.residenceTimeInMonths" is invalid: Must be an integer greater than or equal to 0.' - description: 'Field "applicant.address.residenceMonthlyPayment" is invalid: Must be an integer greater than or equal to 0.' - description: Field "applicant.previousAddress.street" can not be null. - description: Field "applicant.previousAddress.city" can not be null. - description: Field "applicant.previousAddress.zip" can not be null. - description: Field "applicant.previousAddress.residenceType" can not be null. - description: 'Field "applicant.previousAddress.residenceTimeInMonths" is invalid: Must be an integer greater than or equal to 0.' - description: 'Field "applicant.previousAddress.residenceMonthlyPayment" is invalid: Must be an integer greater than or equal to 0.' - description: 'Field "applicant.phone" is invalid: Must be a valid 10 digit phone number.' - description: 'Field "applicant.email" is invalid: Email cannot represent an invalid email address value: invalid@mail@org.' - description: 'Field "applicant.ssn" is invalid: Must be a valid 9 digit social security number not beginning with "9".' - description: 'Field "applicant.employment.employerName" is invalid: String cannot represent a non string value: 0.' - description: 'Field "applicant.employment.jobTitle" is invalid: String cannot represent a non string value: false.' - description: Field "applicant.employment.timeInMonths" can not be null. - description: 'Field "applicant.employment.employerPhone" is invalid: Must be a valid 10 digit phone number.' - description: 'Field "applicant.employment.employerCity" is invalid: String cannot represent a non string value: 11.' - description: 'Field "applicant.employment.employerZip" is invalid: String cannot represent a non string value: 1010010.' - description: 'Field "applicant.employment.employmentStatus" is invalid: Value "" does not exist in "EmploymentStatus" enum.' - description: 'Field "applicant.previousEmployment.jobTitle" is invalid: String cannot represent a non string value: 0.' - description: 'Field "applicant.previousEmployment.timeInMonths" is invalid: Must be an integer greater than or equal to 0.' - description: 'Field "applicant.previousEmployment.employerCity" is invalid: String cannot represent a non string value: 0.' - description: 'Field "applicant.previousEmployment.employerZip" is invalid: String cannot represent a non string value: false.' - description: Field "applicant.previousEmployment.employmentStatus" can not be null. - description: 'Field "applicant.dob" is invalid: Date cannot represent non string type 1090.' - description: 'Field "applicant.incomeReported" is invalid: Float cannot represent non numeric value: "".' - description: 'Field "applicant.employmentIncome" is invalid: Float cannot represent non numeric value: "".' - description: 'Field "applicant.otherIncome[0].amount" is invalid: Must be a float greater than or equal to 0.' - description: Field "applicant.otherIncome[0].source" can not be null. - description: 'Field "applicant.creditScore" is invalid: Must be an integer between 300 and 999 (inclusive).' - description: 'Field "callbackUrl" is invalid: Must be a valid URL.' - description: Field "dealer.code" can not be null. - description: 'Field "offerPreferences.annualMileage" is invalid: Must be an integer greater than 0.' - description: 'Field "offerPreferences.downPayment" is invalid: Must be an integer greater than or equal to 0.' - description: 'Field "offerPreferences.requestedOfferType" is invalid: Value "" does not exist in "RequestedOfferType" enum.' - description: 'Field "offerPreferences.term" is invalid: Must be an integer greater than 0.' - description: Field "products[0].name" can not be null. - description: 'Field "products[0].price" is invalid: Must be a float greater than or equal to 0.' - description: Field "products[0].category" can not be null. - description: 'Field "products[0].tax" is invalid: Must be a float greater than or equal to 0.' - description: 'Field "rebates[0].disclaimer" is invalid: String cannot represent a non string value: -1.' - description: Too many errors processing variables, error limit reached. Execution aborted. - description: 'Something went wrong: Dealer not found using code: AAAAA' ExternalResourcesResponse: description: Resources grouped by external system type. content: application/json: schema: $ref: '#/components/schemas/ExternalResources' parameters: LoanApplicationIdParam: in: path name: loanApplicationId schema: type: string minLength: 24 maxLength: 24 example: 6148d994e93d8a0018be1234 required: true description: The `loanApplicationId` in the response when the loan application was created. securitySchemes: bearerAuth: description: 'Get access to data while protecting your account credentials. ' type: http scheme: bearer bearerFormat: Bearer {token}