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

# Quote a trip

POST https://api.fleetwire.io/api/v2/quote
Content-Type: application/json

Prices a trip with the same math checkout uses and says whether the vehicle is free. Nothing is saved, so call it as often as you like (120 per minute).

**Body**

* `l_id` (string, required)
* `start`, `end` (string, required) — local times in the listing's timezone
* `extras` (array, optional) — `[{"id": "<extra uuid>", "option": "<option uuid>"}]`. Omit `option` for the first one. Use `with=listings` on `GET /extras` to see what each listing offers. Required extras are always charged; listing one here picks its option.
* `coupon` (string, optional)
* `email` (string, optional) — needed only for coupons limited per customer

**Response**

* `available` — `false` if the vehicle is booked or blocked for those dates (buffer time included)
* `totals` — all in cents: `subtotal`, `discounts`, `taxes`, `total`, `security_deposit`, and `due_at_checkout` (what the renter pays now, per your payment settings)
* `checkout_url` — your storefront's checkout for this listing with the dates filled in. Send the renter there to book and pay; you'll get `reservation.created` when they do.

Delivery isn't priced here yet. Trips that break your booking rules (hours, lead time, trip length) return `422` with the reason under `errors.dates`.

Reference: https://docs.fleetwire.io/api-reference/quotes/post-quote

## Authentication

- `Authorization` header (bearer token, required) — An API token from **Settings → API tokens** in Fleetwire, sent as `Authorization: Bearer …`. Each token carries scopes: `read` for every GET, plus write scopes such as `bookings:write`.

## Servers

- `https://api.fleetwire.io/api` (Production, default)
- `https://staging.fleetwire.io/api` (Sandbox (Partner API))

## Request

### Body (application/json)

This endpoint expects an object.

- `l_id` (string, required)
- `start` (string, required) — A date and time, e.g. `2026-11-06 10:00:00` or ISO 8601.
- `end` (string, required) — After `start`.
- `extras` (list of V2QuotePostRequestBodyContentApplicationJsonSchemaExtrasItems, optional, nullable)
- `coupon` (string, optional, nullable)
- `email` (string, optional, nullable)

## Response

### 200

OK

- `quote` (V2QuotePostResponsesContentApplicationJsonSchemaQuote, optional)

## Errors

### 401 Unauthorized Error

Missing or invalid token.

- `message` (string, required)

### 403 Forbidden Error

The token doesn't carry the scope this needs, or the plan doesn't include API access.

- `message` (string, required)

### 422 Unprocessable Entity Error

The request is invalid.

- `message` (string, required)
- `errors` (map from string to list of string, required) — Each invalid field with its problems.

### 429 Too Many Requests Error

Too many requests. Wait for the `Retry-After` header (seconds).

- `message` (string, required)

## Types

### V2QuotePostRequestBodyContentApplicationJsonSchemaExtrasItems

- `id` (string, required)
- `option` (string, optional, nullable)

### V2QuotePostResponsesContentApplicationJsonSchemaQuote

- `l_id` (string, optional)
- `start` (string, optional)
- `end` (string, optional)
- `timezone` (string, optional)
- `available` (boolean, optional)
- `duration` (V2QuotePostResponsesContentApplicationJsonSchemaQuoteDuration, optional)
- `currency` (string, optional)
- `lines` (list of V2QuotePostResponsesContentApplicationJsonSchemaQuoteLinesItems, optional)
- `coupon` (string, optional)
- `totals` (V2QuotePostResponsesContentApplicationJsonSchemaQuoteTotals, optional)
- `checkout_url` (string, optional)

### V2QuotePostResponsesContentApplicationJsonSchemaQuoteDuration

- `units` (integer, optional)
- `unit` (string, optional)
- `days` (integer, optional)
- `hours` (integer, optional)

### V2QuotePostResponsesContentApplicationJsonSchemaQuoteLinesItems

- `type` (string, optional)
- `title` (string, optional)
- `charge_label` (string, optional)
- `price_each_in_cents` (integer, optional)
- `price_in_cents` (integer, optional)
- `discount_in_cents` (integer, optional)
- `tax_in_cents` (integer, optional)

### V2QuotePostResponsesContentApplicationJsonSchemaQuoteTotals

- `subtotal_in_cents` (integer, optional)
- `discounts_in_cents` (integer, optional)
- `taxes_in_cents` (integer, optional)
- `total_in_cents` (integer, optional)
- `security_deposit_in_cents` (integer, optional)
- `due_at_checkout_in_cents` (integer, optional)

## Examples

### Quote

**Response**

