Dealerware

Dealerware's Contracts API Flow


Leverage our cutting-edge Contracts API Flow to transform your automotive business operations.

Dealerware's Contracts API Flow is designed to revolutionize the way automotive businesses manage their service appointments and customer interactions. As the automotive industry evolves, customers crave more efficient, contactless solutions, and Dealerware is at the forefront of satisfying these modern demands. Our Contracts API not only facilitates a more streamlined contracting process but also enhances the customer experience by minimizing unnecessary wait times, reducing physical contact, and ensuring that services are personalized and efficient.

Key Features:

  • Improve digital contracting: The ability to send, receive, and finalize contracts digitally reduces the need for physical paperwork, creating a safer, contactless environment for both customers and staff. This efficiency also speeds up the contracting process, allowing customers to get back on the road faster.
  • Customize your appointments: Send appointment specifics directly through the API, allowing for the creation of a detailed customer profile before they even arrive. This feature means you can tailor the service experience to each customer's needs and preferences, making their visit more efficient and enjoyable.
  • Enhance your on-lot time management: Improve operational flow by understanding exactly when customers arrive for their appointments and how long they stay. This information helps in optimizing staff allocation, reducing wait times, and enhancing the overall customer service experience.

API Flow Overview:

To successfully create a contract for a fleet, it is crucial to follow specific steps that ensure all necessary information is accurately gathered and validated. These steps include:

By following these steps, dealerships can ensure that all required information is accurately collected and verified, leading to a smooth and efficient contract creation process for fleet management.



Endpoint Specifications

AUTHENTICATION & AUTHORIZATION

Our Quickstart Guide provides instructions on how to get an Authorization token.

Usage Notes:
  • Ensure that the Authorization token is kept secure and is not exposed in client-side applications.
  • Many endpoints require administrative privileges; standard user accounts may not have access to all endpoints.

DEALERSHIPS

Retrieve Dealerships

This API endpoint retrieves a list of dealerships available to the authenticated user. It is designed for administrators to manage dealership information and to select the correct dealer context for subsequent requests.

HTTP Method: GET
Endpoint: {{base_url}}/admin/dealerships
Headers:

                  API-version: 4
                  Content-Type: application/json
                  Accept: application/json
                  Authorization: Bearer [ACCESS_TOKEN]
                

Curl Example:

curl --location 'https://api.dw-tst.com/admin/dealerships' \
                       --header 'api-version: 4' \
                       --header 'Content-Type: application/json' \
                       --header 'Accept: application/json' \
                       --header 'Authorization: Bearer [ACCESS_TOKEN]'
                

Usage Notes: Replace [ACCESS_TOKEN] with the appropriate value.

Response Structure:

                  {
                    "dealerships": [
                      {
                        "id": 1,
                        "name": "Main Street Motors",
                           "formatted_hours": "Mon - Sun 12:00am - 11:59pm",
                         "onboarding_complete": true
                      },
                      {
                        "id": 2,
                        "name": "City Autos",
                     "formatted_hours": "Mon - Sun 12:00am - 11:59pm",
                         "onboarding_complete": true
                      }
                    ]
                  }
                
Error Responses:
  • 401 Unauthorized: If the authorization header is missing or the token is invalid.
  • 403 Forbidden: If the authenticated user does not have permission to access the requested data.
  • 404 Not Found: If the specified resource does not exist.
  • 500 Internal Server Error: For any server errors.

Retrieve Specific Dealership

This API endpoint is used to retrieve detailed information about a specific dealership based on the provided dealership ID. This endpoint is particularly useful for administrators who need to view or manage individual dealership details.

HTTP Method: GET
Endpoint: {{base_url}}/admin/dealerships/{{dealership_id}}
URL Parameters: dealership_id - The unique identifier for the dealership. This should be replaced with the actual ID of the dealership you wish to retrieve.
Curl Example:

curl --location 'https://api.dw-tst.com/admin/dealerships/27' \
                  --header 'api-version: 4' \
                  --header 'Content-Type: application/json' \
                  --header 'Accept: application/json' \
                  --header 'Authorization: Bearer [ACCESS_TOKEN]'
                

