Skip to main content

Overview

Drivly’s Transport & Delivery API simplifies the complex process of managing vehicle transport and delivery services, offering a straightforward solution for obtaining quotes and placing orders. It’s designed to enhance operational efficiency, reduce costs, and ensure high-quality service. With customizable UI components, businesses can seamlessly integrate transportation capabilities into their products and gain access to a network of professional service providers, ensuring prompt and exceptional care for their vehicles.

Types of Transportation

  • Long Haul
  • Last Mile
  • Valet
  • Tow

Transport vehicles over long distances, typically between cities or states.

Workflows

The Transport & Delivery API facilitates two primary types of transportation and delivery services: Quote and Order vehicle transportation services.

Quote Transport & Delivery

Retrieve instant cost estimates for transporting and delivering vehicles over any distances.
You can obtain a quote for a Wash & Detail service, including all of our different tiers of service. The quote will return with a checkout link, which you should redirect the customer towards. Once the customer has paid, a service order will be created with the details of the quote.
Attaching a deal to a quote will allow you to track all services related to that specific deal. The final invoice for the deal will include this quote, but will state that it was paid for separately.
Create Quote
{
  "type": "transport-&-delivery",
  "vin": "WP0AF2A99KS165242",
  "fromZip": "60695",
  "toZip": "55379",
  "deal": "deal_9f8Y7c" // Optional, but recommended
}
Example Response
{
  "id": "quote_af87Yd",
  "deal": "deal_9f8Y7c",
  "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"
    }
  ]
}
Upon payment, a service order will be generated with all pertinent details and an estimated completion time. Progress of the service order can be monitored using webhooks, ensuring timely updates throughout the transport and delivery process.

Order Transport & Delivery

Easily order transportation and delivery to meet precise delivery standards and deadlines.
Creating a service order for transport and delivery services allows you to schedule, and pay for the service directly. This will create a service order which can be used to track progress of your vehicle’s transport and delivery.
For service orders, attaching a deal is highly recommended as this will allow you to keep all pending invoices in one place. The final invoice for the deal will include this order, but is rolled up into the total cost of the deal.
To place an order, you can submit a request with the following information:
Create Order
{
  "type": "transport-&-delivery",
  "vin": "WP0AF2A99KS165242",
  "deal": "deal_9f8Y7c"
}
Example Response
{
  "id": "order_fcx8YdY2lM2zjR",
  "deal": "deal_9f8Y7c",
  "status": "pending",
  "estimatedTime": "2024-01-01T12:00:00Z",
  "receiptLink": "https://checkout.driv.ly/order_fcx8YdY2lM2zjR",
  "paid": true,
  "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
      }
    }
  ]
}
You’ll be notified of the service order’s status via webhooks, ensuring you’re always up-to-date on the progress of your vehicle’s transport and delivery.

Webhooks

service.created - This event is triggered when a service order is created, providing you with the details of the order:
{
  "event": "service.created",
  "type": "transport-&-delivery",
  "data": {
    "id": "order_fcx8YdY2lM2zjR",
    "deal": "deal_9f8Y7c",
    "status": "pending", // pending, in-progress, completed, delayed, canceled
    "estimatedTime": "2024-01-01T12:00:00Z",
    "receiptLink": "https://checkout.driv.ly/order_fcx8YdY2lM2zjR",
    "paid": true,
    "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
        }
      }
    ],
    "history": [
      // An Array to show the keys changed and when
      {
        "status": "pending",
        "paid": true,
        "time": "2024-01-01T12:00:00Z"
      }
    ]
  }
}
service.updated - This event is triggered when a service order is updated, for example, when we have picked up the vehicle and are in transit or when the service has an issue:
{
  "event": "service.updated",
  "type": "transport-&-delivery",
  "data": {
    "id": "order_fcx8YdY2lM2zjR",
    "deal": "deal_9f8Y7c",
    "status": "in-progress",
    "estimatedTime": "2024-01-01T12:00:00Z",
    "receiptLink": "https://checkout.driv.ly/order_fcx8YdY2lM2zjR",
    "paid": true,
    "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
        }
      }
    ],
    "history": [
      {
        "status": "pending",
        "paid": true,
        "time": "2024-01-01T12:00:00Z"
      },
      {
        "status": "in-progress",
        "time": "2024-01-02T12:00:00Z"
      }
    ]
  }
}
service.completed - This event is triggered when a service order is completed:
{
  "event": "service.completed",
  "type": "transport-&-delivery",
  "data": {
    "id": "order_fcx8YdY2lM2zjR",
    "deal": "deal_9f8Y7c",
    "status": "completed",
    "estimatedTime": "2024-01-01T12:00:00Z",
    "receiptLink": "https://checkout.driv.ly/order_fcx8YdY2lM2zjR",
    "paid": true,
    "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
      }
    ],
    "history": [
      {
        "status": "pending",
        "paid": true,
        "time": "2024-01-01T12:00:00Z"
      },
      {
        "status": "in-progress",
        "time": "2024-01-02T12:00:00Z"
      },
      {
        "status": "completed",
        "time": "2024-01-04T12:00:00Z"
      }
    ]
  }
}

Next Steps

Ready to get started with Transport & Delivery API?
I