> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.goautolane.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.goautolane.com/_mcp/server.

# Request a delivery quote

POST https://api.goautolane.com/dd/v1/deliveries/quote
Content-Type: application/json

Compute availability, pickup ETA, delivery ETA, and locked delivery cost for a prospective delivery. Quote is valid for 5 minutes.

Reference: https://docs.goautolane.com/direct-delivery/api-reference/deliveries/quote

## Authentication

- `Authorization` header (bearer token, required) — Autolane Platform API key. Org-scoped with granular permissions. Deliveries endpoints additionally require an `x-retailer-id` header containing the site UUID from the Autolane Portal; webhooks endpoints do not.

## Request

### Headers

- `x-retailer-id` (string, required) — Site ID (UUID) from the Autolane Portal identifying the store location

### Body (application/json)

This endpoint expects an object.

- `external_delivery_id` (string, required)
- `customer` (DdV1DeliveriesQuotePostRequestBodyContentApplicationJsonSchemaCustomer, required)
- `delivery_address` (DdV1DeliveriesQuotePostRequestBodyContentApplicationJsonSchemaDeliveryAddress, required)
- `ready_by` (datetime, required)
- `order_items` (list of map from string to any, required)
- `pickup_instructions` (string, optional, nullable) — Store-side instructions for the driver at pickup, such as a pickup or driver code. Shown to the driver from assignment until the order is loaded. Max 2000 characters. Integrations created before `dropoff_instructions` existed may be in legacy mode, where `pickup_instructions` is treated as the dropoff note and both fields read back the same value; when both are sent, `dropoff_instructions` is used unless it is `null` or empty. Ask Autolane to switch your account to the current behavior.
- `dropoff_instructions` (string, optional, nullable) — Customer-side delivery instructions, such as a gate code or where to leave the order. Shown to the driver on the way to and at the customer. Max 2000 characters. Integrations created before `dropoff_instructions` existed may be in legacy mode, where `pickup_instructions` is treated as the dropoff note and both fields read back the same value; when both are sent, `dropoff_instructions` is used unless it is `null` or empty. Ask Autolane to switch your account to the current behavior.

## Response

### 200

Quote computed (available or unavailable)

- `success` (boolean, required)
- `data` (DdV1DeliveriesQuotePostResponsesContentApplicationJsonSchemaData, required)

## Errors

### 400 Bad Request Error

Validation error or business-rule violation (e.g., `INVALID_READY_BY`)

- `RetailerCreateDeliveryQuoteRequestBadRequestError`
  - ValidationErrorResponse: ValidationErrorResponse
  - ErrorResponse: ErrorResponse

### 401 Unauthorized Error

Invalid API key

- `error` (string, required) — Human-readable error message
- `code` (string, optional) — Machine-readable error code
- `details` (any, optional) — Additional error context

### 403 Forbidden Error

Missing permission or retailer inactive

- `error` (string, required) — Human-readable error message
- `code` (string, optional) — Machine-readable error code
- `details` (any, optional) — Additional error context

### 409 Conflict Error

Quote already consumed

- `error` (string, required) — Human-readable error message
- `code` (string, optional) — Machine-readable error code
- `details` (any, optional) — Additional error context

### 422 Unprocessable Entity Error

Geocoding failure

- `error` (string, required) — Human-readable error message
- `code` (string, optional) — Machine-readable error code
- `details` (any, optional) — Additional error context

### 503 Service Unavailable Error

Retailer not configured

- `error` (string, required) — Human-readable error message
- `code` (string, optional) — Machine-readable error code
- `details` (any, optional) — Additional error context

## Types

### DdV1DeliveriesQuotePostRequestBodyContentApplicationJsonSchemaCustomer

- `phone` (string, required)

### DdV1DeliveriesQuotePostRequestBodyContentApplicationJsonSchemaDeliveryAddress

- `street` (string, required)
- `city` (string, required)
- `state` (string, required)
- `zip` (string, required)
- `unit` (string, optional)
- `location` (DdV1DeliveriesQuotePostRequestBodyContentApplicationJsonSchemaDeliveryAddressLocation, optional)

### DdV1DeliveriesQuotePostResponsesContentApplicationJsonSchemaData

- `external_delivery_id` (string, required)
- `available` (boolean, required)
- `pickup_eta` (string, required, nullable)
- `delivery_eta` (string, required, nullable)
- `delivery_fee_cents` (double, required, nullable)
- `currency` (enum, required)
  - Allowed values: `USD`
- `expires_at` (string, required)
- `unavailable_reason` (enum, optional)
  - Allowed values: `OUT_OF_SERVICE_AREA`, `NO_DRIVERS_ONLINE`, `CUSTOMER_OPTED_OUT`, `NO_CAPACITY`

### ValidationErrorResponse

- `error` (string, required)
- `code` (enum, required)
  - Allowed values: `VALIDATION_ERROR`
- `details` (list of ValidationErrorResponseDetailsItems, required) — Zod validation error details

### ErrorResponse

- `error` (string, required) — Human-readable error message
- `code` (string, optional) — Machine-readable error code
- `details` (any, optional) — Additional error context

### DdV1DeliveriesQuotePostRequestBodyContentApplicationJsonSchemaDeliveryAddressLocation