Response Structure:

                  {
                      "id": 27,
                      "name": "Audi Henderson",
                      "phone_number": "1698241358",
                      "salesforce_id": "a0M36000004yqc3EAA",
                      "time_zone": "America/Los_Angeles",
                      "address": {
                          "line1": "Street11698240580",
                          "line2": "Street21698240580",
                          "city": "randomCity1698240580",
                          "state": "CA",
                          "zip": "64445",
                          "country": "US",
                          "latitude": "36.047133",
                          "longitude": "-115.020703"
                      },
                      "formatted_hours": "Mon - Fri 7:30am - 6:00pm\nSat 8:00am - 4:00pm\nSun 12:00am - 12:00am",
                      "open_days": [
                          {
                              "id": 57,
                              "open": false,
                              "day": 0,
                              "opening": "09:00",
                              "closing": "18:00"
                          },
                          // Additional days...
                      ],
                      "dealership_hours": [
                          {
                              "day_of_week": 1,
                              "open_hour": 7,
                              "open_minute": 30,
                              "close_hour": 18,
                              "close_minute": 0
                          },
                          // Additional days...
                      ],
                      "onboarding_complete": true,
                      "has_ccs": true,
                      "has_tolls": false,
                      "locale": "en-US",
                      "email": "wall.test+1698241358@silvercar.com",
                      "pdp": false,
                      "contract_required": false
                  }
                

CUSTOMERS

Create Customer Profile for a Dealership

This API endpoint is used to create or update a customer's information associated with a specific dealership. This functionality is crucial for maintaining current and accurate customer records.

HTTP Method: POST
URL Parameters: dealership_id - The unique identifier of the dealership.
Endpoint: {{base_url}}/admin/dealerships/{{dealership_id}}/customers
Request Body:

                  {
                      "first_name": "Jaime",
                      "last_name": "Kilback",
                      "email": "Hillary4@example.org",
                      "phone_number": "496-932-7104",
                      "language": "en"
                  }
                

Curl Example:

curl --location 'https://api.dw-tst.com/admin/dealerships/27/customers' \
                       --header 'Api-version: 4' \
                       --header 'Authorization: Bearer [ACCESS_TOKEN]' \
                       --header 'Content-Type: application/json' \
                       --data-raw '{
                           "first_name": "Jaime",
                           "last_name": "Kilback",
                           "email": "Hillary4@example.org",
                           "phone_number": "496-932-7104",
                           "language": "en"
                       }'
                

Response: 201 Created: The server successfully created or updated the customer record. There is no response body for this operation.


Retrieve Customers from a Specific Dealership

This endpoint allows administrators to retrieve a list of all customers associated with a specific dealership. This is crucial for managing customer relations and tracking customer interactions at the dealership level.

HTTP Method: GET
URL Parameters: dealership_id - The unique identifier of the dealership whose customers you want to retrieve.
Endpoint: {{base_url}}/admin/dealerships/{{dealership_id}}/customers
Query-String Parameters:

sort - Allows sorting by amount_due, email, first_name, or last_name. Prefix with a minus ("-") for descending order, example: sort=-last_name.
                  
amount_due - A boolean filter to show customers with or without an amount due. Set to true to show customers with amounts due.
per_page - Number of records to return in the response, example: per_page=20.
page - Page number to retrieve in a paginated response, example: page=2.

Curl Example:

curl --location 'https://api.dw-tst.com/admin/dealerships/27/customers' \
                       --header 'Api-version: 4' \
                       --header 'Authorization: Bearer [ACCESS_TOKEN]' \
                       --header 'Content-Type: application/json'
                

Response Structure:

                  [
                      {
                          "id": 5,
                          "amount_due": "0.0",
                          "complete_profile": false,
                          "email": "new5@somecompany.com",
                          "first_name": "John",
                          "last_name": "Smith",
                          "language": "en",
                          "permitted_to_rent": true,
                          "phone_number": "5555556666",
                          "links": {
                              "dealership": {
                                  "id": 27,
                                  "href": "https://api.dw-tst.com/admin/dealerships/27"
                              }
                          },
                          "ccpa": false,
                          "has_ongoing_contracts": false
                      },
                      // Additional customer objects
                  ]
                

