Overview
The Line5 API v1 connects your application to the Line5. Your application can use the API to create quotes and finalize them.
All API access is over HTTPS, and accessed from the www.line5.com/api/v1 domain. Request and response payloads are formatted as application/vnd.api+json
, which is compliant with the JSON API standard. We support cross-origin resource sharing to allow you to interact securely with our API from a client-side web application. All API requests must be authenticated or you will receive a 401 Unauthorized error response (see Authentication).
Prerequisites
A digital copy of every protection to be sold via the Line5 API must be provided, including registration page and all disclosure pages or booklet. Line5 must review and approve every product sold.
Once each product is approved, Line5 will provide a unique ID(see Protections) to be used by the API for that specific product.
Important
Keep in mind, if a new revision of the product is released, the approval process must be repeated.
Process Flow
Users Endpoint
Every Quote needs an active User of your dealership assigned to. You can fetch your active users via the Users endpoint.
Protections Endpoint
In order to set up a valid quote, you'll need at least one of your accessible protections. You'll need to request it from the Protections endpoint.
Quote Creation
To create a quote you'll need to post the required information to the Quotes endpoint. You'll be able to change and update your quote until you finalize it, which will turn your quote into a loan. A finalized quote can not be updated anymore.
Authentication
To authorize, use this code:
# With shell, you can just pass the correct header with each request
curl "api_endpoint_here"
-H "Authorization: Token YOUR_API_KEY"
Make sure to replace
YOUR_API_KEY
with your API key.
Line5 uses API keys to allow access to the API. You can register a new Line5 API key by contacting Line5.
Line5 expects for the API key to be included in all API requests to the server in a header that looks like the following:
Authorization: Token YOUR_API_KEY
Response Codes
The Line5 API uses the following response codes:
Code | Meaning |
---|---|
200 | OK |
201 | Created |
404 | Not found |
500 | Internal server error |
Users
Get all active users
curl "http://example.com/api/v1/users"
-H "Authorization: Token YOR_API_KEY"
The above command returns JSON structured like this:
{
"data": [
{
"id": "3989",
"type": "employees",
"attributes": {
"email": "john@example.com",
"first-name": "John",
"last-name": "Snow",
"user-id": 1
}
},
{
"id": "3988",
"type": "employees",
"attributes": {
"email": "klaus@example.com",
"first-name": "Klaus",
"last-name": "Heinrich",
"user-id": 2
}
}
]
}
This endpoint retrieves all employees.
Parameter | Type | Description |
---|---|---|
id | int | the id which identifies the user |
string | The email of the user | |
first-name | string | The first name of the user |
last-name | string | The last name of the user |
HTTP Request
GET http://example.com/api/v1/users
Create User
curl "http://example.com/api/v1/users"
-H "Authorization: Token YOR_API_KEY"
The above command expects JSON structured like this:
{
"data": {
"type": "employee",
"attributes": {
"first-name": "test",
"last-name": "test",
"date-of-birth": "1950-10-14",
"email": "wiley@co32yote.net",
"phone-number": "8885551212"
}
}
}
The above command returns JSON structured like this:
{
"data": {
"id": "1",
"type": "employees",
"attributes": {
"email": "wiley@co32yote.net",
"first-name": "test",
"last-name": "test",
"user-id": 7
}
}
}
This endpoint creates a User
Parameter | Type | Description |
---|---|---|
id | string | the id which identifies the employee |
first-name | string | The first name of the user |
last-name | string | The last name of the user |
string | The email of the user | |
user-id | int | the user id of the employee |
HTTP Request
POST http://example.com/api/v1/users
Auto Login
curl --location 'https://line5.com/graphql' \
--header 'Content-Type: application/json' \
--header 'Authorization: eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoyNTQzNiwiZXhwIjoxNTg4Nzg3ODgwfQ.Fz19I2bueMgFOgoPXdMss1h7TPrExP9bbc2pMOVa0jk' \
--data-raw '{"query":"mutation {\n signInUser(email: \"test@customer.example.com\", password: \"Test1!\") {\n status\n token\n user {\n id\n displayName\n email\n }\n }\n}","variables":{}}'
The above command returns JSON structured like this:
{"data":{"signInUser":{"status":"Success","token":"eyJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjo0NjcyNSwiZXhwIjoxNjg1NDgyMjgwfQ.LhbILuXEkJmscg0MxJanZP2ugyBMWpCfb2NHuOdOV68","user":{"id":"1111","displayName":"Test Barron john eagle","email":"test@customer.example.com"}}}
These auto-login options allow you to access the quote wizard URL based off user token and have the ability to redirect for final quotation process.
Parameter | Type | Description |
---|---|---|
string | The email of the user | |
password | string | password of the user |
curl --location 'https://line5.com/graphql' \
--header 'Content-Type: application/json' \
--header 'Authorization: eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoyNTQzNiwiZXhwIjoxNTg4Nzg3ODgwfQ.Fz19I2bueMgFOgoPXdMss1h7TPrExP9bbc2pMOVa0jk' \
--data-raw '{"query":"mutation {\n SignInUserAuto(email: \"anthony.walker82655@customer.example.com\", userId: 82655, service: \"PROVIDE_AHEAD_OF_IMPLEMENTATION\") {\n status\n token\n user {\n id\n displayName\n email\n }\n }\n}","variables":{}}
The above command returns JSON structured like this:
{"data":{"signInUser":{"status":"Success","token":"eyJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjo0NjcyNSwiZXhwIjoxNjg1NDgyMjgwfQ.LhbILuXEkJmscg0MxJanZP2ugyBMWpCfb2NHuOdOV68","user":{"id":"46725","displayName":"Mandy Barron john eagle","email":"warren.reid46725@customer.example.com"}}}
Once you are able to access the user token, you will pass the Quote ID and auth token into the params of the URL above.
https://example.com/autologin?quote_id=QUOTE_ID&vision_menu=true&auth_token=AUTH_TOKEN
This second method of auto login allows params passed using email
, userID
and service
Parameter | Type | Description |
---|---|---|
string | the email of the user | |
userId | int | the id which identifies the user |
service | string | validates auto login |
Protections
Get all protections
curl "http://example.com/api/v1/protections"
-H "Authorization: Your API key"
The above command returns JSON structured like this:
{
"data":[
{
"id":"3989",
"type":"protections",
"attributes":{
"provider":"Line/5",
"name":"Total Tyre Protection",
"form_number": "T-12345",
"fields":[
{
"name":"months",
"type":"int",
"required":"true"
},
{
"name":"cost",
"type":"decimal",
"required":"true"
},
{
"name":"price",
"type":"decimal",
"required":"true"
}
],
"protection-category-id": 6,
"protection-category-name": "Tire & Wheel Coverage",
"brochure": "https://www.line5.com/system/provider_protections/brochures/000/002/625/original/829cedf6-d9cb-46f1-b580-989a0ca813eb.pdf?1615907480"
}
},
{
"id":"3923",
"type":"protections",
"attributes":{
"provider":"Super Provider",
"name":"The Awesome Protection",
"form_number": "JA7889",
"fields":[
{
"name":"mileage",
"type":"int",
"required":"true"
},
{
"name":"months",
"type":"int",
"required":"true"
},
{
"name":"cost",
"type":"decimal",
"required":"true"
},
{
"name":"price",
"type":"decimal",
"required":"true"
}
],
"protection-category-id": 1,
"protection-category-name": "Extended Service Contract",
"brochure": ""
}
},
{
"id":"3923",
"type":"protections",
"attributes":{
"provider":"Lame Provider",
"name":"The Lame Protection",
"form_number": "JYY7889",
"fields":[
{
"name":"cost",
"type":"decimal",
"required":"true"
},
{
"name":"price",
"type":"decimal",
"required":"true"
}
],
"protection-category-id": 1,
"protection-category-name": "Extended Service Contract",
"brochure": ""
}
}
]
}
This endpoint retrieves all available protections with their form numbers, these protection ids are the ones that need to come related to the quote protections on the quote creation. And the fields are the one that need to come with the value on the relationship of the quote protection, if the attribute required is present on any of the fields those are necessary.
Protection Attributes
Parameter | Type | Description |
---|---|---|
id | int | the id which identifies the protection |
provider | string | Name of the protectio provider |
name | string | Name of the protection |
form-number | string | Form number that identifies the contract |
Fields Attributes
Parameter | Type | Description |
---|---|---|
months | int | Number of months covered in the protection |
mileage | int | Miles covered on the protection |
cost | decimal | Cost of activating the protection for the delaer |
price | decimal | Price of the protection to the customer |
HTTP Request
GET http://example.com/api/v1/protections
Quotes
POST Quote
curl -i -X POST -H "Content-Type: application/json" -d @create_quote_request.json https://example.com/api/v1/quotes create_quote_request.json
The above command expects JSON structured like this:
{
"data": {
"type": "quotes",
"attributes": {
"integration-loan-id": 54,
"skip-credit-validation": false,
"text-to-sell": true
},
"relationships": {
"customer": {
"data": {
"type": "customers",
"attributes": {
"first-name": "first-name",
"last-name": "last-name",
"ssn": "customer-ssn",
"date-of-birth": "yyyy-mm-dd",
"address-1": "street-address-1",
"address-2": "street-address-2",
"city": "city",
"state": "state-abbreviation",
"postal-code": "5-digit-zip",
"email": "test@test.me",
"cell-number": "8885551212",
"work-number": "8885551212",
"phone-number": "8885551212"
}
}
},
"vehicle": {
"data": {
"type": "vehicles",
"attributes": {
"vin": "vehicle-identification-number",
"mileage": 43
}
}
},
"employee": {
"data": {
"type": "employee",
"id": 3
}
},
"quote-protections": {
"data": [{
"type": "quote-protection",
"attributes": {
"exclude-tax": true,
"filled-fields": [{
"name": "mileage",
"value": 12000
},
{
"name": "months",
"value": 12
},
{
"name": "cost",
"value": 233.34
},
{
"name": "price",
"value": 433.34
}
],
"coverage": {
"coverage_name": "Coverage Name",
"product_type": "ProductType",
"term_miles": 60000,
"term_months": 60
},
"deductible": {
"amount": "250"
},
"surcharges": [
{
"code": "CODE1"
},
{
"code": "CODE2"
}
]
"relationships": {
"protection": {
"data": {
"type": "protection",
"id": 23
}
}
}
},
{
"type": "quote-protection",
"attributes": {
"exclude-tax": false,
"filled-fields": [{
"name": "cost",
"value": 233.34
},
{
"name": "price",
"value": 433.34
}
]
},
"relationships": {
"protection": {
"data": {
"type": "protection",
"id": 64
}
}
}
}
]
}
}
}
}
The above command in case of success responds with a JSON structured like this:
{
"data": {
"id": "13831",
"type": "quotes",
"attributes": {
"link-to-quote-wizard": "https://example.com/dealers/141/quotes/13831/wizard/adjust_loan_terms",
"link-to-text-to-sell": "https://example-text-to-sell.com/?id=123&token=abc",
"integration-loan-id": null,
"status": "new",
"term": 10,
"monthly-payment": 47.18,
"protections-total": 433.34,
"taxed-total": 0,
"tax": 0,
"subtotal": 433.34,
"down-payment": 0,
"total": 433.34,
"doc-stamp-fee": 1.75,
"financed-total": 435.09,
"base-fee": 65.26,
"buy-down-fee": 0,
"interest-percent": 17.99,
"additional-term-fee": 0,
"fees": 65.26
},
"relationships": {
"quote-protections": {
"data": [
{
"id": "28608",
"type": "quote-protections"
}
]
},
"customer": {
"data": {
"id": "16792",
"type": "customers"
}
},
"vehicle": {
"data": {
"id": "10432",
"type": "vehicles"
}
}
}
},
"included": [
{
"id": "16792",
"type": "customers",
"attributes": {
"first-name": "John",
"last-name": "Doe",
"date-of-birth": "1990-01-01",
"address-1": "22 Arcacia Ave",
"address-2": "APT 123",
"city": "MIAMI",
"state": "FL",
"postal-code": "33131",
"phone-number": "(888) 555-1212",
"cell-number": "(888) 555-1212",
"work-number": "(888) 555-1212",
"credit-score-tier": "h"
}
},
{
"id": "28608",
"type": "quote-protections",
"attributes": {
"term": 12,
"name": "Allstate® Classic VSC",
"months": 12,
"mileage": 12000,
"price": "433.34"
}
},
{
"id": "10432",
"type": "vehicles",
"attributes": {
"year": 2013,
"make": "Dodge",
"model": "Challenger R/T",
"vin": "2C3KA53G67H670383",
"mileage": 43,
"purchase-price": "22211.22",
"financed-amount": "20000.01",
"msrp": "25999.99",
"finance-term": 60,
"in-service-date": "2013-01-01",
"status": "used_vehicle"
}
}
]
}
This endpoint creates a new quote.
Quote Attributes:
Parameter | Type | Required | Description |
---|---|---|---|
integration-loan-id | int | true | the ID which identifies the quote on the clients side, meaning your internal ID for this quote |
skip-credit-validation | boolean | false | Sending this value as true will skip the credit inquiry, giving your customer the max rate. Identification will be required before funding. |
text-to-sell | boolean | false | Identifies that text-to-sell will be used to end the quote. |
NOTE: Send 'text-to-sell' parameter only when sending protection information when creating the quote. If you are creating the quote without protections and adding protections later, update this information when the quote is complete, using the PUT method.
Customer Attributes:
Parameter | Type | Required | Description |
---|---|---|---|
first-name | string | true | First Name of the customer |
last-name | string | true | Last Name of the customer |
ssn | string | true | SSN of the customer |
date-of-birth | string | true | Date of birth of this customer on format 'yyyy-mm-dd' |
address-1 | string | true | First line of customers address |
address-2 | string | true | Second line of customers address |
city | string | true | City |
state | string | true | State |
postal-code | string | true | ZipCode |
string | true | Customer email | |
cell-number | string | true | CellPhone Number |
phone-number | string | true | Phone Number |
work-number | string | false | Work Phone Number |
Vehicle Attributes:
NOTE: If only 'vin' and 'mileage' are sent, a VIN explosion will run and fill in the vehicle description fields. If 'year', 'make', 'model', 'in-service-date', and 'status' are ALL sent, the VIN explosion will not run and the sent attributes will be used.
Parameter | Type | Required | Description |
---|---|---|---|
vin | string | true | Vehicle Identification Number |
mileage | string | true | Odometer Reading |
year | int | false | Vehicle Year |
make | string | false | Vehicle Make |
model | string | false | Vehicle Model |
in-service-date | string | false | Date this model/year went into production (format as yyyy-mm-dd) |
status | string | false | "new_vehicle", "used_vehicle", "used_with_factory_warranty", "certified_pre_owned" |
purchase-price | decimal | false | Purchase Price of vehicle |
msrp | decimal | false | Manufacturer's Suggested Retail Price (MSRP) |
financed-amount | decimal | false | Total Amount Financed |
finance-term | int | false | Length of Finance Term (months) |
Employee Attributes:
Parameter | Type | Required | Description |
---|---|---|---|
id | int | true | Employee ID on Line5 (from the user response) |
Quote Protection Attributes:
You do not need to include quote protections when creating a quote. They can be individually added afterwards in Quote Protections
These fields are the ones that were sent on the get protections response per protection. Corresponding to the fields on the (Protection) Additional there are the following fields:
Parameter | Type | Required | Description |
---|---|---|---|
exclude-tax | boolean | false | this flag overrides the default tax option in the for the corresponding protection. |
coverage | Coverage | false | Coverage data |
deductible | Deductible | false | Deductible data |
durcharges | Surcharges | false | Surcharges data |
Coverage Attributes:
Parameter | Type | Required | Description |
---|---|---|---|
coverage-name | string | true | Name of coverage |
product-type | string | true | Type of coverage |
term-miles | integer | false | Miles of coverage |
term-months | integer | false | Months of coverage |
Deductible Attributes:
Parameter | Type | Required | Description |
---|---|---|---|
amount | string | true | Deductible amount |
Surcharges Attributes:
Parameter | Type | Required | Description |
---|---|---|---|
code | string | true | Surcharge code |
NOTE: Coverage, deductible and surcharge data, when submitted, must be available to the dealer. The system will consult the rates and locate them according to what was sent. This information must be equivalent to that returned in Rates.
Quote Protection Relationships:
Protection
Parameter | Type | Required | Description |
---|---|---|---|
id | int | true | Protection ID on Line5 (from the protections response) |
Response
When the quote creation succeeds the server will issue a response with status code 201 and the rate attributes of the created Quote
Parameter | Type | Description |
---|---|---|
link-to-quote-wizard | string | URL to access the quote on the web frontend. The quote finalization can be continued on the web frontend, as well. |
link-to-text-to-sell | string | URL to access quote in Text to Sell. The quote finalization can be continued on the Text to Sell. |
integration-loan-id | int | the ID which identifies the quote on the clients side, meaning your internal ID for this quote |
status | string | Status of the deal (new, awaiting-funding, finalized) |
term | int | Effective term of the coverage, amount of months were the vehicle is covered |
monthly-payment | decimal | Monthly payment required from the customer |
protections-total | decimal | Total cost of the protections |
taxed-total | decimal | Total amount taxed |
tax | decimal | Tax percent |
subtotal | decimal | Subtotal amount (taxes + protection-total) |
down-payment | decimal | Down payment required by the customer |
total | decimal | Total cost |
doc-stamp-fee | decimal | Documents Fee |
financed-total | decimal | Total amount that is going to be financed |
base-fee | decimal | Base fee for the deal |
buy-down-fee | decimal | Buy Down Fee |
additional-term-fee | decimal | Fee for adjusting the term |
fees | decimal | Total amount of fees |
Customer credit tier
During quote creation, we inquire the credit records from the customer in order to generate a precise quote. Within the quote response, we are returning the tier symbol in which the customers credit score lies. The credit score tiers are defined according the following ranges:
Symbol | Credit score between |
---|---|
a | 900 to 800 |
b | 799 to 750 |
c | 749 to 700 |
d | 699 to 650 |
e | 649 to 600 |
f | 599 to 550 |
g | 549 to 500 |
h | 499 to 0 |
Credit Inquiry Failures
Credit inquiries may fail for a variety of reasons, ranging from invalid customer
data to credit inquiry service availability issues. When failures happen, the
API will respond with a 422
status and the error message indicating the reason
for the failure. Depending on the error message, it might be necessary to verify
the customer data and try submitting again. If failures persist, credit inquires
can be skipped by setting the quotes skip_credit_validation
attribute to true
.
Note that skipping the credit inquiry will result in getting the highest
interest rate.
HTTP Request
POST http://example.com/api/v1/quotes
PUT/PATCH Quote
curl -i -X PATCH -H "Content-Type: application/json" -d @update_quote_request.json https://example.com/api/v1/quotes update_quote_terms.json
The above command expects JSON structured like this:
{
"data":{
"type": "quotes",
"id": 12
"attributes": {
"term": 24,
"down_payment": 400,
"interest_percent": 13,
"text-to-sell": true
}
}
}
This endpoint adjusts the quote's loan terms. All three fields are optional and should only be used, when an actual adjustment is desired.
Quote Attributes:
Parameter | Type | Required | Description |
---|---|---|---|
term | int | false | Represents the desired therm in months |
down_payment | int | false | Represents the desired down payment in dollars |
interest_percent | int | false | Represents the desired interest percent |
text-to-sell | boolean | false | identifies that text-to-sell will be used to end the quote |
PUT/PATCH finalize
curl -i -X PATCH -H "Content-Type: application/json" -d @finalize_quote.json https://example.com/api/v1/quotes/finalize finalize_quote.json
The above command expects JSON structured like this for a payment card:
{
"data": {
"type": "quotes",
"id": "10124",
"attributes": {
"first_payment_date": "2017-10-3"
},
"relationships": {
"payment_method": {
"data":{
"type":"payment_methods",
"attributes": {
"form_of_payment_type": "payment_card",
"payment_card_name": "jon Doe",
"payment_card_number": "5454545454545454",
"payment_card_cvv": "123",
"payment_card_expiration": "12/2020",
"payment_card_zip_code": "33334"
}
}
}
}
}
}
Or like this when setting up a bank transfer account:
{
"data": {
"type": "quotes",
"id": "10124",
"attributes": {
"first_payment_date": "2017-10-3"
},
"relationships": {
"payment_method": {
"data":{
"type":"payment_methods",
"attributes": {
"form_of_payment_type": "bank_transfer",
"bank_transfer_routing_number": "063107513",
"bank_transfer_account_number": "9999999999",
"bank_transfer_routing_number_confirmation": "063107513",
"bank_transfer_account_number_confirmation": "9999999999",
"bank_transfer_name": "Wells Fargo",
"bank_transfer_account_type": "checking"
}
}
}
}
}
Add a downpayment and an automatic payment method using different payment methods
{
"data": {
"type": "quotes",
"id": "10124",
"attributes": {
"first_payment_date": "2017-10-3"
},
"relationships": {
"downpayment_payment_method": {
"data": {
"type": "downpayment_payment_method",
"attributes": {
"form_of_payment_type": "payment_card",
"payment_card_name": "jon doe",
"payment_card_number": "5454545454545454",
"payment_card_cvv": "123",
"payment_card_expiration": "10/2020",
"payment_card_zip_code": "33334"
}
}
},
"payment_method": {
"data": {
"type": "payment_methods",
"attributes": {
"form_of_payment_type": "bank_transfer",
"bank_transfer_routing_number": "063107513",
"bank_transfer_account_number": "9999999999",
"bank_transfer_routing_number_confirmation": "063107513",
"bank_transfer_account_number_confirmation": "9999999999",
"bank_transfer_name": "Wells Fargo",
"bank_transfer_account_type": "checking"
}
}
}
}
}
}
Use same payment method as down payment to setup autopay
{
"data": {
"type": "quotes",
"id": "10124",
"attributes": {
"first_payment_date": "2017-10-3"
},
"relationships": {
"downpayment_payment_method": {
"data": {
"type": "downpayment_payment_method",
"attributes": {
"form_of_payment_type": "payment_card",
"payment_card_name": "jon doe",
"payment_card_number": "5454545454545454",
"payment_card_cvv": "123",
"payment_card_expiration": "10/2020",
"payment_card_zip_code": "33334"
}
}
},
"payment_method": {
"data": {
"type": "payment_methods",
"attributes": {
"same_as_downpayment": true
}
}
}
}
}
}
Provide auto pay later ( when sending down payment )
{
"data": {
"type": "quotes",
"id": "10124",
"attributes": {
"first_payment_date": "2017-10-3"
},
"relationships": {
"downpayment_payment_method": {
"data": {
"type": "downpayment_payment_method",
"attributes": {
"form_of_payment_type": "payment_card",
"payment_card_name": "jon doe",
"payment_card_number": "5454545454545454",
"payment_card_cvv": "123",
"payment_card_expiration": "10/2020",
"payment_card_zip_code": "33334"
}
}
},
"payment_method": {
"data": {
"type": "payment_methods",
"attributes": {
"provide_later": true
}
}
}
}
}
}
The above command in case of success responds with a JSON structured like this:
{
"data": {
"id": "110372",
"type": "loans",
"attributes": {
"status": "awaiting_paperwork",
"funded-at": null,
"start-date": "2017-06-01",
"payment-day": 24,
"first-payment-date": "2017-05-24",
"balance": "435.09",
"term": 10,
"down-payment": "0.0",
"short-fund-fee": "0.0",
"monthly-payment": "47.18",
"tax": "0.0",
"base-fee": "65.26",
"buy-down-fee": "0.0",
"additional-term-fee": "0.0",
"doc-stamp-fee": "1.75",
"financed-total": "435.09",
"esign-url": "https://esignlive.com/authentication?target=https%3A%2F%2Fesignlive.com%2Ftransaction%2FVUq9ncKhz-Bc1eEB79fKodFazTU%3D%2Fsign&loginToken=VzB5Z2VyZU1RUndPSVhuSDlpSTgxT2JqcjQ1TzZCMWljdm55d29nRXF3RUJVZitmUmovaFhnQUZoSjd1SW9BVFJ0Z2M1KzNjeEdBRFlOelNidUx3Z0RBelowOWliazFaY1dkcVFUWnhWV2wxZVRsRVdVcFJlVFpRUlcxdWMyZEJhMWt4UnpKeFIzSkhSa0ZVVUV0VFlVWlVhalJEZUhsUGRrY3lNRnBJVlV1T3p5VHJjVXcreFJuY3BKSGZ1R1pzUHlMNHlPTVFHMW5aSU1zdko2ajVDUT09",
"signing-state": "unsigned"
},
"relationships": {
"loan-notes": {
"data": []
},
"unread-loan-notes": {
"data": []
},
"actual-cover-sheet": {
"data": {
"id": "9215",
"type": "loan-packages"
}
},
"customer": {
"data": {
"id": "1582",
"type": "customers"
}
},
"vehicle": {
"data": {
"id": "10432",
"type": "vehicles"
}
},
"quote-protections": {
"data": [
{
"id": "20730",
"type": "quote-protections"
}
]
}
}
},
"included": [
{
"id": "9215",
"type": "loan-packages",
"attributes": {
"documents-file-name": "5087eef7-bcc7-4778-9f34-9c4773ee529f.pdf",
"documents-content-type": "application/pdf",
"documents-file-size": 918298
},
"links": {
"download": "http://hashsat1.com:3000/api/v1/loans/110372/loan_packages/9215/download"
}
},
{
"id": "1582",
"type": "customers",
"attributes": {
"first-name": "Susann",
"last-name": "Cartwright",
"date-of-birth": "1990-01-01",
"address-1": "951 Moen Prairie",
"address-2": "",
"city": "BOCA RATON",
"state": "FL",
"postal-code": "33433",
"phone-number": "(417) 933-2362",
"cell-number": "(666) 639-6506",
"work-number": "(666) 639-6506",
"credit-score-tier": "h"
}
},
{
"id": "10432",
"type": "vehicles",
"attributes": {
"year": 2013,
"make": "Dodge",
"model": "Challenger R/T",
"vin": "2C3KA53G67H670383",
"mileage": 43,
"purchase-price": "22211.22",
"financed-amount": "20000.01",
"msrp": "25999.99",
"finance-term": 60,
"in-service-date": "2013-01-01",
"status": "used_vehicle"
}
},
{
"id": "20730",
"type": "quote-protections",
"attributes": {
"term": 12,
"name": "Allstate® Classic VSC",
"months": 12,
"mileage": 12000,
"price": "433.34"
}
}
]
}
The above command in case of success responds with a JSON serialized loan like in Loan documented.
This endpoint sets up the first payment date and the payment method.
Finalize Attributes:
Parameter | Type | Required | Description |
---|---|---|---|
id | int | true | the id of the quote to be finalized |
first_payment_date | date | true | The date, where the first payment is due. |
The payment_method segment accepts credit/debit card or wire transfer information.
Credit/Debit Card
Parameter | Type | Required | Description |
---|---|---|---|
form_of_payment_type | string | true | use 'payment_card' for CC |
payment_card_name | string | true | The cardholder's name |
payment_card_number | int | true | The credit card number |
payment_card_cvv | int | true | The credit card cvv number |
payment_card_expiration | string | true | The credit card expiration date (mm/yyyy) |
payment_card_zip_code | int | true | The the zip code where the credit card is assigned to |
Bank Account (ACH)
Parameter | Type | Required | Description |
---|---|---|---|
form_of_payment_type | string | true | use 'bank_transfer' for ACH |
bank_transfer_routing_number | int | true | the bank's routing number |
bank_transfer_account_number | int | true | the account number |
bank_transfer_routing_number_confirmation | int | true | the bank's routing number again |
bank_transfer_account_number_confirmation | int | true | the account number again |
bank_transfer_name | string | true | the bank's name |
bank_transfer_account_type | string | true | Line5 only accepts 'checking' at this time |
Optional parameters when submitting a down payment for the quote
Parameter | Type | Required | Description |
---|---|---|---|
same_as_downpayment | boolean | false | use the same payment method as down payment for auto pay |
provide_later | boolean | false | provide auto pay method later when sending in down payment method |
Response
When the quote finalize succeeds the server will issue a response with status code 201 and with a JSON serialized loan like in Loan documented.
Vehicles
PUT/PATCH Vehicle
curl -i -X PATCH -H "Content-Type: application/json" -d @update_vehicle.json https://example.com/api/v1/vehicles update_vehicle.json
The above command expects JSON structured like this:
{
"data": {
"type": "vehicles",
"attributes": {
"vin": "3VW5T7AU8FM017042",
"mileage": 43333,
"purchase-price": 22211.22,
"msrp": 26999.99,
"financed-amount": 20000.01,
"finance-term": 60
},
"relationships": {
"quote": {
"data": {
"type": "quotes",
"id": "49853"
}
}
}
}
}
This endpoint can be used to update attributes for the quote vehicle. Warning: If you use this endpoint to change the vin or mileage, the quote is reset, you will need to re-rate and select protections to finalize the deal.
Vehicle Attributes:
NOTE: If only 'vin' and 'mileage' are sent, a VIN explosion will run and fill in the vehicle description fields. If 'year', 'make', 'model', 'in-service-date', and 'status' are ALL sent, the VIN explosion will not run and the sent attributes will be used.
Parameter | Type | Required | Description |
---|---|---|---|
vin | string | true | Vehicle Identification Number |
mileage | string | true | Odometer Reading |
year | int | false | Vehicle Year |
make | string | false | Vehicle Make |
model | string | false | Vehicle Model |
in-service-date | string | false | Date this model/year went into production (format as yyyy-mm-dd) |
status | string | false | "new_vehicle", "used_vehicle", "used_with_factory_warranty", "certified_pre_owned" |
purchase-price | decimal | false | Purchase Price of vehicle |
msrp | decimal | false | Manufacturer's Suggested Retail Price (MSRP) |
financed-amount | decimal | false | Total Amount Financed |
finance-term | int | false | Length of Finance Term (months) |
Quote Attributes:
Parameter | Type | Required | Description |
---|---|---|---|
id | int | true | the ID which identifies the quote |
Response
When the vehicle is updated the server will issue a response with status code 200. The command on in the right column in case of success responds with a JSON serialized quote like in Quote documented.
HTTP Request
GET http://example.com/api/v1/vehicles
Rates
GET Rates
curl "http://example.com/api/v1/rates"
-H "Authorization: Your API key"
The above command expects JSON structured like this:
{
"data": {
"type": "quotes",
"id": "28603",
"relationships": {
"protection-label": {
"data": {
"type": "protection-label",
"id": 54321
}
}
}
}
}
The above command returns JSON structured like this:
{
"coverages": [
{
"id": 50072,
"pen_rate_id": 1116,
"coverage_name": "Powertrain Extended Warranty - Used",
"form_id": "5281",
"form_name": "PEW-101",
"new": false,
"product_type": "WARRANTY",
"term_miles": null,
"term_months": 48,
"label": "Powertrain Extended Warranty - Used (48 months)",
"deductibles": [
{
"id": 140225,
"pen_coverage_id": 50072,
"amount": "0",
"dealer_cost": "108.9",
"deductible_type": "NORMAL",
"description": "0.00",
"fi_markup": "0.0",
"max_retail_price": "326.7",
"min_retail_price": "326.7",
"rate_id": "15",
"reduced_amount": "0.0",
"retail_price": "326.7"
}
],
"surcharges": [
{
"id": 128102,
"pen_coverage_id": 50072,
"code": "221",
"dealer_cost": "250.0",
"description": "Supercharger",
"optional": true,
"retail_price": "250.0"
},
{
"id": 128103,
"pen_coverage_id": 50072,
"code": "215",
"dealer_cost": "100.0",
"description": "4X4 Drive",
"optional": true,
"retail_price": "100.0"
}
]
},
{
"id": 50069,
"pen_rate_id": 1116,
"coverage_name": "Powertrain Extended Warranty - Used",
"form_id": "5281",
"form_name": "PEW-101",
"new": false,
"product_type": "WARRANTY",
"term_miles": null,
"term_months": 36,
"label": "Powertrain Extended Warranty - Used (36 months)",
"deductibles": [
{
"id": 140222,
"pen_coverage_id": 50069,
"amount": "0",
"dealer_cost": "93.5",
"deductible_type": "NORMAL",
"description": "0.00",
"fi_markup": "0.0",
"max_retail_price": "280.5",
"min_retail_price": "280.5",
"rate_id": "12",
"reduced_amount": "0.0",
"retail_price": "280.5"
}
],
"surcharges": [
{
"id": 128104,
"pen_coverage_id": 50069,
"code": "221",
"dealer_cost": "250.0",
"description": "Supercharger",
"optional": true,
"retail_price": "250.0"
},
{
"id": 128105,
"pen_coverage_id": 50069,
"code": "215",
"dealer_cost": "100.0",
"description": "4X4 Drive",
"optional": true,
"retail_price": "100.0"
}
]
},
{
"id": 50068,
"pen_rate_id": 1116,
"coverage_name": "Powertrain Extended Warranty - Used",
"form_id": "5281",
"form_name": "PEW-101",
"new": false,
"product_type": "WARRANTY",
"term_miles": null,
"term_months": 24,
"label": "Powertrain Extended Warranty - Used (24 months)",
"deductibles": [
{
"id": 140221,
"pen_coverage_id": 50068,
"amount": "0",
"dealer_cost": "63.8",
"deductible_type": "NORMAL",
"description": "0.00",
"fi_markup": "0.0",
"max_retail_price": "191.4",
"min_retail_price": "191.4",
"rate_id": "11",
"reduced_amount": "0.0",
"retail_price": "191.4"
}
],
"surcharges": [
{
"id": 128106,
"pen_coverage_id": 50068,
"code": "221",
"dealer_cost": "250.0",
"description": "Supercharger",
"optional": true,
"retail_price": "250.0"
},
{
"id": 128107,
"pen_coverage_id": 50068,
"code": "215",
"dealer_cost": "100.0",
"description": "4X4 Drive",
"optional": true,
"retail_price": "100.0"
}
]
},
{
"id": 50063,
"pen_rate_id": 1116,
"coverage_name": "Powertrain Extended Warranty - New",
"form_id": "5281",
"form_name": "PEW-101",
"new": true,
"product_type": "WARRANTY",
"term_miles": null,
"term_months": 48,
"label": "Powertrain Extended Warranty - New (48 months)",
"deductibles": [
{
"id": 140216,
"pen_coverage_id": 50063,
"amount": "0",
"dealer_cost": "108.9",
"deductible_type": "NORMAL",
"description": "0.00",
"fi_markup": "0.0",
"max_retail_price": "326.7",
"min_retail_price": "326.7",
"rate_id": "6",
"reduced_amount": "0.0",
"retail_price": "326.7"
}
],
"surcharges": [
{
"id": 128108,
"pen_coverage_id": 50063,
"code": "221",
"dealer_cost": "250.0",
"description": "Supercharger",
"optional": true,
"retail_price": "250.0"
},
{
"id": 128109,
"pen_coverage_id": 50063,
"code": "215",
"dealer_cost": "100.0",
"description": "4X4 Drive",
"optional": true,
"retail_price": "100.0"
}
]
},
{
"id": 50060,
"pen_rate_id": 1116,
"coverage_name": "Powertrain Extended Warranty - New",
"form_id": "5281",
"form_name": "PEW-101",
"new": true,
"product_type": "WARRANTY",
"term_miles": null,
"term_months": 36,
"label": "Powertrain Extended Warranty - New (36 months)",
"deductibles": [
{
"id": 140213,
"pen_coverage_id": 50060,
"amount": "0",
"dealer_cost": "93.5",
"deductible_type": "NORMAL",
"description": "0.00",
"fi_markup": "0.0",
"max_retail_price": "280.5",
"min_retail_price": "280.5",
"rate_id": "3",
"reduced_amount": "0.0",
"retail_price": "280.5"
}
],
"surcharges": [
{
"id": 128110,
"pen_coverage_id": 50060,
"code": "221",
"dealer_cost": "250.0",
"description": "Supercharger",
"optional": true,
"retail_price": "250.0"
},
{
"id": 128111,
"pen_coverage_id": 50060,
"code": "215",
"dealer_cost": "100.0",
"description": "4X4 Drive",
"optional": true,
"retail_price": "100.0"
}
]
},
{
"id": 50059,
"pen_rate_id": 1116,
"coverage_name": "Powertrain Extended Warranty - New",
"form_id": "5281",
"form_name": "PEW-101",
"new": true,
"product_type": "WARRANTY",
"term_miles": null,
"term_months": 24,
"label": "Powertrain Extended Warranty - New (24 months)",
"deductibles": [
{
"id": 140212,
"pen_coverage_id": 50059,
"amount": "0",
"dealer_cost": "63.8",
"deductible_type": "NORMAL",
"description": "0.00",
"fi_markup": "0.0",
"max_retail_price": "191.4",
"min_retail_price": "191.4",
"rate_id": "2",
"reduced_amount": "0.0",
"retail_price": "191.4"
}
],
"surcharges": [
{
"id": 1281112,
"pen_coverage_id": 50059,
"code": "221",
"dealer_cost": "250.0",
"description": "Supercharger",
"optional": true,
"retail_price": "250.0"
},
{
"id": 128113,
"pen_coverage_id": 50059,
"code": "215",
"dealer_cost": "100.0",
"description": "4X4 Drive",
"optional": true,
"retail_price": "100.0"
}
]
}
],
"coverage_terms": {
"Powertrain Extended Warranty - Used": [
{
"id": 50072,
"term_label": "48 months"
},
{
"id": 50069,
"term_label": "36 months"
},
{
"id": 50068,
"term_label": "24 months"
}
],
"Powertrain Extended Warranty - New": [
{
"id": 50063,
"term_label": "48 months"
},
{
"id": 50060,
"term_label": "36 months"
},
{
"id": 50059,
"term_label": "24 months"
}
]
},
"coverage_names": [
"Powertrain Extended Warranty - Used",
"Powertrain Extended Warranty - New"
]
}
This endpoint takes a quote with a rated protection label and fetchs all of the available coverages. Each coverage contains deductible and surcharge options with rates included
Quote Attributes
Parameter | Type | Description |
---|---|---|
id | int | the id which identifies the quote |
Quote Relationships:
Protection
Parameter | Type | Required | Description |
---|---|---|---|
id | int | true | Protection ID on Line5 (from the protections response) |
HTTP Request
GET http://example.com/api/v1/rates
Quote Protections
GET Quote Protections
curl -i -X POST -H "Content-Type: application/json" -d @get_quote_protection_request.json https://example.com/api/v1/quote_protections
The above command expects JSON structured like this:
{
"data": {
"type": "quotes",
"id": 26858
}
}
The above command in case of success responds with a JSON structured like this:
{
"quote_protections": [
{
"id": 12345,
"term": 24,
"name": "Acme Paintless Dent Repair",
"months": 24,
"mileage": 100000,
"price": "499.99",
"financing_limit": "600.00",
"exclude_tax": false,
"protection_label_id": 10332837371,
"coverage_id": 23344543435,
"deductible_id": 34123424113,
"surcharge_ids": [],
"template_fields": [
{
"name": "deal_monthlypayment",
"prompt": "Deals Monthly Payment",
"data_type": "double",
"validator_prompt": "must be in format ######.##",
"validator_regex": "^\\d+(\\.(\\d{2}))?$",
"value": "325.82"
}
]
}
]
}
This endpoint fetchs the protections for a quote
Quote Attributes:
Parameter | Type | Required | Description |
---|---|---|---|
id | int | true | Quote ID |
Response
All of the saved protections that belong to the quote will be included in the response. The response may additionally contain "template fields" associated with the quote protection. When template fields are present for a quote protection, you must submit an update request for the protection to provide values for the template fields as they are required by the provider for the contract. See the quote_protections#update section for an example of how to submit template field values.
HTTP Request
GET http://example.com/api/v1/quote_protections
POST Quote Protection
curl -i -X POST -H "Content-Type: application/json" -d @create_quote_protection_request.json https://example.com/api/v1/quote-protections/ create_quote_protection_request.json
The above command expects JSON structured like this:
{
"data": {
"type": "quote-protections",
"attributes": {
"price": 1234.56,
"exclude-tax": false,
"months": 24,
"mileage": 20000
},
"relationships": {
"quote": {
"data": {
"type": "quote",
"id": "48358"
}
},
"protection-label": {
"data": {
"type": "protection-label",
"id": "10259"
}
},
"coverage": {
"data": {
"type": "coverage",
"id": "4000973"
}
},
"deductible": {
"data": {
"type": "deductible",
"id": "12469408"
}
},
"surcharges": {
"data": [
{
"type": "surcharge",
"id": "4689408"
},
{
"type": "surcharge",
"id": "4689411"
}
]
}
}
}
}
The above command in case of success responds with a JSON structured like this:
{
"data": {
"id": "123738",
"type": "quotes",
"attributes": {
"link-to-quote-wizard": "http://example.com/dealers/2000/quotes/123738/wizard/adjust_loan_terms",
"integration-loan-id": 1423,
"status": "new",
"term": 24,
"monthly-payment": 12.54,
"protections-total": 240.19,
"taxed-total": 240.19,
"tax": 16.81,
"subtotal": 257.0,
"down-payment": 25.7,
"total": 231.3,
"doc-stamp-fee": 1.05,
"financed-total": 232.35,
"base-fee": 0.0,
"buy-down-fee": 0.0,
"interest-percent": 0.0,
"additional-term-fee": 0.0,
"fees": 0.0
},
"relationships": {
"quote-protections": {
"data": [
{
"id": "90805",
"type": "quote-protections"
}
]
},
"customer": {
"data": {
"id": "49666",
"type": "customers"
}
},
"vehicle": {
"data": {
"id": "10432",
"type": "vehicles"
}
}
}
},
"included": [
{
"id": 12345,
"term": 24,
"name": "Acme Paintless Dent Repair",
"months": 24,
"mileage": 100000,
"price": "499.99",
"financing_limit": "600.00",
"exclude_tax": false,
"protection_label_id": 10332837371,
"coverage_id": 23344543435,
"deductible_id": 34123424113,
"surcharge_ids": [],
"template_fields": [
{
"name": "deal_monthlypayment",
"prompt": "Deals Monthly Payment",
"data_type": "double",
"validator_prompt": "must be in format ######.##",
"validator_regex": "^\\d+(\\.(\\d{2}))?$",
"value": null
}
]
},
{
"id": "49666",
"type": "customers",
"attributes": {
"first-name": "Pickle",
"last-name": "Rick",
"date-of-birth": "1980-10-23",
"address-1": "12 Anvil Dr.",
"address-2": null,
"city": "Albuquerque",
"state": "NM",
"postal-code": "33880",
"phone-number": "(888) 555-1212",
"cell-number": "(888) 555-1212",
"work-number": "(888) 555-1212",
"credit-score-tier": "d"
}
},
{
"id": "10432",
"type": "vehicles",
"attributes": {
"year": 2013,
"make": "Dodge",
"model": "Challenger R/T",
"vin": "2C3KA53G67H670383",
"mileage": 43,
"purchase-price": "22211.22",
"financed-amount": "20000.01",
"msrp": "25999.99",
"finance-term": 60,
"in-service-date": "2013-01-01",
"status": "used_vehicle"
}
}
]
}
This endpoint creates a quote protection for a quote.
Quote Protection Attributes:
Parameter | Type | Required | Description |
---|---|---|---|
price | decimal | true | The new US-Dollar price for the quote protections. Allowed are positive decimal values. |
exclude-tax | boolean | false | Option to have tax excluded from the protection total |
months | int | true | Number of months of protection coverage |
mileage | int | true | Vehicle mileage allowance |
Quote Protection Relationships:
- Quote
Parameter | Type | Required | Description |
---|---|---|---|
id | int | true | Quote ID on Line5 |
- Protection Label
Parameter | Type | Required | Description |
---|---|---|---|
id | int | true | Protection ID on Line5 (from the protections response) |
- Coverage
Parameter | Type | Required | Description |
---|---|---|---|
id | int | true | Coverage ID on Line5 (from the rates response) |
- Deductible
Parameter | Type | Required | Description |
---|---|---|---|
id | int | true | Deductible ID on Line5 (from the rates response) |
- Surcharges
Parameter | Type | Required | Description |
---|---|---|---|
id | int | false | Surcharge ID on Line5 (from the rates response) |
Response
When the quote protection is created the server will issue a response with status code 200 and the return a serialized quote in the body with the associated quote protection. The response may additionally contain "template fields" associated with the quote protection. When template fields are present for a quote protection, you must submit an update request for the protection to provide values for the template fields as they are required by the provider for the contract. See the quote_protections#update section for an example of how to submit template field values. Additionally these fields could be submitted in this create request using the same attributes as the update request.
HTTP Request
POST http://example.com/api/v1/quote_protections
PUT/PATCH Quote Protection
curl -i -X PUT -H "Content-Type: application/json" -d @update_quote_protection_request.json https://example.com/api/v1/quote-protections/:id update_quote_protection_request.json
The above command expects JSON structured like this:
{
"data": {
"type": "quote-protections",
"id": 22223,
"attributes": {
"price": 2345.67,
"exclude-tax": false,
"months": 24,
"mileage": 20000
},
"relationships": {
"quote": {
"data": {
"type": "quote",
"id": "48358"
}
},
"protection-label": {
"data": {
"type": "protection-label",
"id": "10259"
}
},
"coverage": {
"data": {
"type": "coverage",
"id": "4000974"
}
},
"deductible": {
"data": {
"type": "deductible",
"id": "12469452"
}
},
"surcharges": {
"data": [
{
"type": "surcharge",
"id": "4689479"
},
{
"type": "surcharge",
"id": "4689480"
}
]
},
"template": {
"data": {
"type": "template",
"attributes": {
"deal_monthlypayment": "320.99"
}
}
}
}
}
}
The above command in case of success responds with a JSON structured like this:
{
"data": {
"id": "123738",
"type": "quotes",
"attributes": {
"link-to-quote-wizard": "http://example.com/dealers/2000/quotes/123738/wizard/adjust_loan_terms",
"integration-loan-id": 1423,
"status": "new",
"term": 24,
"monthly-payment": 12.54,
"protections-total": 240.19,
"taxed-total": 240.19,
"tax": 16.81,
"subtotal": 257.0,
"down-payment": 25.7,
"total": 231.3,
"doc-stamp-fee": 1.05,
"financed-total": 232.35,
"base-fee": 0.0,
"buy-down-fee": 0.0,
"interest-percent": 0.0,
"additional-term-fee": 0.0,
"fees": 0.0
},
"relationships": {
"quote-protections": {
"data": [
{
"id": "90805",
"type": "quote-protections"
}
]
},
"customer": {
"data": {
"id": "49666",
"type": "customers"
}
},
"vehicle": {
"data": {
"id": "10432",
"type": "vehicles"
}
}
}
},
"included": [
{
"id": 12345,
"term": 24,
"name": "Acme Paintless Dent Repair",
"months": 24,
"mileage": 100000,
"price": "499.99",
"financing_limit": "600.00",
"exclude_tax": false,
"protection_label_id": 10332837371,
"coverage_id": 23344543435,
"deductible_id": 34123424113,
"surcharge_ids": [],
"template_fields": [
{
"name": "deal_monthlypayment",
"prompt": "Deals Monthly Payment",
"data_type": "double",
"validator_prompt": "must be in format ######.##",
"validator_regex": "^\\d+(\\.(\\d{2}))?$",
"value": "320.99"
}
]
},
{
"id": "49666",
"type": "customers",
"attributes": {
"first-name": "Pickle",
"last-name": "Rick",
"date-of-birth": "1980-10-23",
"address-1": "12 Anvil Dr.",
"address-2": null,
"city": "Albuquerque",
"state": "NM",
"postal-code": "33880",
"phone-number": "(888) 555-1212",
"cell-number": "(888) 555-1212",
"work-number": "(888) 555-1212",
"credit-score-tier": "d"
}
},
{
"id": "10432",
"type": "vehicles",
"attributes": {
"year": 2013,
"make": "Dodge",
"model": "Challenger R/T",
"vin": "2C3KA53G67H670383",
"mileage": 43,
"purchase-price": "22211.22",
"financed-amount": "20000.01",
"msrp": "25999.99",
"finance-term": 60,
"in-service-date": "2013-01-01",
"status": "used_vehicle"
}
}
]
}
This endpoint updates a quote protection for a quote.
Quote Protection Attributes:
Parameter | Type | Required | Description |
---|---|---|---|
id | int | true | Quote Protection ID |
price | decimal | true | The new US-Dollar price for the quote protections. Allowed are positive decimal values. |
exclude-tax | boolean | false | Option to have tax excluded from the protection total |
months | int | true | Number of months of protection coverage |
mileage | int | true | Vehicle mileage allowance |
Quote Protection Relationships:
- Quote
Parameter | Type | Required | Description |
---|---|---|---|
id | int | true | Quote ID on Line5 |
- Protection Label
Parameter | Type | Required | Description |
---|---|---|---|
id | int | true | Protection ID on Line5 (from the protections response) |
- Coverage
Parameter | Type | Required | Description |
---|---|---|---|
id | int | true | Coverage ID on Line5 (from the rates response) |
- Deductible
Parameter | Type | Required | Description |
---|---|---|---|
id | int | true | Deductible ID on Line5 (from the rates response) |
- Surcharges
Parameter | Type | Required | Description |
---|---|---|---|
id | int | false | Surcharge ID on Line5 (from the rates response) |
- Template
Parameter | Type | Required | Description |
---|---|---|---|
name | varies | true | Template attibutes are listed on the quote protections responses with the name of the attibutes, the data type, and expected format |
Response
When the quote protection is updated the server will issue a response with status code 200 and the return a serialized quote in the body. It will be identical to the quote_protection create response expect the value for the template field will be set and any other values updated will be reflected as well.
HTTP Request
PUT http://example.com/api/v1/quote_protections/:id
PUT/PATCH Quote Protection (Revise Price)
curl -i -X POST -H "Content-Type: application/json" -d @update_quote_protection_request.json https://example.com/api/v1/quote-protections/:id create_quote_request.json
The above command expects JSON structured like this:
{
"data": {
"type": "quote-protection",
"id": "28603",
"attributes": {
"price": 37880.6
}
}
}
This endpoint updates the price of a specific quote protection, recalculates the quote and returns it.
Quote Protection Attributes:
Parameter | Type | Required | Description |
---|---|---|---|
price | numeral | true | The new US-Dollar price for the quote protections. Allowed are positive decimal values. |
Response
The command on in the right column in case of success responds with a JSON serialized quote like in Quote documented.
HTTP Request
PUT http://example.com/api/v1/quote_protections/:id
DELETE Quote Protection
curl -i -X DELETE -H "Content-Type: application/json" https://example.com/api/v1/quote-protections/:id delete_quote_request.json
This endpoint removes a protection from a quote. No request body needed just pass quote protection id in the url.
Response
When the quote protection is deleted the server will issue a response with status code 200. The command on in the right column in case of success responds with a JSON serialized quote like in Quote documented.
HTTP Request
DELETE http://example.com/api/v1/quote_protections/:id
Loan
GET Loan
This endpoint returns the loan. At this endpoint you can track status updates on the loan.
curl "http://example.com/api/v1/loans/LOAN_ID" -H "Authorization: Your API key"
The above command returns JSON structured like this:
{
"data": {
"id": "110372",
"type": "loans",
"attributes": {
"status": "awaiting_paperwork",
"funded-at": null,
"start-date": "2017-06-01",
"payment-day": 24,
"first-payment-date": "2017-05-24",
"balance": "435.09",
"term": 10,
"down-payment": "0.0",
"short-fund-fee": "0.0",
"monthly-payment": "47.18",
"tax": "0.0",
"base-fee": "65.26",
"buy-down-fee": "0.0",
"additional-term-fee": "0.0",
"doc-stamp-fee": "1.75",
"financed-total": "435.09",
"esign-url": "https://esignlive.com/authentication?target=https%3A%2F%2Fesignlive.com%2Ftransaction%2FVUq9ncKhz-Bc1eEB79fKodFazTU%3D%2Fsign&loginToken=VzB5Z2VyZU1RUndPSVhuSDlpSTgxT2JqcjQ1TzZCMWljdm55d29nRXF3RUJVZitmUmovaFhnQUZoSjd1SW9BVFJ0Z2M1KzNjeEdBRFlOelNidUx3Z0RBelowOWliazFaY1dkcVFUWnhWV2wxZVRsRVdVcFJlVFpRUlcxdWMyZEJhMWt4UnpKeFIzSkhSa0ZVVUV0VFlVWlVhalJEZUhsUGRrY3lNRnBJVlV1T3p5VHJjVXcreFJuY3BKSGZ1R1pzUHlMNHlPTVFHMW5aSU1zdko2ajVDUT09",
"signing-state": "unsigned"
},
"relationships": {
"unread-loan-notes": {
"data": []
},
"actual-cover-sheet": {
"data": {
"id": "9215",
"type": "loan-packages"
}
},
"customer": {
"data": {
"id": "1582",
"type": "customers"
}
},
"vehicle": {
"data": {
"id": "10432",
"type": "vehicles"
}
},
"quote-protections": {
"data": [
{
"id": "20730",
"type": "quote-protections"
}
]
}
}
},
"included": [
{
"id": "9215",
"type": "loan-packages",
"attributes": {
"documents-file-name": "5087eef7-bcc7-4778-9f34-9c4773ee529f.pdf",
"documents-content-type": "application/pdf",
"documents-file-size": 918298
},
"links": {
"download": "http://hashsat1.com:3000/api/v1/loans/110372/loan_packages/9215/download"
}
},
{
"id": "1582",
"type": "customers",
"attributes": {
"first-name": "Susann",
"last-name": "Cartwright",
"date-of-birth": "1990-01-01",
"address-1": "951 Moen Prairie",
"address-2": "",
"city": "BOCA RATON",
"state": "FL",
"postal-code": "33433",
"phone-number": "(417) 933-2362",
"cell-number": "(666) 639-6506",
"work-number": "(666) 639-6506",
"credit-score-tier": "h"
}
},
{
"id": "10432",
"type": "vehicles",
"attributes": {
"year": 2013,
"make": "Dodge",
"model": "Challenger R/T",
"vin": "2C3KA53G67H670383",
"mileage": 43,
"purchase-price": "22211.22",
"financed-amount": "20000.01",
"msrp": "25999.99",
"finance-term": 60,
"in-service-date": "2013-01-01",
"status": "used_vehicle"
}
},
{
"id": "20730",
"type": "quote-protections",
"attributes": {
"term": 12,
"name": "Allstate® Classic VSC",
"months": 12,
"mileage": 12000,
"price": "433.34"
}
}
]
}
Attributes
Parameter | Type | Description |
---|---|---|
status | string | Status of the loan. |
funded-at | date | Date of being funded. |
start-date | date | Date when the loan starts. |
payment-day | int | The day of the month when a payment is due. |
first-payment-date | date | The date when the first payment is due. |
balance | float | The account's balance. |
term | int | The term of the loan. |
down-payment | float | Amount of the down payment. |
short-fund-fee | float | The short fund fee. |
monthly-payment | float | The monthly payment. |
tax | float | The tax amount. |
base-fee | float | The base fee of the loan. |
buy-down-fee | float | The buy down fee. |
additional-term-fee | float | The additional term fee. |
doc-stamp-fee | float | The doc stamp fee. |
financed-total | float | The total of the loan. |
esign-url | string | The URL for online signature of documents. |
signing-state | string | The document signing status. |
Loan statuses
Following statuses can apply on the loan:
Status | Description | Waiting for? |
---|---|---|
awaiting_paperwork | Expecting signed documents. | Dealership |
additional_info_required | Expecting more information, new coversheet generated. For details please lookup the recent loan_note. | Dealership |
awaiting_funding | The loan has to be reviewed by Line5. | Line5 |
funded | The loan is funded and active. | n/a |
Loan signing states
Following states can apply on the loan's signing state:
Status | Description |
---|---|
unsigned | Expecting signed documents. |
in_person_pending | Marked to Print and sign manually. |
esign_customer_pending | Document signing not yet completed by customer. |
esign_dealer_pending | Document signing not yet completed by dealer. |
in_person_complete | Marked sign manual performed. |
esign_complete | Completed E-Signature. |
esign_revision_customer_pending | Document needs review and new signature by the customer. |
esign_revision_dealer_pending | Document needs review and new signature by the dealer. |
Relationships
Parameter | Type | Description |
---|---|---|
unread-loan-notes | loan_notes | References to the unread loan notes |
actual-cover-sheet | loan_packages | References the actual loan_package, which contains the cover sheet. |
customer | customer | References to the customer record. |
vehicle | vehicle | The vehicle record. |
Includes
The loan endpoint will include following, related entities:
- customer
- vehicle
- loan-package (just the actual cover sheet)
- loan-notes
GET Loan by Quote ID
This endpoint returns the loan. At this endpoint you can pass the Quote ID to receive the associated Loan.
curl "http://example.com/api/v1/loans/find_from_quote/QUOTE_ID" -H "Authorization: Token Your API key"
The above command returns the same JSON structure as expected from GET Loan.
GET Loan ID by Quote ID
This endpoint returns the loan ID. At this endpoint you can pass the Quote ID to receive the associated Loan ID.
curl "http://example.com/api/v1/loans/loan_id_lookup/QUOTE_ID" -H "Authorization: Token Your API key"
The above command returns JSON structured like this:
{"loan_id":181386}
Loan Package
GET index
curl -i -X GET -H "Content-Type: application/json" -d @create_quote_request.json https://example.com/api/v1/loans/LOAN_ID/loan_packagesf
The above command returns JSON structured like this:
{
"data": [
{
"id": "384",
"type": "loan-packages",
"attributes": {
"documents-file-name": "b56a155c-44ee-4bb6-9b5d-468a88bccb12.pdf",
"documents-content-type": "application/pdf",
"documents-file-size": 4210506
},
"links": {
"download": "http://example.com/api/v1/loans/102819/loan_packages/384/download"
}
}
]
}
The loan packages model represents the documents (cover sheet, protection forms, etc.) Every loan package has an pdf download endpoint.
Response
When the API finds loan packages for the given loan id it will return and array of loan packages containing the following fields.
Parameter | Type | Description |
---|---|---|
id | int | Id of the loan package. |
documents-file-name | string | The filename. |
documents-content-type | string | The media type of the file |
documents-file-size | int | The filesize in bytes. |
download | sting | the download url for the file |
Loan Notes
GET index
curl -i -X GET -H "Content-Type: application/json" -d @create_quote_request.json https://example.com/api/v1/loans/LOAN_ID/loan_notes
The above command returns JSON structured like this:
{
"data": [
{
"id": "384",
"type": "loan-notes",
"attributes": {
"body": "Lorem ipsum dolor",
"created-at": "2017-05-03",
"user-name": "Tony Troy"
}
}
]
}
The loan-notes model manages the communication between dealership and Line5. When Line5 needs more Information in order to fund a loan. Line 5 will communicate details at this point.
Response
When the API finds loan notes for the given loan id it will return and array of loan packages containing the following fields.
Parameter | Type | Description |
---|---|---|
id | int | Id of the loan note. |
body | string | The note text. |
created-at | date_time | The timestamp, when the note was created. |
user-name | string | The name of the author. |
Errors
This chapter describes the error response.
Json Error responses
When a semantic error occurs, the Line5 API responds with a Json structure like the example in the right column. It can contain multiple errors.
Example error response when the customer's phone number was invalid:
{
"errors":[
{
"source":{
"pointer": "/data/attributes/customer"
},
"detail": "Phone number was not sent"
}
]
}
Parameter | Type | Description |
---|---|---|
pointer | string | This value points to the attribute where the error occured |
detail | string | Description of the error |
HTTP Errors code
The Line5 API uses the following error codes in the http header:
Error Code | Word | Meaning |
---|---|---|
400 | Bad Request | It's Bad |
401 | Unauthorized | Your API key is wrong |
403 | Forbidden | The action requested is out of limits |
404 | Not Found | The specified route was not found |
422 | Unprocessable Entity | The data to create the object was invalid |
500 | Internal Server Error | We had a problem with our server. Try again later. |
503 | Service Unavailable | We're temporarily offline for maintenance. Please try again later. |