DocsBookingAPIPricing

Get a price quote

Before creating a booking, call the pricing endpoints to retrieve real-time fare estimates. Prices reflect the current tariff for the pickup location, drop-off, requested time, and account rate.

Pricing overview

The BookingAPI supports two pricing endpoints:

  • All service types — returns a fare for every vehicle category in one call. Use this to present a vehicle-selection screen.
  • Single service type — returns a fare for one specific vehicle. Use this when the customer has already chosen.
ℹ️
Fares use tiered distance band pricing. A 105-mile trip with multiple tariff bands calculates each band separately — the first 10 miles at one rate, the next 40 at another, and so on. The priceBreakdown field in the response shows exactly how the fare was calculated.

Quote all service types

POST /api/v1/pricing/quotes

Returns a fare for every active service type for the requested journey. Ideal for presenting a "choose your vehicle" screen.

Request body

ParameterTypeRequiredDescription
pickupLatitude number Required Pickup latitude in decimal degrees (e.g. 51.5074).
pickupLongitude number Required Pickup longitude in decimal degrees (e.g. -0.1278).
dropoffLatitude number Required Drop-off latitude in decimal degrees.
dropoffLongitude number Required Drop-off longitude in decimal degrees.
pickupDateTimeUtc string (ISO 8601) Required Requested pickup time in UTC. Example: 2026-05-01T14:00:00Z.
passengers integer Optional Number of passengers. Default: 1.
luggage integer Optional Pieces of luggage. Default: 0.
accountId string (UUID) Optional Customer account ID. When supplied, the pricing engine applies account-specific rates if configured.
Request — quote all service types
curl -X POST https://api.moovlogic.com/api/v1/pricing/quotes \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "pickupLatitude":   51.4775,
    "pickupLongitude": -0.4614,
    "dropoffLatitude":  51.5034,
    "dropoffLongitude": -0.1276,
    "pickupDateTimeUtc": "2026-05-01T14:00:00Z",
    "passengers": 2
  }'
import requests

headers = {'Authorization': f'Bearer {token}'}
payload = {
    'pickupLatitude':    51.4775,
    'pickupLongitude':  -0.4614,
    'dropoffLatitude':   51.5034,
    'dropoffLongitude': -0.1276,
    'pickupDateTimeUtc': '2026-05-01T14:00:00Z',
    'passengers': 2
}
response = requests.post(
    'https://api.moovlogic.com/api/v1/pricing/quotes',
    json=payload,
    headers=headers
)
quotes = response.json()['quotes']
<?php
$payload = json_encode([
    'pickupLatitude'    => 51.4775,
    'pickupLongitude'   => -0.4614,
    'dropoffLatitude'   => 51.5034,
    'dropoffLongitude'  => -0.1276,
    'pickupDateTimeUtc' => '2026-05-01T14:00:00Z',
    'passengers'        => 2
]);

$ch = curl_init('https://api.moovlogic.com/api/v1/pricing/quotes');
curl_setopt_array($ch, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_POST           => true,
    CURLOPT_HTTPHEADER     => [
        'Authorization: Bearer ' . $token,
        'Content-Type: application/json'
    ],
    CURLOPT_POSTFIELDS => $payload
]);
$data = json_decode(curl_exec($ch), true);
curl_close($ch);
const response = await fetch('https://api.moovlogic.com/api/v1/pricing/quotes', {
    method: 'POST',
    headers: {
        'Authorization': `Bearer ${token}`,
        'Content-Type': 'application/json'
    },
    body: JSON.stringify({
        pickupLatitude:    51.4775,
        pickupLongitude:  -0.4614,
        dropoffLatitude:   51.5034,
        dropoffLongitude: -0.1276,
        pickupDateTimeUtc: '2026-05-01T14:00:00Z',
        passengers: 2
    })
});
const { quotes } = await response.json();

Response — 200 OK

Response 200 OK
{
  "quotes": [
    {
      "serviceTypeId":            "3fa85f64-5717-4562-b3fc-2c963f66afa6",
      "serviceTypeName":          "Standard Saloon",
      "serviceTypeShortCode":     "STSA",
      "serviceTypeImageUrl":      "https://cdn.moovlogic.com/vehicles/standard-saloon.png",
      "accountFare":              85.00,
      "currency":                 "GBP",
      "distanceMiles":            24.6,
      "estimatedDurationMinutes": 52,
      "priceBreakdown":           "10mi@3.00 + 14.6mi@3.50 = 81.10",
      "maxPassengers":            4,
      "maxLuggage":               2
    },
    {
      "serviceTypeId":            "7cb4a2f1-83b1-4e9d-9a3c-1f8e2d6c4b5a",
      "serviceTypeName":          "Executive",
      "serviceTypeShortCode":     "EXEC",
      "serviceTypeImageUrl":      "https://cdn.moovlogic.com/vehicles/executive.png",
      "accountFare":              110.00,
      "currency":                 "GBP",
      "distanceMiles":            24.6,
      "estimatedDurationMinutes": 52,
      "priceBreakdown":           "10mi@4.00 + 14.6mi@4.50 = 105.70",
      "maxPassengers":            4,
      "maxLuggage":               3
    }
  ],
  "pickupDateTimeUtc": "2026-05-01T14:00:00Z"
}

Quote a single service type

POST /api/v1/pricing/quotes/{serviceTypeId}

Returns a fare for one specific service type. Use this when the customer has already selected a vehicle.

Path parameter

ParameterTypeLocationDescription
serviceTypeId string (UUID) Path The service type to price. Obtain from List service types.

The request body is identical to the all-service-types endpoint above.

Request — single service type
curl -X POST https://api.moovlogic.com/api/v1/pricing/quotes/3fa85f64-5717-4562-b3fc-2c963f66afa6 \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "pickupLatitude":    51.4775,
    "pickupLongitude":  -0.4614,
    "dropoffLatitude":   51.5034,
    "dropoffLongitude": -0.1276,
    "pickupDateTimeUtc": "2026-05-01T14:00:00Z"
  }'
service_type_id = '3fa85f64-5717-4562-b3fc-2c963f66afa6'
response = requests.post(
    f'https://api.moovlogic.com/api/v1/pricing/quotes/{service_type_id}',
    json=payload,
    headers=headers
)
quote = response.json()
const serviceTypeId = '3fa85f64-5717-4562-b3fc-2c963f66afa6';
const response = await fetch(
    `https://api.moovlogic.com/api/v1/pricing/quotes/${serviceTypeId}`,
    { method: 'POST', headers, body: JSON.stringify(payload) }
);
const quote = await response.json();

Understanding the price breakdown

The priceBreakdown string shows how the fare was calculated across distance bands:

Example breakdown
"priceBreakdown": "10mi@3.00 + 40mi@3.50 + 5mi@4.00 = 242.50"

# Means:
# First 10 miles  → 10 × £3.00 = £30.00
# Next  40 miles  → 40 × £3.50 = £140.00
# Final  5 miles  →  5 × £4.00 = £20.00
#                              = £190.00  (illustrative example)
💡
Pass the accountFare from this response into the quotedFare field when creating a booking. This locks the price the customer was shown.