Usage Notes: It is important to handle personal data per GDPR, CCPA, or other relevant privacy regulations. Use this endpoint to monitor customer engagements and improve service offerings at the dealership level. Ensure that you have appropriate permissions and that access tokens are securely handled.


Retrieve Customer Details

This API endpoint is designed to retrieve detailed information about a specific customer. It is useful for administrators who can access customer profiles, including their contact information, rental status, and associated dealership.

HTTP Method: GET
Endpoint: {{base_url}}/admin/customers/{{customer_id}}
URL Parameters: customer_id - The unique identifier for the customer whose details are to be retrieved.
Curl Example:

curl --location 'https://api.dw-tst.com/admin/customers/5' \
                       --header 'Api-version: 4' \
                       --header 'Authorization: Bearer [ACCESS_TOKEN]' \
                       --header 'Content-Type: application/json' \
                

Response Structure:

                  {
                      "id": 5,
                      "amount_due": "0.0",
                      "complete_profile": false,
                      "email": "new5@somecompany.com",
                      "first_name": "John",
                      "last_name": "Smith",
                      "language": "en",
                      "permitted_to_rent": true,
                      "phone_number": "5555556666",
                      "links": {
                          "dealership": {
                              "id": 27,
                              "href": "https://api.dw-tst.com/admin/dealerships/27"
                          }
                      },
                      "ccpa": false,
                      "has_ongoing_contracts": false
                  }
                

Add Driver's License for a Customer

Add or Update driver's license information associated with the customer the main validation is the date which should be bigger than the current date.

HTTP Method: POST
Endpoint: {{base_url}}/admin/customers/{{customer_id}}/drivers_license
URL Parameters: customer_id - The unique identifier of the customer whose driver's license details are to be added or updated.
Request Body:

                  {
                    "number": "TX4321",
                    "subregion": "Test",
                    "line1": "Address 1",
                    "line2": "Address Optional",
                    "city": "Austin",
                    "zip": "12345",
                    "country": "US",
                    "born_on": "1999-04-18",
                    "expires_on": "2029-04-18",
                    "name": "Dorcas Hill",
                    "active": true
                  }
                
Curl Example:

curl --location 'https://api.dw-tst.com/admin/customers/111/drivers_license' \
                       --header 'Api-version: 4' \
                       --header 'Authorization: Bearer [ACCESS_TOKEN]' \
                       --header 'Content-Type: application/json' \
                       --data-raw '{
                           "number": "TX4321",
                           "subregion": "Test",
                           "line1": "Address 1",
                           "line2": "Address Optional",
                           "city": "Austin",
                           "zip": "12345",
                           "country": "US",
                           "born_on": "1999-04-18",
                           "expires_on": "2029-04-18",
                           "name": "Dorcas Hill",
                           "active": true
                       }'
                

Response: 201 Created: The server successfully created or updated the customer record. There is no response body for this operation.


Retrieve Customer's Driver's License

This API endpoint is used to retrieve a customer's driver's license in the system. It is crucial for the customer to require a valid driver's license, such as vehicle rentals.

HTTP Method: GET
Endpoint: {{base_url}}/admin/customers/{{customer_id}}/drivers_license/active
URL Parameters: customer_id - The unique identifier for the customer whose driver's license is being activated.
Request Body:

                  {
                    "id": 781465,
                    "number": "TX4321",
                    "subregion": "Test",
                    "country": "US",
                    "born_on": "1999-04-18",
                    "expires_on": "2029-04-18",
                    "name": "Evalyn Mertz",
                    "active": true,
                    "line1": "Address 1",
                    "line2": "Address Optional",
                    "city": "Austin",
                    "zip": "12345"
                  }
                

Curl Example:

curl --location 'https://api.dw-tst.com/admin/customers/111/drivers_license/active' \
                       --header 'Api-version: 4' \
                       --header 'Authorization: Bearer [ACCESS_TOKEN]' \
                       --header 'Content-Type: application/json' \
                       --data-raw '{
                           "id": 781465,
                           "number": "TX4321",
                           "subregion": "Test",
                           "country": "US",
                           "born_on": "1999-04-18",
                           "expires_on": "2029-04-18",
                           "name": "Evalyn Mertz",
                           "active": true,
                           "line1": "Address 1",
                           "line2": "Address Optional",
                           "city": "Austin",
                           "zip": "12345"
                       }'
                

