> ## Documentation Index
> Fetch the complete documentation index at: https://run-deliverys.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Bulk quote

> Quote up to 100 shipments in one request.

Quote up to **100** shipments in one request. The body and response are both a JSON array. Each item uses the same fields as [Quote cost](/orders/quote-cost).

Requires scope: `orders:write`

Sum prices client-side for a total. Use `index` to match each result to the request item. Failed rows include an `error` string instead of price fields.

## Headers

<ParamField header="Authorization" type="string" required>
  Bearer API key (`Bearer <api_key>`).
</ParamField>

<ParamField header="Content-Type" type="string" required>
  Must be `application/json`.
</ParamField>

## Body

Each array item supports:

<ParamField body="pickup_address" type="string" required>
  Full pickup address (≥ 3 chars). Same fields per item as [Quote cost](/orders/quote-cost).
</ParamField>

<ParamField body="dropoff_address" type="string" required>
  Full drop-off address (≥ 3 chars).
</ParamField>

<ParamField body="weight" type="number" required>
  Billable weight in kg (≥ 0.1).
</ParamField>

<ParamField body="vehicle_type" type="string">
  Same as [Quote cost](/orders/quote-cost): `bike`, `bus_van`, or `truck`.
</ParamField>

<ParamField body="option_id" type="string">
  From [Rate cards](/orders/rate-cards). Required for bus/van and truck.
</ParamField>

<ParamField body="pickup_lat" type="number">
  Optional pickup latitude.
</ParamField>

<ParamField body="pickup_lng" type="number">
  Optional pickup longitude.
</ParamField>

<ParamField body="dropoff_lat" type="number">
  Optional drop-off latitude.
</ParamField>

<ParamField body="dropoff_lng" type="number">
  Optional drop-off longitude. If all four lat/lng are set, geocode is skipped.
</ParamField>

## Response

<ResponseField name="index" type="number">
  Zero-based index matching the request item.
</ResponseField>

<ResponseField name="price" type="number">
  Quoted price (omitted when the row failed).
</ResponseField>

<ResponseField name="distance_km" type="number">
  Estimated distance in km.
</ResponseField>

<ResponseField name="currency" type="string">
  Currency code (for example `NGN`).
</ResponseField>

<ResponseField name="error" type="string">
  Present on failed rows instead of price fields.
</ResponseField>

<RequestExample>
  ```bash cURL theme={null}
  curl -X POST "$RUN_BASE_URL/business/order/cost/bulk" \
    -H "Authorization: Bearer $RUN_API_KEY" \
    -H "Content-Type: application/json" \
    -d '[
      {
        "pickup_address": "12 Admiralty Way, Lekki, Lagos",
        "dropoff_address": "15 Broad Street, Lagos Island, Lagos",
        "weight": 2
      },
      {
        "pickup_address": "hassan adesola street",
        "dropoff_address": "44, unity avenue, abaranje road ikotun lagos",
        "weight": 3
      }
    ]'
  ```

  ```javascript Node.js theme={null}
  const res = await fetch(`${process.env.RUN_BASE_URL}/business/order/cost/bulk`, {
    method: 'POST',
    headers: {
      Authorization: `Bearer ${process.env.RUN_API_KEY}`,
      'Content-Type': 'application/json',
    },
    body: JSON.stringify([
      {
        pickup_address: '12 Admiralty Way, Lekki, Lagos',
        dropoff_address: '15 Broad Street, Lagos Island, Lagos',
        weight: 2,
      },
      {
        pickup_address: 'hassan adesola street',
        dropoff_address: '44, unity avenue, abaranje road ikotun lagos',
        weight: 3,
      },
    ]),
  });
  const quotes = await res.json();
  ```

  ```python Python theme={null}
  import os
  import requests

  res = requests.post(
      f"{os.environ['RUN_BASE_URL']}/business/order/cost/bulk",
      headers={
          "Authorization": f"Bearer {os.environ['RUN_API_KEY']}",
          "Content-Type": "application/json",
      },
      json=[
          {
              "pickup_address": "12 Admiralty Way, Lekki, Lagos",
              "dropoff_address": "15 Broad Street, Lagos Island, Lagos",
              "weight": 2,
          },
          {
              "pickup_address": "hassan adesola street",
              "dropoff_address": "44, unity avenue, abaranje road ikotun lagos",
              "weight": 3,
          },
      ],
  )
  quotes = res.json()
  ```

  ```php PHP theme={null}
  <?php
  $ch = curl_init(getenv('RUN_BASE_URL') . '/business/order/cost/bulk');
  curl_setopt_array($ch, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_POST => true,
    CURLOPT_HTTPHEADER => [
      'Authorization: Bearer ' . getenv('RUN_API_KEY'),
      'Content-Type: application/json',
    ],
    CURLOPT_POSTFIELDS => json_encode([
      [
        'pickup_address' => '12 Admiralty Way, Lekki, Lagos',
        'dropoff_address' => '15 Broad Street, Lagos Island, Lagos',
        'weight' => 2,
      ],
      [
        'pickup_address' => 'hassan adesola street',
        'dropoff_address' => '44, unity avenue, abaranje road ikotun lagos',
        'weight' => 3,
      ],
    ]),
  ]);
  $quotes = json_decode(curl_exec($ch), true);
  curl_close($ch);
  ```

  ```go Go theme={null}
  package main

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

  func main() {
    body := []byte(`[
      {
        "pickup_address": "12 Admiralty Way, Lekki, Lagos",
        "dropoff_address": "15 Broad Street, Lagos Island, Lagos",
        "weight": 2
      },
      {
        "pickup_address": "hassan adesola street",
        "dropoff_address": "44, unity avenue, abaranje road ikotun lagos",
        "weight": 3
      }
    ]`)
    req, _ := http.NewRequest(
      "POST",
      os.Getenv("RUN_BASE_URL")+"/business/order/cost/bulk",
      bytes.NewReader(body),
    )
    req.Header.Set("Authorization", "Bearer "+os.Getenv("RUN_API_KEY"))
    req.Header.Set("Content-Type", "application/json")
    res, err := http.DefaultClient.Do(req)
    if err != nil {
      panic(err)
    }
    defer res.Body.Close()
    out, _ := io.ReadAll(res.Body)
    fmt.Println(string(out))
  }
  ```
</RequestExample>

<ResponseExample>
  ```json 200 theme={null}
  [
    { "index": 0, "price": 3869, "distance_km": 7.54, "currency": "NGN" },
    { "index": 1, "price": 4200, "distance_km": 9.1, "currency": "NGN" }
  ]
  ```

  ```json 200 (partial failure) theme={null}
  [
    { "index": 0, "price": 3869, "distance_km": 7.54, "currency": "NGN" },
    { "index": 1, "error": "Could not geocode pickup address" }
  ]
  ```

  ```json 400 theme={null}
  {
    "statusCode": 400,
    "timestamp": "2026-08-12T15:18:51.396Z",
    "path": "/api/v2/business/order/cost/bulk",
    "message": "Maximum 100 items per bulk cost request"
  }
  ```

  ```json 401 theme={null}
  {
    "statusCode": 401,
    "timestamp": "2026-08-12T15:18:51.396Z",
    "path": "/api/v2/business/order/cost/bulk",
    "message": "Invalid API key"
  }
  ```

  ```json 403 theme={null}
  {
    "statusCode": 403,
    "timestamp": "2026-08-12T15:18:51.396Z",
    "path": "/api/v2/business/order/cost/bulk",
    "message": "Insufficient API key scope"
  }
  ```
</ResponseExample>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.