Prerequisites

Before diving into the integration process, ensure you have the following:

  1. Sign up for a Drivly account
  2. Create a DRIVLY_API_KEY
  3. Have a basic understanding of REST APIs
  4. A secure environment for handling sensitive data

Always perform Transport & Delivery operations server-side to secure API keys.


Overview

The Transport & Delivery API offers endpoints to retrieve quotes for vehicle transportation and delivery services. By integrating this API into your platform, you can provide customers with a seamless experience to order transport services directly.

Let’s follow the example scenario below:

Matt works for a large automotive sales platform, AutoHub. AutoHub wants to integrate the Transport & Delivery API into their online services, allowing customers to order transport services without the need for a salesperson.

To complete this scenario, you will need to:

  1. Enter route details.
  2. Capture contact information.
  3. Receive a quote.
  4. Order transport services.

Walkthrough

1

Enter Vehicle and Route Details

Request Body
{
  "type": "transport-&-delivery",
  "vin": "WP0AF2A99KS165242",
  "fromZip": "60695",
  "toZip": "55379",
  "trailerType": "enclosed",
  "pickupDate": "2024-06-01T12:00:00Z"
}
2

Capture Contact Information

Request Body
{
  "firstName": "Matt",
  "lastName": "Foley",
  "email": "matt.foley@gmail.com",
  "phone": "651-225-0607"
}
3

Receive Quote

Quote Response
{
  "id": "quote_af87Yd",
  "status": "awaiting-payment",
  "estimatedTime": "2024-01-01T12:00:00Z",
  "checkoutLink": "https://checkout.driv.ly/quote_af87Yd",
  "paid": false,
  "total": 796.5,
  "items": [
    {
      "service": "transport-&-delivery",
      "price": 796.5,
      "name": "Transport & Delivery",
      "description": "Transport and delivery for WP0AF2A99KS165242",
      "fromZip": "60695",
      "toZip": "55379",
      "distance": 429,
      "eta": {
        "min": 2,
        "max": 3
      },
      "expiration": "2024-05-03T20:21:08.8439704+00:00"
    }
  ]
}
4

Order

Request Body
{
  "type": "transport-&-delivery",
  "vin": "WP0AF2A99KS165242",
  "quoteId": "quote_af87Yd"
}

Next Steps

Ready to get started with Transport & Delivery API?