Add Customer's Insurance Information

This API endpoint enables the addition or update of insurance details for a specific customer. This operation is vital for ensuring that all rental transactions are covered by appropriate insurance policies, thereby protecting both the customer and the company.

HTTP Method: POST
Endpoint: {{base_url}}/admin/customers/{{customer_id}}/insurance
URL Parameters: customer_id - The unique identifier for the customer whose insurance details are to be added or updated.
Request Body:

                  {
                      "carrier": "Fake Insurance",
                      "is_silvercar": false,
                      "is_personal": true,
                      "is_corporate": false,
                      "policy_number": "POLICY77627838411",
                      "expires_on": "2029-04-18"
                  }
                

Curl Example:

curl --location 'https://api.dw-tst.com/admin/customers/111/insurance' \
                       --header 'Api-version: 4' \
                       --header 'Authorization: Bearer [ACCESS_TOKEN]' \
                       --header 'Content-Type: application/json' \
                       --data-raw '{
                           "carrier": "Fake Insurance",
                           "is_silvercar": false,
                           "is_personal": true,
                           "is_corporate": false,
                           "policy_number": "POLICY77627838411",
                           "expires_on": "2029-04-18"
                       }'
                

Response: 201 Created: Indicates that the insurance details have been successfully created or updated. There is no response body.


Retrieve Customer's Insurance Information

This API endpoint is designed to retrieve the insurance information associated with a specific customer. It is essential to verify insurance coverage before engaging in services that require such validation.

HTTP Method: GET
Endpoint: {{base_url}}/admin/customers/{{customer_id}}/insurance
URL Parameters: customer_id - The unique identifier for the customer whose insurance information is being retrieved.
Curl Example:

curl --location 'https://api.dw-tst.com/admin/customers/111/insurance' \
                       --header 'Api-version: 4' \
                       --header 'Authorization: Bearer [ACCESS_TOKEN]' \
                       --header 'Content-Type: application/json'
                

Response Structure:

                  {
                      "id": 264759,
                      "carrier": "Fake Insurance",
                      "policy_number": "POLICY77627838411",
                      "expires_on": "2029-04-18",
                      "customer_id": 111,
                      "image": null
                  }
                

CONTRACTS

Retrieve Dealership Fleets

This API endpoint allows users to retrieve detailed information about fleets registered under a specific dealership. It's crucial for managing fleet inventories and understanding the specifications and agreements associated with each fleet.

HTTP Method: GET
Endpoint: {{base_url}}/admin/dealerships/{{dealership_id}}/fleets
URL Parameters: dealership_id - The unique identifier for the dealership whose fleet information is being retrieved.
Curl Example:

curl --location 'https://api.dw-tst.com/admin/dealerships/27/fleets' \
                     --header 'Api-version: 4' \
                     --header 'Authorization: Bearer [ACCESS_TOKEN]' \
                     --header 'Content-Type: application/json' \
                     --header 'Accept: application/json'
              

Response Structure:

                [
                    {
                        "id": 27,
                        "name": "Courtesy",
                        "agreement_id": 36604,
                        "contractable": true,
                        "repair_order_number_required": true,
                        "external_availability_group": false,
                        "pdf_agreement_url": "https://api-ctm-530-implement-vehicle-flee.dw-tst.dev/templates/templates/Audi_Henderson_I2Fdz89nuxz0RJE05o2kQw/27_2022_12_08_17_56_21.pdf",
                        "allow_charge_later": true,
                        "allow_manual_signature": false,
                        "misc": {"defleet_settings": null}
                    }
                ]
              

Usage Notes: This endpoint is vital for fleet management, allowing for an overview of all available vehicles and their conditions at a dealership.


Retrieve Dealership Vehicles