```json
{
  "quote": {
    "l_id": "l_EXAMPLE1",
    "start": "2026-11-06 10:00:00",
    "end": "2026-11-09 10:00:00",
    "timezone": "America/Chicago",
    "available": true,
    "duration": {
      "units": 3,
      "unit": "day",
      "days": 3,
      "hours": 72
    },
    "currency": "USD",
    "lines": [
      {
        "type": "vehicle",
        "title": "2022 Toyota RAV4 Hybrid",
        "charge_label": "3 days",
        "price_each_in_cents": 6900,
        "price_in_cents": 20700,
        "discount_in_cents": 2070,
        "tax_in_cents": 1863
      },
      {
        "type": "extra",
        "title": "Child seat - Infant",
        "charge_label": "1 trip",
        "price_each_in_cents": 2500,
        "price_in_cents": 2500,
        "discount_in_cents": 250,
        "tax_in_cents": 225
      }
    ],
    "coupon": "FALL10",
    "totals": {
      "subtotal_in_cents": 23200,
      "discounts_in_cents": 2320,
      "taxes_in_cents": 2088,
      "total_in_cents": 22968,
      "security_deposit_in_cents": 25000,
      "due_at_checkout_in_cents": 22968
    },
    "checkout_url": "https://example-rentals.fleetwire.io/rental/reservations/l_EXAMPLE1?startDate=2026-11-06&startTime=1000&endDate=2026-11-09&endTime=1000"
  }
}
```

**SDK Code**

```python Quote
import requests

url = "https://api.fleetwire.io/api/v2/quote"

headers = {"Authorization": "Bearer <token>"}

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

print(response.json())
```

```javascript Quote
const url = 'https://api.fleetwire.io/api/v2/quote';
const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};

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

```go Quote
package main

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

func main() {

	url := "https://api.fleetwire.io/api/v2/quote"

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

	req.Header.Add("Authorization", "Bearer <token>")

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

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

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

}
```

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

url = URI("https://api.fleetwire.io/api/v2/quote")

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

request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'

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

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

HttpResponse<String> response = Unirest.post("https://api.fleetwire.io/api/v2/quote")
  .header("Authorization", "Bearer <token>")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.fleetwire.io/api/v2/quote', [
  'headers' => [
    'Authorization' => 'Bearer <token>',
  ],
]);

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

```csharp Quote
using RestSharp;

var client = new RestClient("https://api.fleetwire.io/api/v2/quote");
var request = new RestRequest(Method.POST);
request.AddHeader("Authorization", "Bearer <token>");
IRestResponse response = client.Execute(request);
```

```swift Quote
import Foundation

let headers = ["Authorization": "Bearer <token>"]