- `lat` (double, required)
- `lng` (double, required)

### ValidationErrorResponseDetailsItems

- `path` (list of string, required)
- `message` (string, required)

## Examples

**Request**

```json
{
  "external_delivery_id": "string",
  "customer": {
    "phone": "string"
  },
  "delivery_address": {
    "street": "string",
    "city": "string",
    "state": "string",
    "zip": "string"
  },
  "ready_by": "2024-01-15T09:30:00Z",
  "order_items": [
    {}
  ]
}
```

**Response**

```json
{
  "success": true,
  "data": {
    "external_delivery_id": "string",
    "available": true,
    "pickup_eta": "string",
    "delivery_eta": "string",
    "delivery_fee_cents": 1.1,
    "currency": "USD",
    "expires_at": "string",
    "unavailable_reason": "OUT_OF_SERVICE_AREA"
  }
}
```

**SDK Code**

```python
import requests

url = "https://api.goautolane.com/dd/v1/deliveries/quote"

payload = {
    "external_delivery_id": "string",
    "customer": { "phone": "string" },
    "delivery_address": {
        "street": "string",
        "city": "string",
        "state": "string",
        "zip": "string"
    },
    "ready_by": "2024-01-15T09:30:00Z",
    "order_items": [{}]
}
headers = {
    "x-retailer-id": "x-retailer-id",
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
```

```javascript
const url = 'https://api.goautolane.com/dd/v1/deliveries/quote';
const options = {
  method: 'POST',
  headers: {
    'x-retailer-id': 'x-retailer-id',
    Authorization: 'Bearer <token>',
    'Content-Type': 'application/json'
  },
  body: '{"external_delivery_id":"string","customer":{"phone":"string"},"delivery_address":{"street":"string","city":"string","state":"string","zip":"string"},"ready_by":"2024-01-15T09:30:00Z","order_items":[{}]}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://api.goautolane.com/dd/v1/deliveries/quote"

	payload := strings.NewReader("{\n  \"external_delivery_id\": \"string\",\n  \"customer\": {\n    \"phone\": \"string\"\n  },\n  \"delivery_address\": {\n    \"street\": \"string\",\n    \"city\": \"string\",\n    \"state\": \"string\",\n    \"zip\": \"string\"\n  },\n  \"ready_by\": \"2024-01-15T09:30:00Z\",\n  \"order_items\": [\n    {}\n  ]\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("x-retailer-id", "x-retailer-id")
	req.Header.Add("Authorization", "Bearer <token>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://api.goautolane.com/dd/v1/deliveries/quote")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["x-retailer-id"] = 'x-retailer-id'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"external_delivery_id\": \"string\",\n  \"customer\": {\n    \"phone\": \"string\"\n  },\n  \"delivery_address\": {\n    \"street\": \"string\",\n    \"city\": \"string\",\n    \"state\": \"string\",\n    \"zip\": \"string\"\n  },\n  \"ready_by\": \"2024-01-15T09:30:00Z\",\n  \"order_items\": [\n    {}\n  ]\n}"

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://api.goautolane.com/dd/v1/deliveries/quote")
  .header("x-retailer-id", "x-retailer-id")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("{\n  \"external_delivery_id\": \"string\",\n  \"customer\": {\n    \"phone\": \"string\"\n  },\n  \"delivery_address\": {\n    \"street\": \"string\",\n    \"city\": \"string\",\n    \"state\": \"string\",\n    \"zip\": \"string\"\n  },\n  \"ready_by\": \"2024-01-15T09:30:00Z\",\n  \"order_items\": [\n    {}\n  ]\n}")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.goautolane.com/dd/v1/deliveries/quote', [
  'body' => '{
  "external_delivery_id": "string",
  "customer": {
    "phone": "string"
  },
  "delivery_address": {
    "street": "string",
    "city": "string",
    "state": "string",
    "zip": "string"
  },
  "ready_by": "2024-01-15T09:30:00Z",
  "order_items": [
    {}
  ]
}',
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'Content-Type' => 'application/json',
    'x-retailer-id' => 'x-retailer-id',
  ],
]);

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://api.goautolane.com/dd/v1/deliveries/quote");
var request = new RestRequest(Method.POST);
request.AddHeader("x-retailer-id", "x-retailer-id");
request.AddHeader("Authorization", "Bearer <token>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"external_delivery_id\": \"string\",\n  \"customer\": {\n    \"phone\": \"string\"\n  },\n  \"delivery_address\": {\n    \"street\": \"string\",\n    \"city\": \"string\",\n    \"state\": \"string\",\n    \"zip\": \"string\"\n  },\n  \"ready_by\": \"2024-01-15T09:30:00Z\",\n  \"order_items\": [\n    {}\n  ]\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = [
  "x-retailer-id": "x-retailer-id",
  "Authorization": "Bearer <token>",
  "Content-Type": "application/json"
]
let parameters = [
  "external_delivery_id": "string",
  "customer": ["phone": "string"],
  "delivery_address": [
    "street": "string",
    "city": "string",
    "state": "string",
    "zip": "string"
  ],
  "ready_by": "2024-01-15T09:30:00Z",
  "order_items": [[]]
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://api.goautolane.com/dd/v1/deliveries/quote")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```