This API endpoint is used to retrieve detailed information about the vehicles registered under a specific dealership. It is essential for managing vehicle inventories, and understanding vehicle specifics, and operational statuses within a dealership.

HTTP Method: GET
Endpoint: {{base_url}}/admin/dealerships/{{dealership_id}}/vehicles
URL Parameters: dealership_id - The unique identifier for the dealership whose vehicles are being retrieved.
Curl Example:

curl --location 'https://api.dw-tst.com/admin/dealerships/27/vehicles' \
                     --header 'api-version: 4' \
                     --header 'Authorization: Bearer [ACCESS_TOKEN]' \
                     --header 'Content-Type: application/json' \
                     --header 'Accept: application/json'
              

Response Structure:

                [
                    {
                        "id": 1972,
                        "connected": false,
                        "make": "Audi",
                        "model": "A4",
                        "year": 2017,
                        "vin": "WAUANAF49HN002461",
                        "license": "35E-235",
                        "odometer": {
                            "unit": "km",
                            "value": 59528.043632548026
                        },
                        "status": "rented",
                        "stock_number": "SC2461",
                        "toll_tag_number": "QWERTY12123453234532",
                        "color": "GREEN GRASS",
                        "links": {
                            "fleet": {
                                "id": 27,
                                "href": "https://api.dw-tst.com/admin/fleets/27"
                            },
                            "fleets": [
                                {
                                    "id": 27,
                                    "href": "https://api.dw-tst.com/admin/fleets/27"
                                }
                            ]
                        }
                    }
                ]
              

Retrieve Service Advisors from a Dealership

This API endpoint is used to retrieve a list of service advisors associated with a specific dealership. It is crucial for managing service operations and maintaining quality customer service within the dealership.

HTTP Method: GET
Endpoint: {{base_url}}/admin/dealerships/{{dealership_id}}/service_advisors
URL Parameters: dealership_id - The unique identifier for the dealership whose service advisors are being retrieved.
Curl Example:

curl --location 'https://api.dw-tst.com/admin/dealerships/27/service_advisors' \
                     --header 'Api-version: 4' \
                     --header 'Authorization: Bearer [ACCESS_TOKEN]' \
                     --header 'Content-Type: application/json' \
                     --header 'Accept: application/json'
              

Response Structure:

                [
                    {
                        "id": 284030,
                        "first_name": "John",
                        "last_name": "Smith"
                    },
                    {
                        "id": 288767,
                        "first_name": "John",
                        "last_name": "Smith"
                    },
                    {
                        "id": 304433,
                        "first_name": "John",
                        "last_name": "Smith"
                    }
                ]
              

Create a Contract for Fleet

This API endpoint is used to create a contract for a vehicle within a specified fleet. It is utilized during the process of vehicle reservation and rental, allowing the integration of customer details, service advisor inputs, and vehicle specifics into a formal agreement.

HTTP Method: POST
Endpoint: {{base_url}}/admin/fleets/{{fleet_id}}/contracts
URL Parameters: fleet_id - The unique identifier for the fleet where the contract will be created.
Request Body:

                {
                    "customer_id": "unique_customer_id",
                    "pickup_at": "reservation_pickup_datetime",
                    "dropoff_at": "reservation_dropoff_datetime",
                    "repair_order": "repair_order_number",
                    "service_advisor_id": "unique_service_advisor_id",
                    "vehicle_id": "unique_vehicle_id"
                }
              

Curl Example:

curl --location 'https://api.dw-tst.com/admin/fleets/18034/contracts' \
                     --header 'api-version: 4' \
                     --header 'Authorization: Bearer [ACCESS_TOKEN]' \
                     --header 'Content-Type: application/json' \
                     --header 'Accept: application/json' \
                     --data '{
                                "customer_id": 111,
                                "pickup_at": "2024-04-18T09:00:00Z",
                                "dropoff_at": "2024-04-20T09:00:00Z",
                                "repair_order": "test",
                                "service_advisor_id": "284030",
                                "vehicle_id": "1973"
                            }'
              

Usage Notes: This endpoint is essential for automating the contract creation process in fleet management and vehicle rental operations. Ensure that all required fields are provided to avoid errors and ensure the integrity of the contract creation process.