let request = NSMutableURLRequest(url: NSURL(string: "https://api.fleetwire.io/api/v2/quote")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers

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()
```

### Quotes_postQuote_example

**Request**

```json
{
  "l_id": "l_EXAMPLE1",
  "start": "2026-11-06 10:00:00",
  "end": "2026-11-09 10:00:00",
  "extras": [
    {
      "id": "00000000-0000-4000-8000-000000000301",
      "option": "00000000-0000-4000-8000-000000000302"
    }
  ],
  "coupon": "FALL10"
}
```

**Response**

```json
{
  "quote": {
    "l_id": "l_EXAMPLE1",
    "start": "2026-11-06 10:00:00",
    "end": "2026-11-09 10:00:00",
    "timezone": "America/Chicago",
    "available": true,
    "duration": {
      "units": 3,
      "unit": "day",
      "days": 3,
      "hours": 72
    },
    "currency": "USD",
    "lines": [
      {
        "type": "vehicle",
        "title": "2022 Toyota RAV4 Hybrid",
        "charge_label": "3 days",
        "price_each_in_cents": 6900,
        "price_in_cents": 20700,
        "discount_in_cents": 2070,
        "tax_in_cents": 1863
      },
      {
        "type": "extra",
        "title": "Child seat - Infant",
        "charge_label": "1 trip",
        "price_each_in_cents": 2500,
        "price_in_cents": 2500,
        "discount_in_cents": 250,
        "tax_in_cents": 225
      }
    ],
    "coupon": "FALL10",
    "totals": {
      "subtotal_in_cents": 23200,
      "discounts_in_cents": 2320,
      "taxes_in_cents": 2088,
      "total_in_cents": 22968,
      "security_deposit_in_cents": 25000,
      "due_at_checkout_in_cents": 22968
    },
    "checkout_url": "https://example-rentals.fleetwire.io/rental/reservations/l_EXAMPLE1?startDate=2026-11-06&startTime=1000&endDate=2026-11-09&endTime=1000"
  }
}
```

**SDK Code**

```python Quotes_postQuote_example
import requests

url = "https://api.fleetwire.io/api/v2/quote"

payload = {
    "l_id": "l_EXAMPLE1",
    "start": "2026-11-06 10:00:00",
    "end": "2026-11-09 10:00:00",
    "extras": [
        {
            "id": "00000000-0000-4000-8000-000000000301",
            "option": "00000000-0000-4000-8000-000000000302"
        }
    ],
    "coupon": "FALL10"
}
headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

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

print(response.json())
```

```javascript Quotes_postQuote_example
const url = 'https://api.fleetwire.io/api/v2/quote';
const options = {
  method: 'POST',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: '{"l_id":"l_EXAMPLE1","start":"2026-11-06 10:00:00","end":"2026-11-09 10:00:00","extras":[{"id":"00000000-0000-4000-8000-000000000301","option":"00000000-0000-4000-8000-000000000302"}],"coupon":"FALL10"}'
};

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

```go Quotes_postQuote_example
package main

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

func main() {

	url := "https://api.fleetwire.io/api/v2/quote"

	payload := strings.NewReader("{\n  \"l_id\": \"l_EXAMPLE1\",\n  \"start\": \"2026-11-06 10:00:00\",\n  \"end\": \"2026-11-09 10:00:00\",\n  \"extras\": [\n    {\n      \"id\": \"00000000-0000-4000-8000-000000000301\",\n      \"option\": \"00000000-0000-4000-8000-000000000302\"\n    }\n  ],\n  \"coupon\": \"FALL10\"\n}")

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

	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 Quotes_postQuote_example
require 'uri'
require 'net/http'

url = URI("https://api.fleetwire.io/api/v2/quote")

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

request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"l_id\": \"l_EXAMPLE1\",\n  \"start\": \"2026-11-06 10:00:00\",\n  \"end\": \"2026-11-09 10:00:00\",\n  \"extras\": [\n    {\n      \"id\": \"00000000-0000-4000-8000-000000000301\",\n      \"option\": \"00000000-0000-4000-8000-000000000302\"\n    }\n  ],\n  \"coupon\": \"FALL10\"\n}"

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

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

HttpResponse<String> response = Unirest.post("https://api.fleetwire.io/api/v2/quote")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("{\n  \"l_id\": \"l_EXAMPLE1\",\n  \"start\": \"2026-11-06 10:00:00\",\n  \"end\": \"2026-11-09 10:00:00\",\n  \"extras\": [\n    {\n      \"id\": \"00000000-0000-4000-8000-000000000301\",\n      \"option\": \"00000000-0000-4000-8000-000000000302\"\n    }\n  ],\n  \"coupon\": \"FALL10\"\n}")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.fleetwire.io/api/v2/quote', [
  'body' => '{
  "l_id": "l_EXAMPLE1",
  "start": "2026-11-06 10:00:00",
  "end": "2026-11-09 10:00:00",
  "extras": [
    {
      "id": "00000000-0000-4000-8000-000000000301",
      "option": "00000000-0000-4000-8000-000000000302"
    }
  ],
  "coupon": "FALL10"
}',
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'Content-Type' => 'application/json',
  ],
]);

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

```csharp Quotes_postQuote_example
using RestSharp;

var client = new RestClient("https://api.fleetwire.io/api/v2/quote");
var request = new RestRequest(Method.POST);
request.AddHeader("Authorization", "Bearer <token>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"l_id\": \"l_EXAMPLE1\",\n  \"start\": \"2026-11-06 10:00:00\",\n  \"end\": \"2026-11-09 10:00:00\",\n  \"extras\": [\n    {\n      \"id\": \"00000000-0000-4000-8000-000000000301\",\n      \"option\": \"00000000-0000-4000-8000-000000000302\"\n    }\n  ],\n  \"coupon\": \"FALL10\"\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Quotes_postQuote_example
import Foundation

let headers = [
  "Authorization": "Bearer <token>",
  "Content-Type": "application/json"
]
let parameters = [
  "l_id": "l_EXAMPLE1",
  "start": "2026-11-06 10:00:00",
  "end": "2026-11-09 10:00:00",
  "extras": [
    [
      "id": "00000000-0000-4000-8000-000000000301",
      "option": "00000000-0000-4000-8000-000000000302"
    ]
  ],
  "coupon": "FALL10"
] as [String : Any]

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

let request = NSMutableURLRequest(url: NSURL(string: "https://api.fleetwire.io/api/v2/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()
```